Maple 18 Questions and Posts

These are Posts and Questions associated with the product, Maple 18

Dear Maple Users @acer @Carl Love @Kitonum @Preben Alsholm ,

Greetings.

How to plot a function "Am" for various values of "kt"(eg: kt=-1..1) at a point x=0.

Am vs kt.

The code has provided below.

Waiting for your response.

ktplot.mw

 

How can I generate a code to plot the optimals; h, chi and psi?

Dear all

I need to display a matrix K defined in the attached maple code.

Thanks for your help

matrix.mw

restart;
solve({l*(2*l^2*lambda^4*sigma*w*a[2]+l^2*lambda^2*mu*w*b[1]+6*l*lambda^2*m*sigma*a[0]^2-6*l*lambda^2*m*b[1]^2+6*l*m*mu^2*a[0]^2-l*lambda^2*rho*sigma*a[0]-l*mu^2*rho*a[0]+4*lambda^2*sigma*w*a[0]+4*mu^2*w*a[0]) = 0, l*(2*l^2*lambda^3*sigma*w*a[1]+6*l^2*lambda^2*mu*w*b[2]+2*l^2*lambda*mu^2*w*a[1]+12*l*lambda^2*m*sigma*a[0]*a[1]-12*l*lambda^2*m*b[1]*b[2]-l*lambda^2*rho*sigma*a[1]+12*l*m*mu^2*a[0]*a[1]-l*mu^2*rho*a[1]+4*lambda^2*sigma*w*a[1]+4*mu^2*w*a[1]) = 0, l*(5*l^2*lambda^3*sigma*w*b[2]-3*l^2*lambda^2*mu*sigma*w*a[1]-7*l^2*lambda*mu^2*w*b[2]-3*l^2*mu^3*w*a[1]+12*l*lambda^2*m*sigma*a[0]*b[2]+12*l*lambda^2*m*sigma*a[1]*b[1]-l*lambda^2*rho*sigma*b[2]+24*l*lambda*m*mu*b[1]*b[2]+12*l*m*mu^2*a[0]*b[2]+12*l*m*mu^2*a[1]*b[1]-l*mu^2*rho*b[2]+4*lambda^2*sigma*w*b[2]+4*mu^2*w*b[2]) = 0, l*(8*l^2*lambda^3*sigma*w*a[2]+6*l^2*lambda*mu^2*w*a[2]+12*l*lambda^2*m*sigma*a[0]*a[2]+6*l*lambda^2*m*sigma*a[1]^2+l^2*lambda*mu*w*b[1]-6*l*lambda^2*m*b[2]^2-l*lambda^2*rho*sigma*a[2]+12*l*m*mu^2*a[0]*a[2]+6*l*m*mu^2*a[1]^2-6*l*lambda*m*b[1]^2-l*mu^2*rho*a[2]+4*lambda^2*sigma*w*a[2]+4*mu^2*w*a[2]) = 0, -l*(4*l^2*lambda^3*mu*sigma*w*a[2]-l^2*lambda^3*sigma*w*b[1]+l^2*lambda*mu^2*w*b[1]-12*l*lambda^2*m*sigma*a[0]*b[1]+l*lambda^2*rho*sigma*b[1]-12*l*lambda*m*mu*b[1]^2-12*l*m*mu^2*a[0]*b[1]+l*mu^2*rho*b[1]-4*lambda^2*sigma*w*b[1]-4*mu^2*w*b[1]) = 0, 6*l^2*(l*lambda^2*sigma*w*a[2]+lambda^2*m*sigma*a[2]^2+l*mu^2*w*a[2]+m*mu^2*a[2]^2-lambda*m*b[2]^2) = 0, 2*l^2*(l*lambda^2*sigma*w*a[1]+6*lambda^2*m*sigma*a[1]*a[2]+3*l*lambda*mu*w*b[2]+l*mu^2*w*a[1]+6*m*mu^2*a[1]*a[2]-6*lambda*m*b[1]*b[2]) = 0, -2*l^2*(5*l*lambda^2*mu*sigma*w*a[2]-l*lambda^2*sigma*w*b[1]+5*l*mu^3*w*a[2]-6*lambda^2*m*sigma*a[1]*b[2]-6*lambda^2*m*sigma*a[2]*b[1]-l*mu^2*w*b[1]-6*lambda*m*mu*b[2]^2-6*m*mu^2*a[1]*b[2]-6*m*mu^2*a[2]*b[1]) = 0, 6*l^2*b[2]*(l*w+2*m*a[2]) = 0}, {a[0], a[1], a[2], b[1], b[2]});
Warning, solutions may have been lost
{a[0] = 0, a[1] = 0, a[2] = 0, b[1] = 0, b[2] = 0}, 

   /       l rho - 4 w                                        \ 
  { a[0] = -----------, a[1] = 0, a[2] = 0, b[1] = 0, b[2] = 0 }
   \          6 l m                                           / 
 

If we have an equation for the generalized Bloch sphere i.e.,

\partial_{t}(u^{2} + v^{2} + w^{2}) = 0,

where u, v and w are functions of x and t and the initial conditions u=v=0, w=-1. Then how to plot this equation on maple?

Hi all,

I have a system of nonlinear equations with for equations, 4 variables I want to solve for, and 2 parameters. All of the variables and parameters must be non-negative.

The code I used to try to do this is:

Where eqi (i = 1, ... , 4) are expression (not equations in themselves). For example, eq1 is:

 

When I try to run this code I get the following error:

"Error, (in SolveTools:-Inequality:-Piecewise) piecewise takes at least 2 parameters"

 

Can anyone help me how I can make Maple do what I want here? :)

 

Thank you in advance,

JTamas

 Mathematical model for the temperature profiles of steel pipes quenched by water cooling rings

Hi

 Can anyone solve the given equations along with the boundary conditions analytically with Maple and draw the graphs ???????????

Dear maple users,
Greetings.
I am solving an ode problem with an analytical solution.
programming running properly, but my plot not exact with the already existing article plot. 
how to get the exact plot.

Thanking you.

Code:JVB.mw
 

restart

N := 3;

3

 

1

(1)

dsolve(diff(f(x), `$`(x, 3)));

f(x) = (1/2)*_C1*x^2+_C2*x+_C3

(2)

Rf := 2*(diff(f[m-1](x), x, x, x))-(2*mh*mh)*(diff(f[m-1](x), x))+sum(f[m-1-n](x)*(diff(f[n](x), x)), n = 0 .. m-1)-bet*(sum(sum(2*f[m-1-n](x)*(diff(f[n-t](x), x))*(diff(f[t](x), x, x))+f[m-1-n](x)*f[n-t](x)*(diff(f[t](x), x, x, x))+x*(diff(f[m-1-n](x), x))*(diff(f[n-t](x), x))*(diff(f[t](x), x, x)), t = 0 .. n), n = 0 .. m-1));

2*(diff(diff(diff(f[m-1](x), x), x), x))-2*(diff(f[m-1](x), x))+sum(f[m-1-n](x)*(diff(f[n](x), x)), n = 0 .. m-1)-.2*(sum(sum(2*f[m-1-n](x)*(diff(f[n-t](x), x))*(diff(diff(f[t](x), x), x))+f[m-1-n](x)*f[n-t](x)*(diff(diff(diff(f[t](x), x), x), x))+x*(diff(f[m-1-n](x), x))*(diff(f[n-t](x), x))*(diff(diff(f[t](x), x), x)), t = 0 .. n), n = 0 .. m-1))

(3)

dsolve(diff(f[m](x), x, x, x)-CHI[m]*(diff(f[m-1](x), x, x, x)) = h*H*Rf, f[m](x));

f[m](x) = Int(Int(Int(CHI[m]*(diff(diff(diff(f[m-1](x), x), x), x))+2*h*(diff(diff(diff(f[m-1](x), x), x), x))-2*h*(diff(f[m-1](x), x))+h*(sum(f[m-1-n](x)*(diff(f[n](x), x)), n = 0 .. m-1))-(1/5)*h*(sum(sum(2*f[m-1-n](x)*(diff(f[n-t](x), x))*(diff(diff(f[t](x), x), x))+f[m-1-n](x)*f[n-t](x)*(diff(diff(diff(f[t](x), x), x), x))+x*(diff(f[m-1-n](x), x))*(diff(f[n-t](x), x))*(diff(diff(f[t](x), x), x)), t = 0 .. n), n = 0 .. m-1)), x), x)+_C1*x, x)+_C2*x+_C3

(4)

f[0](x) := 1-exp(x);

1-exp(x)

(5)

for m to N do CHI[m] := `if`(m > 1, 1, 0); f[m](x) := int(int(int(2*CHI[m]*(diff(f[m-1](x), x, x, x))-(2*h*H*mh*mh)*(diff(f[m-1](x), x))+h*H*(sum(f[m-1-n](x)*(diff(f[n](x), x)), n = 0 .. m-1)), x)-h*H*(sum(sum(2*f[m-1-n](x)*(diff(f[n-t](x), x))*(diff(f[t](x), x, x))+f[m-1-n](x)*f[n-t](x)*(diff(f[t](x), x, x, x))+x*(diff(f[m-1-n](x), x))*(diff(f[n-t](x), x))*(diff(f[t](x), x, x)), t = 0 .. n), n = 0 .. m-1))*bet, x)+_C1*x, x)+_C2*x+_C3; s1 := evalf(subs(x = 0, f[m](x))) = 0; s2 := evalf(subs(x = 0, diff(f[m](x), x))) = 0; s3 := evalf(subs(x = 1, f[m](x))) = 0; s := {s1, s2, s3}; f[m](x) := simplify(subs(solve(s, {_C1, _C2, _C3}), f[m](x))) end do:

f(x) := sum(f[l](x), l = 0 .. N);

1-0.7644444444e-1*exp(5.*x)*h^2*x-0.1333333333e-1*x^2*exp(5.*x)*h^2-2.675700596*exp(2.*x)*h^2*x-0.5876096022e-1*exp(6.*x)*h^3*x-0.9282030175e-2*x^2*exp(6.*x)*h^3+.9962792493*exp(3.*x)*h^3*x+.1647896790*exp(5.*x)*h^3*x+0.2066962962e-1*x^2*exp(5.*x)*h^3+3.357118680*exp(2.*x)*h^3*x-.3264340965*exp(4.*x)*h^3*x+0.3999999998e-1*exp(2.*x)*ln(exp(x))*h^2+58.61348006*h^3+1.023148148*h^2*x^3+0.1364197531e-1*ln(exp(x))*h^3*x^3-0.8954734530e-1*exp(2.*x)*h^3*x^4-.1353159884*x^3*exp(4.*x)*h^3+.7542645986*exp(3.*x)*h^3*x^2-0.2830138323e-1*x^3*h^3*exp(3.*x)-0.6455420536e-1*exp(x)*h^3*ln(exp(x))*x+0.4775858416e-1*exp(x)*h^3*ln(exp(x))*x^2+0.8888888887e-3*exp(x)*h^3*ln(exp(x))^2+8.400000000*h*exp(x)-exp(x)-0.6666666666e-1*h*ln(exp(x))+.1416666666*exp(4.*x)*h^2*x-.4790123458*exp(3.*x)*h^2*x+.1333333333*exp(3.*x)*h*x+.3791666665*exp(4.*x)*h^2-1.340020575*exp(3.*x)*h^2+.3111111109*exp(3.*x)*h+5.570191338*h^2*exp(2.*x)-.4500000000*h*exp(2.*x)-0.9874869443e-1*exp(6.*x)*h^3+.4125877323*exp(3.*x)*h^3-4.984787877*h^3*exp(2.*x)-.8010958741*exp(4.*x)*h^3+.3215641638*exp(5.*x)*h^3-5.930474628*h^2*x+36.04284024*exp(x)*h^3*x+8.324321524*x^2*h^2-.5362260993*h^3*x^3-6.207072379*exp(x)*x^2*h^3+1.664189246*exp(x)*h^3*x^3-8.237962963*h+.1200000000*exp(x)*h^2*ln(exp(x))+0.2222222222e-1*exp(3*x)*h*x+24.00299428*h^3*x-2.098561083*x^2*h^3-53.48457977*h^3*exp(x)+0.9949705035e-2*ln(exp(x))*h^3*x^4-0.7308641971e-2*ln(exp(x))*exp(4.*x)*h^3+0.8984910834e-2*ln(exp(x))*exp(3.*x)*h^3-0.3741666666e-1*ln(exp(x))*h^3*exp(2.*x)-.1188740741*exp(5.*x)*h^2-12.53662834*x^2*h+25.90916526*h^2*exp(x)-30.39962862*h^2-0.7499999999e-1*h*exp(2*x)+0.5185185185e-1*exp(3*x)*h+5.372840718*exp(x)*x^2*h^2-25.09181716*exp(x)*h^2*x+0.8976305409e-1*h^3*x^5+0.2158026099e-1*exp(7.*x)*h^3+0.8606919260e-1*h^3*x^4+0.5079365079e-3*x^3*exp(7.*x)*h^3-.3215468487*x^2*exp(4.*x)*h^3+0.1762236380e-1*exp(7.*x)*h^3*x+0.5048727639e-2*exp(7.*x)*x^2*h^3-3.116709690*exp(2.*x)*x^2*h^3+.1066289908*exp(2.*x)*h^3*x^3-8.527777777*h*x-0.2814814814e-2*ln(exp(x))*exp(4.*x)*h^3*x-0.1053497943e-2*ln(exp(x))*exp(3.*x)*h^3*x+0.4848332783e-1*h^3*x^6+.7462278773*h^2*x^4+.5519508187*exp(x)*h^3*x^4+0.9367631194e-1*exp(x)*h^3*ln(exp(x))+3.581893812*exp(2.*x)*x^2*h^2

 

 

NULL


 

Download JVB.mw

 

Analytical solution approach:

 

 

 

 

How do I solve an overdetermined system of algebraic equations in Maple? solve command returns trivial solution for variables which are not actually trivial when I solve them by hand.

F(0) := a; F(1) := b; F(2) := c; F(3) := d

for k from 0 to 1 do F(k+4) := -(N[1]*G(k)+Re*(sum(F(k-m)*(m+1)*(m+2)*(m+3)*F(m+3), m = 0 .. k))-Re*(sum((k-m+1)*F(k-m+1)*(m+1)*(m+2)*F(m+2), m = 0 .. k)))/((1+N[1])*(k+1)*(k+2)*(k+3)*(k+4)) end do

How to plot a graph for this equation with different values of N_1 and Re number

Please, I need to use Maple to solve Euler-Bernoulli Beam on Pasternak Foundation using Homotopy Perturbation Method.

The governing equation is 

initial conditions are 

the boundary condition is 

The governing equation represents Euler-Bernoulli beam on a generalized Pasternak viscoelastic foundation under an
arbitrary distributed dynamic load. in which E, I , ρ ,A are the parameters of the beam, representing Young’s modulus of elasticity, moment of inertia, density and area of cross section, respectively. K,C and Gp are spring stiffness, damping coefficient, and shear coefficient of the foundation. Moreover, y(x, t) and F(x, t) are defined as the vertical deflection of the beam and the generic arbitrary dynamic loads, respectively, where the loads distribute along the x-axis and t is time.

 

I will appreciate anyone who can help me with a Maple solution.

 

Thank you.

Hi

I have a first oder PDE, I use pdsolve I obtained a solution depend on function F

condition_unique_solution.mw

 

My question: The boundary condition  f(x,y) = 1 is supplied on the line y = k x, where k is a constant. For which k
does there exist a unique solution for f(x, y)?

 

Many thanks for your help

 

Hellow, help required to remove the errors

 How to  obtain the pressure drop i am unable to get the output. I am uploading the file  and the equations

help_dp.mw

Hi everybody

I try to save an array of equations in a "mpl file", and then read file and array by command read mpl file. But system error "bad id" occurs. Previously I saved this mpl file by "save" and read array by "read" command. I ran this code several times without any problem, suddenly error "bad id" occurred. When I save mpl file by the code edit region and then read it by "read" in the same or  a new worksheet, the error doesn't happen!
 What is wrong?
"Id" refers to the array index?

Thanks.
Maple 18 and Windows 10

Dear all,
How can I input different spacesteps in numerical solution of PDE (Heat equation) with pdsolve of Maple?

For example, the x range is x=0..L,
and I'd like to solve the PDE with spacestep1=L/100 for x=0..a and spacestep2=L/10 for x=a..L.

Thank you in advance!

2 3 4 5 6 7 8 Last Page 4 of 85