Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

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?

I have solved ODE's with either i.c. or b.c. (mechanics stuff) where the results were in terms of expressions, not functions.  I could plot these expressions, substitute values in for parameters, etc. 

Then I thought that the real way to solve an ODE or system of ODE's was to define functions.  I wanted this to be in three levels: the solutions in generality, the solutions with i.c./m.c. applied, and then further with the parameter values defined. 

So far, no joy.  Lots of confusion--input eqns as sequence, list, set?  I looked on the Maple help page, thought I was doing things right. I even tried out "union" for the ode's and the ic's.

The code is below; statement (11) produces an error. Yes, I am using Maple 18, even though the file says Maple 15.  I'd like to solve the 4-ODE system at the three levels listed above, and then (if possible), plot the result! Am I asking too much?  Should I be using MapleSim or some other product instead?

 

Thanks for any and all help!

 

robert w.


NULL

restart

assume(m1 > 0);

eqn1 := diff(z1(t), t) = z2(t);

diff(z1(t), t) = z2(t)

(1)

eqn2 := diff(z2(t), t) = -(k1+k2)*z1(t)/m1-(c1+c2)*z2(t)/m1+k2*z3(t)/m1+c2*z4(t)/m1;

diff(z2(t), t) = -(k1+k2)*z1(t)/m1-(c1+c2)*z2(t)/m1+k2*z3(t)/m1+c2*z4(t)/m1

(2)

eqn3 := diff(z3(t), t) = z4(t);

diff(z3(t), t) = z4(t)

(3)

eqn4 := diff(z4(t), t) = k2*z1(t)/m2+c2*z2(t)/m2-k2*z3(t)/m2-c2*z4(t)/m2;

diff(z4(t), t) = k2*z1(t)/m2+c2*z2(t)/m2-k2*z3(t)/m2-c2*z4(t)/m2

(4)

eqns := eqn1, eqn2, eqn3, eqn4;

diff(z1(t), t) = z2(t), diff(z2(t), t) = -(k1+k2)*z1(t)/m1-(c1+c2)*z2(t)/m1+k2*z3(t)/m1+c2*z4(t)/m1, diff(z3(t), t) = z4(t), diff(z4(t), t) = k2*z1(t)/m2+c2*z2(t)/m2-k2*z3(t)/m2-c2*z4(t)/m2

(5)

var := z1(t), z2(t), z3(t), z4(t);

z1(t), z2(t), z3(t), z4(t)

(6)

ic1 := z1(0) = -2;

z1(0) = -2

(7)

ic2 := z2(0) = 0;

z2(0) = 0

(8)

ic3 := z3(0) = 1;

z3(0) = 1

(9)

ic4 := z4(0) = 0;

z4(0) = 0

(10)

ics := ic1, ic2, ic3, ic4;

z1(0) = -2, z2(0) = 0, z3(0) = 1, z4(0) = 0

(11)

dsolve(`union`(eqns, ics), var)

Error, invalid input: `union` received diff(z1(t), t) = z2(t), which is not valid for its 1st argument

 

var;

z1(t), z2(t), z3(t), z4(t)

(12)

data:=(m1=1,m2=2,m3=1,c1=0,c2=0,c3=0,k1=5,k2=2,k3=2);

m1 = 1, m2 = 2, m3 = 1, c1 = 0, c2 = 0, c3 = 0, k1 = 5, k2 = 2, k3 = 2

(13)

eqnsev := subs(data, eqns);

diff(z4(t), t) = z1(t)-z3(t)

(14)

NULL


Download mae340_state_space_4-ode_system.mw

how to shift shift(1,[x,y,z]) = [y,z,x]

shift(2,[x,y,z]) = [z,x,y]

shift(3,[x,y,z]) = [x,y,z]

First 1307 1308 1309 1310 1311 1312 1313 Last Page 1309 of 2248