Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I use the command 'labels = [x, Im(f)]'

to change the labels of my plots, but this time I need to put some "different" characters. i. e., \^{c} (in LaTeX notation).

How can I do this on Maple?

I need a help from someone who knows the GRTensor commands.

How do I write the last two terms of this equation of motion?How do I define Lagrangian matter, too?

My master said that I will do these calculations in the classic worksheet  maple18.

KGmn= (1/2) Tmn + (C0/2) Rabgl Tag Tbl gmn+ 3 C0 Rbrs(mTn)b Tsr – C0 Lm Rab Tab gmn + C0 Rab Tab Tmn+ 2 C0  Lm Rmrns Trs + C0ar(T(mr Tn)s)- C0sr(Tsr Tmn)

Lm =-(1/4) Fmn Fmn 

Hi,

I can’t export a csv file.
The 'export' command returns a numeric value ?QuestionDataExport2.mw

 

How to sketch 3D graph finite string problem of wave equation in partial differential equation using maple?

utt = 4uxx

boundary conditions : u (0,t) = (5,t) = 0 , t>0 ,

initial conditions : u (x,0) = f(x) = { 0, 0<x<4      , (5-x) , 4<x<5 

                         u(x,0) = 0 , 0<x<5

 

how to sketch 3D graph for solution of the corresponding partial differential equations ?? 

I thought in Maple the standard was to use _C1, and _C2, etc... for constants in the solutions returned.

Sometimes Maple mixes _C1 and c[2] in the same result. Is this common, to be expected sometimes and is OK? I noticed this only recently. 

I was thinking may be some part of Maple code still was not updated to use _C1 notation? Here is an example

restart;
pde:=diff(u(x,t),t)+ diff( u(x,t),x )^3 + 6 * u(x,t)* diff(u(x,t),x) = 0;
sol:=pdsolve(pde,u(x,t));

which gives

sol := u(x, t) = -(3/2)*_C1^2+3*(t*_c[2]+x)*_C1-(3/2)*(t*_c[2]+x)^2-(1/6)*_c[2]

With latest Physics updates  268

Is there an option, like AllSolutions used with solve, so that pdsolve would return all solutions to a PDE when it is nonlinear?

I looked at pdsolve help and do not see a HINT that looks like might do this.

For example, this PDE, Maple returns one solution. But Mathematica returns 2 solutions

restart;
pde:= diff(u(x,t),t) = diff(u(x,t),x$5)+10*diff(u(x,t),x$3)*u(x,t)+25*diff(u(x,t),x$2)*diff(u(x,t),x)+
             20*u(x,t)^2*diff(u(x,t),x);
sol:=pdsolve(pde,u(x,t));

#sol := u(x, t) = -12*tanh(176*_C2^5*t+_C2*x+_C1)^2*_C2^2+8*_C2^2

But there is another solution

sol1:=u(x,t)=-(1/2)* _C1^2*(-2 + 3*tanh(x*_C1+ t*_C1^5 + _C2)^2)
pdetest(sol1,pde)
#0

Here is another example. Maple returns one solution and Mathematica 7 solutions

restart;
pde:= diff(u(x,t),t)= u(x,t)*(1-u(x,t))+ diff(u(x,t),x$2);
sol:=pdsolve(pde,u(x,t));

#sol := u(x, t) = (1/4)*tanh(-5*t*(1/12)+(1/12)*sqrt(6)*x+_C1)^2-
              (1/2)*tanh(-5*t*(1/12)+(1/12)*sqrt(6)*x+_C1)+1/4

But there are other solutions

pde = D[u[x, t], t] == u[x, t] (1 - u[x, t]) + D[u[x, t], {x, 2}];
DSolve[pde, u[x, t], {x, t}]

I've tested some (not all) of these 7 solutions in Maple using pdetest and Maple agrees they are solutions:

restart;
pde:= diff(u(x,t),t)= u(x,t)*(1-u(x,t))+ diff(u(x,t),x$2);
sol:=pdsolve(pde,u(x,t));
with(MmaTranslator);
sol2:=FromMma(`-(1/4) (-3 + Tanh[(5 t)/12 - (I x)/(2 Sqrt[6]) - C[3]]) (1 + 
   Tanh[(5 t)/12 - (I x)/(2 Sqrt[6]) - C[3]])`);
pdetest(u(x,t)=sol2,pde);
#0

I tried setting 

       _AllSolutions:=true

But it had no effect. Is there other options?

 

Hi experts,

I want to compute the following formula using Maple but It returns the formula of integration only.

int(sin(x)/(a*b+a^2*sin(x)^2-d^2*cos(x)^2)(c+cos(x)), x = 0 .. x)

Could you please help to give me some suggestion about how to solve it?

Thank a lot.

Hey there,

I'm trying to numerically intergrate a function s(K,i,j) dK using runge kutta over a 2D grid of i,j values. Essentialy, performing the same sort of integral many different times for slightly different combinations of i and j. The function is more or less gaussian, and so the bulk of the result will come from the values of K around the peak of said gaussian. For some combinations of i and j, the function seems to have a singularity on the right edge of the gaussian peak, which causes my script to spit out an error, telling me the calculation cannot be performed further to the right past the singularity. Now, like i said before, the singularity is on the very edge of the gaussian and therefore I am perfectly happy to stop the integration before the singularity, because anything past it wont contribute very much to the result.

How can I use dsolve events to halt my integration just before hitting the singularity?

RK := (i, j) -> dsolve({diff(n(K), K) = K*s(K, a[i], b[j]), n(0) = 0}, numeric, method = rkf45)

 

Hello,

I have this error I'm not sure how to solve

restart;

`assuming`([simplify(int(ln(1+x)^3/(x+a), x = 0 .. 1))], [a > 0]);

combine(expand((eval(%, a = I)+eval(%, a = -I))*(1/2)))

 

What is the precise problem here?

Hello guys, I'm a new user of Maple and I'd love some help.

I'm trying to solve a cubic equation with four variables, and plot the imaginary part of 'w' as a function of 'x' for different values of 'y' and 'z'. When I ask for all the equation roots, the result is huge.

I want to know if there's an "easier" way to select each root of the equation and make it a function without having to "select element" and copy/paste, because I've tried this way and it's not working.

I know this is a stupid question, but I could really use some help.

Thanks for your time!

 

I don't quite understand the behavior of PDEtools[declare].  My reading of the documentation is that PDEtools[declare](y(t)) tells Maple that y is a function of t, and therefore y(t) is displayed as y and the derivative of y is displayed as yt.  I did not expect other variables to be similarly affected but apparently they are.  For instance, in the worksheet below, why is the derivative of p displayed as ps?

restart;

The normal display of derivatives:

diff(y(t),t);
diff(p(s),s);

diff(y(t), t)

diff(p(s), s)

Declare y as a function of t:

PDEtools[declare](y(t));

` y`(t)*`will now be displayed as`*y

diff(y(t),t);    # this is displayed in subscript notation, as expected
diff(p(s),s);    # why is this displayed in subscript notation?

diff(y(t), t)

diff(p(s), s)

 

Download mw.mw

For a very simple sheet:

restart;

with(Statistics);

X := RandomVariable(Uniform(0, 1))

Sample(X, 2)

Maple always show: 0.8147236863931789, 0.9057919370756192 when I click the "execute the entire sheet." on the top.

While, if I only execute Sample(X, 2), then it seems generate random samples.

Why? is this because of the " Pseudo-random algorithm " built in Maple?

 

 

I'm trying to execute the linked code but i am having the following error:

Error, (in sombrea2) cannot determine if this expression is true or false: -(1/4)*105^(1/2) <= (1/4)*105^(1/2)
 

The entire procedure is downloadable here: http://www.mediafire.com/file/llcfhydpjy8tken/maple17.mw/file

If someone can help me to find a solution I'll be very thankful.

I was working on a project about optimal strategies for HIV treatment, models used from [Butler, Kirschner, and Lenhart] 1997. This model explains the spread of HIV viruses in the human body, where there is one control function u(t).

My work is following pontryagin maximum principle. But i have a problem solving the differential equation system, where there are 6 differential equations with 6 initial conditions. Everything works normally and I get a numerical solution for the system

restart;
with(linalg);
with(DEtools);
with(plots);

Model declaration

dx[1] := -T*V*k*u+B*T*r-T*m1+A; dx[2] := T*V*k*u-Ti*m2; dx[3] := N*Ti*m2-V*m3; H := A*T-(1-u)^2+add(dx[i]*L[i], i = 1 .. 3); satu := -(diff(H, T)); dua := -(diff(H, Ti)); tiga := -(diff(H, V)); empat := diff(H, L[1]); lima := diff(H, L[2]); enam := diff(H, L[3])

eq1 := diff(L1(t), t) = -A-(-V(t)*k*u(t)+B*r-m1)*L1(t)-u(t)*k*V(t)*L2(t); eq2 := diff(L2(t), t) = -N*m2*L3(t)+m2*L2(t); eq3 := diff(L3(t), t) = T(t)*k*u(t)*L1(t)-T(t)*k*u(t)*L2(t)+m3*L3(t); eq4 := diff(T(t), t) = -T(t)*V(t)*k*u(t)+B*T(t)*r-T(t)*m1+A; eq5 := diff(Ti(t), t) = T(t)*V(t)*k*u(t)-Ti(t)*m2; eq6 := diff(V(t), t) = N*Ti(t)*m2-V(t)*m3

Value for parameter

 u(t):=-1/(2)*L1(t)*k*V(t)*T(t)+1/(2)*L2(t)*k*V(t)*T(t)+1; s:=10;  m1:=0.02;  m2:=0.5;  m3:=4.4;  r:=0.03;  Tm:=1500;  k:=0.000024;  N:=300;    A:=1;  B:=1-(T(t)+Ti(t))/(Tm): 

Numerical Solution with BVP
 

fcns := {L1(t), L2(t), L3(t), T(t), Ti(t), V(t)}; a := dsolve({eq1, eq2, eq3, eq4, eq5, eq6, L1(20) = 0, L2(20) = 0, L3(20) = 0, T(0) = 800, Ti(0) = 0.4e-1, V(0) = 1.5}, fcns, type = numeric, method = bvp[midrich])

The plot

odeplot(a, [[t, u(t)], [t, V(t)]], 0 .. 20, numpoints = 1000)

Output

Blue: V(t)
Red: u(t)
Based on graphs v (t) and u (t) have negative values, whereas in fact v (t) shows many viruses where it is never negative (this is irrational) and u (t) is limited in interval [0,1]. My question are:
How to provide positive assumptions for the system solution?
So v (t), T (t), Ti (t) are never negative?

Hello.

Can you please tell how the guess vector is defined in Newton's method in "fsolve" if not set initial interval for unknowns? Maybe someone knows what "norm of errors", "new norm" and "incr" in "infolevel[fsolve]" are?

Thanks!

First 606 607 608 609 610 611 612 Last Page 608 of 2097