Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi!

I have the following problem

> restart:with(plots): Digits := 60:
> A:=42403:
> B:=269.95:
> C:=269.95:
> J1:=0.55:
> J2:=1.02:
> a:=196200:
> b:=14342220:
> c:=1589220:
> k:=157.08/0.0875:
> sys := {A-B*diff(x(t),t)=J1*diff(x(t),t,t)+C*(x(t)-y(t)),k*(J2*diff(y(t),t,t)-C*(x(t)-y(t)))=-(a+b*(diff(y(t),t)^2)/k^2+c*diff(y(t),t,t)),  D(x)(0) = 157.08, D(y)(0)=0, D(y)(10)=157.08,  D(x)(10) = 154.98}:
> dsn1 := dsolve(sys,numeric):
Error, (in dsolve/numeric/BVPSolve) matrix is singular

I would like to extract the unique values of a few sets in a list (L1) and insert them in another list (L2) without the sets.

L1:=[{3,5},{5,4}]:

L2:=[3,5,4]:

Could anyone help me with a bit of code so this works for all values in sets in a list?

 

add(add(1,i=1..j),j=1..4);

10

(1)

S:=%add(%add(1,i=1..j),j=1..4);

%add(%add(1, i = 1 .. j), j = 1 .. 4)

(2)

value(S);

Error, (in value) unable to execute add

 

It seems that the inner add is evaluated prematurely.

 

eval(subs(%add=add, S));  # ok

10

(3)

subs[eval](%add=add, S);  # ?

Error, unable to execute add

 

 

 

A strange fact about filenames. 
Some  filenames containing the "%" character cannot be loaded by Maple.  E.g.  "%add.mw"  or "xx%abyy.mw".  But "xx%yy.mw" is OK.
This happens in Windows, but I suspect that it is not OS related.  It seems that Maple is trying to do some hex manipulations with the filename.

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?

 

 

First 727 728 729 730 731 732 733 Last Page 729 of 2218