Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

The following illustrates a way to edit code when in Standard Worksheet.  Is there a bettery way?Thanks in advance,

Les

 

Hello i want to solve the differential equation but i have these problem i don't understand  why !?

restart;
with(LinearAlgebra):
with(student):
P:=180000:
Vt:=P/m;
m:=1.4787880*10^5-t*606.06:
g:=9.81:
T:=176:
pi:=evalf(Pi):

Euler_x := -(diff(lambda3(t), t)) = 0;
Euler_y := -(diff(lambda4(t), t)) = 0;
Euler_Vx := -lambda3(t)-(diff(lambda1(t), t)) = 0;
Euler_Vy := -lambda4(t)-(diff(lambda2(t), t)) = 0;
Euler_theta := lambda1(t)*sin(theta)-lambda2(t)*cos(theta) = 0;
transversalnost:=y(t)-lambda1(t)*Vt*cos(theta)-lambda2(t)*Vt*sin(theta)+lambda2(t)*g-lambda3(t)*Vx(t)-lambda4(t)*Vy(t)=0;

transversalnost:=eval(transversalnost,t=176);

sys:={Euler_x, Euler_Vx, Euler_y, Euler_Vy, theta=arctan(lambda2(t)/lambda1(t)), diff(Vx(t),t)=Vt*cos(theta), diff(Vy(t),t)=Vt*sin(theta)-g, diff(y(t),t)=Vy(t), diff(x(t),t)=Vx(t),x(0)=0, y(0)=0.302, lambda1(0)=0, lambda2(0)=0, lambda3(0)=0, lambda4(0)=0,transversalnost, x(176)=120};

ans:=dsolve(sys, numeric, output=listprocedure):

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

thanks for your help

 

Download 1234.mw

Hi everyone,

 

I'm trying to solve the following eqauation but Maple gives me the answer (( RootOf(mexp(-_Z*(m-1))*d^2-theta+_Z*theta-theta*c*t__kj) ))

 

The equation is:

solve(mexp(-(m-1)*t__ij)*d^2-theta+theta*t__ij-theta*(sum(t__kj, k = 1 .. c))-m*eta*(diff((1-1/exp(t))^m, t)) = 0, t__ij);

 

Could you please help me??

 

What is the meaning rootOF? Is there any explicit solution to that equation??

 

Thank you for your help

Hi everyone,

I'm trying to solve the following equation and unfortunately I get this error ( Error, (in Engine:-Dispatch) invalid subscript selector ) each time I try. Could you please help me??

I will be thankful for your great help.

solve(m*exp(-(m-1)*tij)*d2-θ+θ*tij-θ*(Σ(tkj, k = 1 .. c))-m*η*(1-exp(-tij))(m-1) = 0, tij)

Good Day Everybody, I m new to maple and would like to translate the following for loop from Matlab to Maple. The FromMatlab Translater didnt work for this expression related to the matrix Q, A, B D and A1. Any help would be greatly appreciated.

Related Matlab Code:

...

Q(3,3)=2*Q(3,3);

 for i=1:length(R)

    T(1,1)=cos(R(i))^2; 

    T(2,2)=cos(R(i))^2; 

    T(1,2)=sin(R(i))^2; 

    T(2,1)=sin(R(i))^2; 

    T(3,1)=-sin(R(i))*cos(R(i)); 

    T(3,2)=sin(R(i))*cos(R(i)); 

    T(1,3)=2*sin(R(i))*cos(R(i)); 

    T(2,3)=-2*sin(R(i))*cos(R(i)); 

    T(3,3)=cos(R(i))^2-sin(R(i))^2;

    T1(1,1)=cos(R(i)); 

    T1(1,2)=-sin(R(i)); 

    T1(2,1)=sin(R(i)); 

    T1(2,2)=cos(R(i));

    

    Qk(:,:,i)=inv(T)*Q*T; 

    Qk(:,3,i)=Qk(:,3,i)/2; 

    Qk1(:,:,i)=inv(T1)*Q1*T1;

    A=A+Qk(:,:,i)*(h(i+1)-h(i)); 

    B=B+.5*Qk(:,:,i)*(h(i+1)^2-h(i)^2); 

    D=D+1/3*Qk(:,:,i)*(h(i+1)^3-h(i)^3); 

    A1=A1+Qk1(:,:,i)*(h(i+1)-h(i));

end

Thanks a lot in advance.

a system of monomials, which has 5 equations for 5 variables , have more than one solutions,

first solution is my wanted solution,

how to eliminate other unwanted solutions?

whether

1. add more equations to eliminate unwanted solutions? how to do?

or

2. edit existing system to eliminate unwanted solutions? how to do?

    a.  add extra terms to some equations?

 

what is the cause that make it having more than one solutions?

can this reason help to edit existing system?

 

i succeed with adding extra equation,a1+a2+a3+a4+a5-(6+s) =0  in 3 variables case, it calculate very fast within 1 second.

but when calculating 5 variables, it evaluating a very very long time, what is the problem

 

without extra equation a1+a2+a3+a4+a5+a6+a7-(1+2+3+4+5+s), it get result within 1 second, but after adding this extra equation, it is like dead loop,

my surface computer run with large fans noise and very hot.

restart;
H := subs(p=diff(f(q,P,t), q), 1/(2*m)*p^2 + 1/2*m*w^2*q^2) = -diff(f(q,P,t), t);
H:=subs( f(q,P,t) = f1(q) + f2(t), H);
sol:=dsolve({rhs(H)=E,lhs(H)=E});
S:=rhs(sol[1][1]+sol[1][2]);
subs(m=1, diff(S,q));
p := (E, w) -> -(1/2)*sqrt(-q^2*w^2+2*E)+(1/2)*q^2*w^2/sqrt(-q^2*w^2+2*E)-E*(sqrt(w^2)/sqrt(-q^2*w^2+2*E)+sqrt(w^2)*q^2*w^2/(-q^2*w^2+2*E)^(3/2))/(sqrt(w^2)*(1+w^2*q^2/(-q^2*w^2+2*E)));
lst := [seq(p((1/2)*E, w), E=0..5),seq(-p((1/2)*E, w), E=0 .. 5)]:
plot(lst, w= -3*Pi..3*Pi, color = black, numpoints=1000);

Q is the new coordinate which is diff(S,E)

t0 is the time when argument of solve(subs(m=1, diff(S,E))=0, t) vanish
initialq := solve(solve(subs(m=1, diff(S,E))=0, t)=0, q);

after find the initial value, how to plot with new coordinate?

dsolve({H, q=0}, f(q,P,t));

 

i try another way to do

 

restart;
H := subs(p=diff(f(q,P,t), q), 1/(2*m)*p^2 + 1/2*m*w^2*q^2) = -diff(f(q,P,t), t);
H:=subs( f(q,P,t) = f1(q) + f2(t), H);
sol:=dsolve({rhs(H)=E,lhs(H)=E});
S:=rhs(sol[1][1]+sol[1][2]);
p2 := subs(m=1, diff(S,q));

initialq := solve(solve(subs(m=1, diff(S,E))=0, t)=0, q);

H := subs(p=p2, 1/(2*m)*p^2 + 1/2*m*w^2*q^2) = -diff(f(t), t);
H := subs(w=theta(t), H);
sol := dsolve({H, q=0}, numeric, range = 0 .. 30);
odeplot(sol, [t, theta(t)], refine = 2);


Error, (in dsolve/numeric/process_input) invalid specification of initial conditions, got q = 0

 

restart;
H := subs(p=diff(f(q,P,t), q), 1/(2*m)*p^2 + 1/2*m*w^2*q^2) = -diff(f(q,P,t), t);
H:=subs( f(q,P,t) = f1(q) + f2(t), H);
sol:=dsolve({rhs(H)=E,lhs(H)=E});
S:=rhs(sol[1][1]+sol[1][2]);
subs(m=1, diff(S,q));
p := (E, theta) -> -(1/2)*sqrt(-q^2*w^2+2*E)+(1/2)*q^2*w^2/sqrt(-q^2*w^2+2*E)-E*(sqrt(w^2)/sqrt(-q^2*w^2+2*E)+sqrt(w^2)*q^2*w^2/(-q^2*w^2+2*E)^(3/2))/(sqrt(w^2)*(1+w^2*q^2/(-q^2*w^2+2*E)));
lst := [seq(p((1/2)*E, theta), E=0..5),seq(-p((1/2)*E, theta), E=0 .. 5)]:
plot(lst, theta = -3*Pi..3*Pi, color = black, numpoints=1000);

 

i plot it circle in circle, should i substitute a value to q before plot?

i guess q is velocity, is it?

why substitute E with 1/2*E?

subs(q=1, subs(m=1, diff(S,q)));
p := (E, w) -> -(1/2)*sqrt(-w^2+2*E)+(1/2)*w^2/sqrt(-w^2+2*E)-E*(sqrt(w^2)/sqrt(-w^2+2*E)+sqrt(w^2)*w^2/(-w^2+2*E)^(3/2))/(sqrt(w^2)*(1+w^2/(-w^2+2*E)));
lst := [seq(p((1/2)*E, w), E=1..5),seq(-p((1/2)*E, w), E=1 .. 5)]:
plot(lst, w = -3*Pi..3*Pi, color = black, numpoints=1000);

Hi,

 

I am working on a Windows machine. In older Maple versions, decreasing the font size for the screen display (via zoom factor) also decreased the font size for the printout. But now the printout comes with a pretty large font size and does not change when using the zoom factor. It practically makes no sense anymore to print. How can I decrease the fonts for the printout to my liking?

Thanks.

heide

I run the following working maplet:

 

 

Where "muutujad" is a procedure I defined and which returns the three inputs in the form [TF1,TF2,TF3].

It works fine, but if I insert "theta" as input, it of course stays in the string form, not Θ. Even if I copy the symbol and paste it in the textfied, it doesn't accept the symbol. Is there any way I can convert the text input to actual symbol?

Hallo everybody,

I just started to use maple and I think I need some help from more experienced users.
I would like to transform the stationary Navier Stokes equations to toroidal coordinates.


The definition of my coordinate system is as follows:
x = -r * cos(sigma)
y = cos(Theta) * ( R + r * sin(sigma) )
z = sin(Theta) * ( R + r * sin(sigma) )


I tried to define the coordinate system and transform each term of the equation:

div( rho * CC) = -grad(p) + div(Tau)

I can transform the pressure gradient. However, I get an error for the divergence of the tensors.
Could someone please give me a hint on how to get the divergences?

Thanks!
Uwe



My code is printed below:

restart: with(plots): with(LinearAlgebra): with(VectorCalculus): with(linalg):

#torus defintion
x := -r*cos(sigma);
y := cos(Theta)*(R+r*sin(sigma));
z := sin(Theta)*(R+r*sin(sigma));
R := .35;
AddCoordinates(torus1[r, sigma, Theta], [cos(Theta)*(R+r*sin(sigma)), sin(Theta)*(R+r*sin(sigma)), -r*cos(sigma)]);
SetCoordinates(torus1[r, sigma, Theta]);

#pressure gradient
PressureGradient := Gradient(p(r, sigma, Theta, t));

#left hand side
c := vector(3, ([Cr, Ctheta, Cx])(r, sigma, Theta, t));
rhoCC := rho*multiply(c, transpose(c));
LHS := Divergence(rhoCC)

Question regarding solving the equation systems. 

See maple file for equations. 

 

Equation_questions_.mw

Are there any examples of network solutions such as mine systems in Maple.
I wrote in the Maple system of partial differential equations describing the process of filtration combustion.
I'm a novice. I do not quite understand how to solve it.
Online a lot of "simple" examples. I need something very similar to my case.

Model03.mw

Dear collagues

Hi,

I write a code to solve a system of ODE. It solve the ODES in a wide range of parameters but as I decrease NBT below 0.5, it doesnt converge. I do my best but I couldn't find the answer. Would you please help me? Thank you

Here is my code and it should be run for 0.1<NBT<10. the value of NBT is input directly in res1.

restart:
EPSILONE:=1000:
Digits:=15:

a[mu1]:=5.45:
b[mu1]:=108.2:
a[k1]:=1.292:
b[k1]:=-11.99:




rhop:=4175:
rhobf:=998.2:
mu1[bf]:=9.93/10000:
k1[bf]:=0.597:

rhost(eta):=1-phi(eta)+phi(eta)*rhop/rhobf;
k:=unapply(k1[bf]*(1+a[k1]*phi(eta)+b[k1]*phi(eta)^2),eta);


eq1:=(diff(u(eta), eta))*a[mu1]*(diff(phi(eta), eta))+2*(diff(u(eta), eta))*b[mu1]*phi(eta)*(diff(phi(eta), eta))+((diff(u(eta), eta))+(diff(u(eta), eta))*a[mu1]*phi(eta)+(diff(u(eta), eta))*b[mu1]*phi(eta)^2)/(eta+EPSILONE)+diff(u(eta), eta, eta)+(diff(u(eta), eta, eta))*a[mu1]*phi(eta)+(diff(u(eta), eta, eta))*b[mu1]*phi(eta)^2+1-phi(eta)+phi(eta)*rhop/rhobf:
eq2:=(1+a[k1]*phi(eta)+b[k1]*phi(eta)^2)*(diff(T(eta), eta))/(eta+EPSILONE) + (a[k1]*(diff(phi(eta), eta))+2*b[k1]*phi(eta)*(diff(phi(eta), eta)))*(diff(T(eta), eta))+(1+a[k1]*phi(eta)+b[k1]*phi(eta)^2)*(diff(T(eta), eta, eta));
eq3:=diff(phi(eta),eta)+phi(eta)/(N_bt*(1+gama1*T(eta))^2)*diff(T(eta),eta):

eq2:=subs(phi(0)=phi0,eq2):
eq3:=subs(phi(0)=phi0,eq3):


eval(dsolve({eq3,phi(1)=phiv},phi(eta)),(T)(1)=1):
Phi:=normal(combine(%)):
Teq:=isolate(eval(eq2,Phi),diff(T(eta),eta)):
ueq1:=eval(eq1,Phi)=0:
ueq2:=subs(Teq,ueq1):


lambda:=0;
Ha:=0;
N_bt:=cc*NBT+(1-cc)*0.8;
kratio:=k1[p]/k1[bf]:






GUESS:=[T(eta) =0.0001*eta, u(eta) =0.1*eta, phi(eta) = 0.3*(eta-1)^4];
res1 := dsolve(subs(NBT=0.48,gama1=0.2,phiv=0.06,{eq1,eq2,eq3,u(0)=lambda*D(u)(0),D(u)(1)=0,T(0)=0,phi(1)=phiv,T(1)=1}), numeric,method=bvp[midrich],maxmesh=4000,approxsoln=GUESS, output=listprocedure,continuation=cc):
G0,G1,G2:=op(subs(subs(res1),[phi(eta),u(eta),diff(T(eta),eta)])):

masst:=evalf(int((1-G0(eta)+G0(eta)*rhop/rhobf)*G1(eta), eta = 0..1));
heatt:=(1+a[k1]*G0(0)+b[k1]*G0(0)^2)*G2(0);

plots:-odeplot(res1,[[eta,T(eta)]],0..1,legend=[T],color=["Black"],linestyle=Solid,axes=boxed,thickness=3);
plots:-odeplot(res1,[[eta,u(eta)]],0..1,legend=[u],color=["Black"],linestyle=Solid,axes=boxed,thickness=3);
plots:-odeplot(res1,[[eta,phi(eta)]],0..1,legend=[phi],color=["Black"],linestyle=Solid,axes=boxed,thickness=3);

>
>

 

Thank you

 

Amir

 Maple code when open saved maple sheet?

and keep it can run code and show latest result after open

i mean user can not extend or find code or display code in maple sheet , just can run result

First 188 189 190 191 192 193 194 Last Page 190 of 2218