Maple Questions and Posts

These are Posts and Questions associated with the product, Maple


Hi there,
I have a set of differential equations whose solution, Jacobian matrix and its eigenvalues, direction field, phase portrait and nullclines, need to be computed.

Each of the equations has a varying parameter.

I know how to get the above for a single parameter value, but when I set a range of values for the parameters, Maple is not able to handle all cases as I would expect: solving the differential equation system:

eq1 := x*(1.6*(1-(1/100)*x)-phi*y)
eq2 := (x/(15+x)-0.3e-1*x-.4)*y+.6+theta
desys := [eq1, eq2];
vars := [x, y];
steadyStates := map2(eval, vars, [solve(desys)])

already yields an error:
Error, (in unknown) invalid input: Utilities:-SetEquations expects its 2nd argument, equations, to be of type set({boolean, algebraic, relation}), but received {-600*y+(Array(1..2, {(1) = 8400, (2) = 15900})), Array(1..5, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0})}


The equations are the following:
de1 := diff(x(t), t) = x(t)*(1.6*(1-(1/100)*x(t))-phi*y(t));
de2 := diff(y(t), t) = (x(t)/(15+x(t))-0.3e-1*x(t)-.4)*y(t)+.6+theta

the parameters being:
phi:=[0 0.5 1 1.5 2]
theta:=[5. 10.]

How can I handle the situation so that Maple computes each of the above for each combination of the parameters?

I would like to avoid using two for loops and having to store all results in increasingly bigger and complicated arrays.

The worksheet at issue is this: MaplePrimes_Tumour_model_phi_theta_variation.mw


Thanks,
jon

Hi there,
I am wondering how to print parentheses in the legend of an odeplot.

The following command

odeplot(numsolnf, [[t, CECnf(t)], [t, VECnf(t)], [t, CICnf(t)], [t, VICnf(t)]], 0..50, opts, legend = ['Extracelular urea concentration (mg/dL)', 'Extracelular urea volume (L)', 'Intracelular urea concentration (mg/dL)', 'Intracelular urea volume (L)'])

where numsolnf is the numerical solution of the equation system composed by CECnf(t), VECnf(t), CICnf(t), and
VICnf(t) produces no parentheses.

And the "Extracelular urea concentration (mg/dL)" and "Intracelular urea concentration (mg/dL)" are displayed as if the whole text was a quotient:


Extracelular urea concentration mg
dL

Any ideas about how to solve these issues?

Thanks,
jon

Hi there,

this may be a common task but did not find any helpful hint nor an answer: is there any way to combine to arrays A and B into another one element-wise, i.e.:
C = [[A[1],B[1]], [A[2],B[2]],...,[A[N],B[N]]]
without doing a for loop?


Thanks,
jon

Hye,

Have a good day Sir.

can u help me how to solve my problem using the Implicit Crank Nicolson Finite different Method. I have attached the problem and what I have done in Word file. I have to modify my Equations in order to get the graphs (that is wrong actually). Can you help how to get the graphs by not change the sign of my equations?:( 

 

Thank you in advance.

God Bless you.

 

 

1. if parametric equations are
x0 = a^4, x1=a^3*b, x2=a^2*b^2, x3=a*b^3, x4=b^4

how to find ideal below

e12 = x0*x2-x1^2
e13 = x0*x3-x1*x2
e14 = x0*x4-x1*x3
e23 = x1*x3-x2^2
e24 = x1*x4-x2*x3
e34 = x2*x4-x3^2

2.
if let y_i = x_i/x0 for i = 1..4
how to find above parametrically by below equations
y1 = b
y2 = b^2
y3 = b^3
y4 = b^4

Hi

My equations are:

diff(Th(z, t), t) = 7.1428*(diff(Th(z, t), z))-1397941.885*(279-Tw(z, t))-0.2160487e-1*(diff(Th(z, t), z, z))

diff(Tc(z, t), t) = -7.1428*(diff(Tc(z, t), z))+1298990.852*(Tw(z, t)-291)+0.189366e-1*(diff(Tc(z, t), z, z))

diff(Tw(z, t), t) = 3.3024901*(Th(z, t)-2*Tw(z, t)+Tc(z, t))+8.0029*10^(-4)*(diff(Tw(z, t), z, z))

and boundry conditions are:

Th(z, 0) = 296, (D[1](Th))(0, t) = 0, Th(1, t) = 296

Tc(z, 0) = 275, (D[1](Tc))(1, t) = 0, Tc(0, t) = 275

Tw(z, 0) = 0, (D[1](Tw))(1, t) = 0,Tw(0, t) = 0

I shoud solve this equations numerically and plot Th vs.t(and Th vs.z),

please help me.

thanks

Dear All,

I am solving ODE with BC .. then im having this error.. (Error, (in dsolve/numeric/bvp/convertsys) unable to convert to an explicit first-order system)

Anyone could help me please?? :)

34.mw

``

> 

restart; with(plots); l := .1; M := .5; B := .6; c1 := 1; R := .5; Pr := .72; N := .5; rho := 1; Bt := .6; Ec := .5; lambda := .1; S := .5; blt := 5

> 

Eq1 := diff(f(eta), eta, eta, eta)+f(eta)*(diff(f(eta), eta))-2*(diff(f(eta), eta))^2+2*l*B*(diff(F(eta), eta)-(diff(f(eta), eta)))-M*(diff(f(eta), eta))-A*(2*(diff(f(eta), eta))+eta*(diff(f(eta), eta))) = 0;

diff(diff(diff(f(eta), eta), eta), eta)+f(eta)*(diff(f(eta), eta))-2*(diff(f(eta), eta))^2+.12*(diff(F(eta), eta))-.62*(diff(f(eta), eta))-A*(2*(diff(f(eta), eta))+eta*(diff(f(eta), eta))) = 0

(1)
> 

Eq2 := F(eta)*(diff(F(eta), eta))-2*(diff(F(eta), eta))^2+2*B*(diff(f(eta), eta)-(diff(F(eta), eta))-A*(eta*(diff(F(eta), eta))-2*(diff(F(eta), eta)))) = 0

F(eta)*(diff(F(eta), eta))-2*(diff(F(eta), eta))^2+1.2*(diff(f(eta), eta))-1.2*(diff(F(eta), eta))-1.2*A*(eta*(diff(F(eta), eta))-2*(diff(F(eta), eta))) = 0

(2)
> 

Eq3 := (1+(4/3)*R)*(diff(theta(eta), eta, eta))+Pr*((diff(theta(eta), eta))*f(eta)-c1*(diff(f(eta), eta))*theta(eta))+2*N*Pr*Bt*(theta1(eta)-theta(eta))/rho+2*N*B*Pr*Ec*(diff(F(eta), eta)-(diff(f(eta), eta)))^2/rho-A*Pr*(4*theta(eta)+eta*(diff(theta(eta), eta)))+2*lambda*Pr*theta(eta)+Pr*Ec*(diff(f(eta), eta))^2 = 0;

1.666666667*(diff(diff(theta(eta), eta), eta))+.72*(diff(theta(eta), eta))*f(eta)-.72*(diff(f(eta), eta))*theta(eta)+.4320*theta1(eta)-.2880*theta(eta)+.21600*(diff(F(eta), eta)-(diff(f(eta), eta)))^2-.72*A*(4*theta(eta)+eta*(diff(theta(eta), eta)))+.360*(diff(f(eta), eta))^2 = 0

(3)
> 

Eq4 := c1*(diff(F(eta), eta))*theta1(eta)-F(eta)*(diff(theta1(eta), eta))+2*gamma*Bt*(theta1(eta)-theta(eta))+A*(4*theta1(eta)+eta*(diff(theta1(eta), eta))) = 0;

(diff(F(eta), eta))*theta1(eta)-F(eta)*(diff(theta1(eta), eta))+1.2*gamma*(theta1(eta)-theta(eta))+A*(4*theta1(eta)+eta*(diff(theta1(eta), eta))) = 0

(4)
> 

bcs1 := f(0) = S, (D(f))(0) = 1, (D(f))(blt) = 0, (D(F))(blt) = 0, F(blt) = f(blt)+blt*(D(f))(blt)-blt*(D(F))(blt), theta(0) = 1, theta(blt) = 0, theta1(blt) = 0;

f(0) = .5, (D(f))(0) = 1, (D(f))(5) = 0, (D(F))(5) = 0, F(5) = f(5)+5*(D(f))(5)-5*(D(F))(5), theta(0) = 1, theta(5) = 0, theta1(5) = 0

(5)
> 

L := [.1, .15, .2];

[.1, .15, .2]

(6)
> 

for k to 3 do R := dsolve(eval({Eq1, Eq2, Eq3, Eq4, bcs1}, A = L[k]), [f(eta), F(eta), theta(eta), theta1(eta)], numeric, output = listprocedure); Y || k := rhs(R[3]); YP || k := rhs(R[4]); YR || k := rhs(R[5]); YQ || k := rhs(R[6]); YA || k := rhs(R[7]) end do

Error, (in dsolve/numeric/bvp/convertsys) unable to convert to an explicit first-order system

 
> 

``

``

 

Download 34.mw

the functions about vector field plot is so terrible,

is there any method to get it beautiful, like mathematica or matlab?

more options is needed for arrow's position, length, angle and color.

is there a plan for it?

And, the scalar field plot in 2d is better than vector field plot, but in 3d, isosurface plot are still need to be enhanced.

If possible, the plots in Plotting Guide are all need improve.

Hallo. There is a package "Standard Form" (for Maple 3 & 4): http://www.cecm.sfu.ca/~wittkopf/

I am interesting if it can be converted for modern Maple 18?

 

The Maple help definition for spherical coordinates uses the triple (r, φ, θ) (Note the ordering!!) with φ in the range 0..Π and θ in the range 0..2Π. This means that the second entry in the triple is the zenith angle (latitude) and the third entry in th triple is the azimuth angle (longitude). This is confirmed by the relation to cartesian coordinates stated on the definition page as
x= r sin(φ) cos(θ)

y= r sin(φ) sin(θ)

z= r cos(φ)

However the help page for coords has spherical polars defined by the triple (u, v, w), with the relation to cartesian coordinates given as

x= u cos(v) sin(w)

y= u sin(v) sin(w)

z= u cos(w)

which suggests that this time it is the third entry in the triple (ie w) which is the zenith angle (latitude), with the second entry being the azimuth (longitude).

My simple-minded attempt to check which of these interpretations is correct is shown in the attached worksheet. This seems to confirm that the MapleHelp definitions page is correct and the help/coords page is incorrect - or am I missing something??

Download posVecChk.mw

 

 

Aslam-u-Alikum. Hope you will be fine. I have some error in the last command of the attached file. I want this type of answer

 

StressesMultiplication := Matrix(2, 2, {(1, 1) = 7, (1, 2) = 10, (2, 1) = 15, (2, 2) = 22})

n.mw

PhD (Scholar)
Department of Mathematics

f := x^2+y-z=0

f2:= y^2 +z-x = 0

after shift , solution shift too, can it be said it is invariant in parameter shift?

if not, any example to show a function which is invariant in parameter shift?

> solve(f);
/ 2 \
{ x = x, y = -x + z, z = z }
\ /
> f2 := y^2+z-x;
2
y + z - x
> solve(f2);
/ 2 \
{ x = y + z, y = y, z = z }
\ /
> f;
2
x + y - z = 0

f := x^2+y-z = 0;
originvarslist := convert(indets(f), list);
varslist := ListTools:-Rotate(convert(indets(f), list),1);
varslistm := [seq(cat(m,i),i=1..nops(varslist))];

meet difficulty in this, how to reassign to itself during the seq

f := seq(subs(originvarslist[i]=varslistm[i],f), i=1..nops(originvarslist));

f := seq(subs(varslistm[i]=varslist[i],f), i=1..nops(originvarslist));

Heaviside2.mw

I am a new user of Maple (Dec 2014).  I am trying to calculate an integral related

to mechanical loss.  Temperature is a variable in the problem (as is time), and if

I use a sinusoidal (sine or cosine) temperature-time relationship, I think all works fine.

A difficulty is that the experiments have two-hour hold times(i.e., 7200 seconds) (followed by 22 hours of sinusoidal temperature variation.)

The experiments run for several weeks or months.

I tried using Heaviside functions to model the hold times.(Constant temperature periods)

Now I am receiving errors such as " Error, (in tools/eval_foo/do) too many levels of recursion..."

Probably the Maple code is crude and/or sloppy. Most of the code is simply the setting of constants in the problem.

I will be grateful for suggestions and comments--the file is attached.  Thank you.  John B

> 

T__2 := 291.4:

> 

T__f := 342.7:

> 

B__f := 1265.:

> 

A__0 := 0.452e-10:

> 

`a__σ` := 1.6072:

> 

`b__σ` := 5.6072:

> 

mu := proc (x) options operator, arrow; .212008+0.21666e-2*x end proc:

> 

t__age := 1800.:

> 

`σ__app` := 3.91:

> 

T__0 := 303.15:

> 

D__0 := proc (x) options operator, arrow; .103172+0.633333e-2*x end proc:

> 

A__ex := B__f*T__f/(T__f-T__2)-`a__σ`*`σ__app`^2:

> 

C__ex := B__f*T__f/(T__f-T__2)-`b__σ`*`σ__app`:

> 

A__00 := A__0*exp(A__ex/T__0):

> 

NULL

> 

NumericEventHandler(invalid_operation = `Heaviside/EventHandler`(value_at_zero = 1)):

> 

tm := proc (t) options operator, arrow; `mod`(t, 86400) end proc:(temperature cycle repeats every 24 hours = 86,400 seconds)

> 

T3 := proc (x) options operator, arrow; (303.15+15.+15*sin((3/2)*Pi+2*Pi*(x-7200)/79200.))*(1-Heaviside(x)+Heaviside(x-7200)) end proc:

> 

F3 := proc (x) options operator, arrow; (Heaviside(x)-Heaviside(x-7200))*303.15 end proc:

> 

ftemp := proc (i) options operator, arrow; evalf(T3(tm(i))+F3(tm(i))) end proc:

> 

C := proc (x) options operator, arrow; A__0*exp(C__ex/ftemp(x)) end proc:

> 

`τ__0` := proc (x) options operator, arrow; sqrt(A__00^2*(t__age^mu(ftemp(x)))^2+C(x)^2*x^(2*mu(ftemp(x)))) end proc:

> 

f__0 := proc (z) options operator, arrow; int(1/`τ__0`(x), x = 0 .. z) end proc:

> 

g__0 := proc (y) options operator, arrow; D__0(ftemp(y))*exp(f__0(y)^.333333) end proc:

> 

ftim := proc (i) options operator, arrow; 1800.*i end proc:

> 

`τ__0`(20);

35860.86195

(1)
> 

f__0(20)

Error, (in tools/eval_foo/do) too many levels of recursion

 
> 

NULL

> 

NULL

> 

NULL

> 

NULL

> 

``

 

Download Heaviside2.mwHeaviside2.mw

Hi all,

I am trying to solve the following differential equation numerically using dsolve,

 

y * abs (y''') = -1

y(0) =1, y'(0) = 0, y''(0)=0

 

it works fine when tthe absolute function is not there, i.e. yy''' = -1. 

Do you have any suggestion?

First 1320 1321 1322 1323 1324 1325 1326 Last Page 1322 of 2261