Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi,

How to animate a plot with Shadebetween command?

Thanks

AnimationShadebetween.mw

Hi, I am currently working with Maple on school, and I wanted to use the diff(); function to find the partial derivative with respect to x. Anyways; I noticed when I was not using the multiplication sign I got the answer 0 as seen below:

diff(2*sqrt(xyz), x) = 0

But when I used the multiplication sign as seen (x*y*z instead), I got the correct answer.

diff(2*sqrt(x*y*z), x) = y*z/sqrt(x*y*z)

Why so?

 

Thanks,

Adrian

Hello Everyone

I have solved the equation below numerically and now I want to integral p(x)

ode := diff((b+5)*((1/6)*(diff(p(x), x))*h^3+(1/2)*c*h^2)/(b+2)+De^2*((1/10)*(diff(p(x), x))^3*h^5+c^2*(diff(p(x), x))*h^3+(1/2)*c*(diff(p(x), x))^2*h^4+c^3*h^2)/(b+2), x)+diff(h, x) = 0

ics := p(0) = 0, p(1) = 0;
                   ics := p(0) = 0, p(1) = 0
solnum := dsolve({ics, ode}, numeric, method = bvp, maxmesh = 600);
                solnum := proc(x_bvp)  ...  end;
odeplot(solnum, 0 .. 1)

but when I write evalf(int(p,0..1)) I get this result:int(p,0..1). What should I do to have the value?

Dear Users!

Hope you would be fine with everything. I want to evaluate an expression (diff(u(y, t), y)+diff(diff(u(y, t), y), t)) for various values of b at y = 0, t=1. Please help me to evaluate it. Thanks in advance,

restart; with(plots); a := .7; L := 8; HAA := [0, 2, 5, 10];

for i to nops(HAA) do

b := op(i, HAA);

PDE1[i] := diff(u(y, t), t) = diff(u(y, t), y, y)+diff(diff(u(y, t), y, y), t)-b*u(y, t)+T(y, t);

PDE2[i] := diff(T(y, t), t) = (1+(1+(a-1)*T(y, t))^3)*(diff(T(y, t), y, y))+(a-1)*(1+(a-1)*T(y, t))^2*(diff(T(y, t), y))^2+T(y, t)*(diff(T(y, t), y, y))+(diff(T(y, t), y))^2;

ICandBC[i] := {T(L, t) = 0, T(y, 0) = 0, u(0, t) = t, u(L, t) = 0, u(y, 0) = 0, (D[1](T))(0, t) = -1};

PDE[i] := {PDE1[i], PDE2[i]}; pds[i] := pdsolve(PDE[i], ICandBC[i], numeric)

end do;
 

 

Here's the recurrence equation I'm trying to solve and the weird answer that Maple 2018 gives me on Windows 10.

Out of curiosity, I started my old computer with  Windows 2000 and Maple V release V (1997 version).
I typed the same lines as before. I got the answer I was looking for immediately.
Answer which I easily improved.
What's happening ?     What am I doing wrong ?

I am often excited by the the latest versions of Maple but recently I have been rather surprised by the things it cannot do.
When that happens, I remember the story of the guy who wants to sell a great watch to another guy.
"This watch is full of new gadgets:
 gps, heart rate, body temperature, outside temperature, micro camera, voice recorder, email, internet ...
 
Only one problem . It doesn't tell time . "
 
Best regards .
 
Réjean

Hi,

I would like to determine if some lengthy expression F is linear in one of its inderteminates X.
 I use to use type(F, linear(X)) to do this but I've just found that if F is piiecewise defined, then type(F, linear(X)) returns false even if E is linear in X...
For instance, let  F := a*X+piecewise(Y<0, X, b)
then type(F, X) returns false.

I do not pretend it is a bug: at first sight I would say that F is linear with respect to X but maybe the notion of linearity with respect to an indeterlinate must be interpretated as "linear on each branch" ?

For the moment I've circumvented the problem by doing this :
dF := diff(F, X):
has(dF, X):
# returns {\emptyset} if F is linear in X
 

But, as I said, F can be a rather lengthy expression invoking a lot of piecewise constructors, and I don't think that computing dF is an efficient way to do the job.

Do you have a better idea to proceed?

Thanks in advance

Greeting for all members in Mapleprimes

could I have a simple procedure to plot the following figure

See the attached file.

Amr

Squares.mw

If

p_{x} = a*p + u*q;    (1)

q_{x} = -conjugate(u)*p - a*q;  (2)     # where a is complex parameter, p_{x} mean derivative of p w.r.t x

Define, u=p^2+conjugate(q)^2,  (3)  

Now take the derivative of (3) w.r.t x and by using (1) and (2), we get

 u_{x}=2(a*p^2 - conjugate(a)*conjugate(q)^2) + 2*(p^2 + conjugate(q)^2)*(p*q - conjugate(p)*conjugate(q)).  (4)

How to calculate the results (4) on maple?

123.mw

Hollo evreyone,

Can you help me to plot the functions given by the pdf attached file.

N.B : One can take theta=pi.

Best regardsplot.pdf

I have a list and I would like to generate all the permutations of that list deterministically and sequential. All I have found is shuffle which may duplicate results(of course I could track this to avoid dups but it should be overkill and slow and consume lots of memory).

 

I’m starting a large project in education for which I can see great potential in the use of the “MapleCloud”.  For many of the students, the ability to see information on their phone is a game-changer. Hence while my students do have access to Maple on their computers, they are more willing to check out a worksheet if they can view it in a browser.

Unfortunately, in the little time that I have started using MapleCloud, and sharing my work with others, numerous issues have arisen. Some examples:
  * the file system is too simplistic and can be overwhelmed easily as I add content;
  * the group sharing system is too limited – one must log on, which is not true for worksheets;
  * the display of the mathematics is sufficiently quirky that it is not easy to read;
  * the hiding of input mathematics appears not to work;
  * plots, animations and the output of the Explore function fails too frequently.

So, my questions:
  1) are you using MapleCloud, and
  2) if so, for what?
  3) And if you are using MapleCloud, do you have similar problems?
  4) Have you developed solutions that you would be willing to share.

If there is no interest, I’ll look in another direction. But if there is sufficient interest, I would hope Maplesoft notices and works to correct and improve. Some of it may be my own failing to understand Maple, but instead of overwhelming MaplePrimes with questions, I would rather converse with similar interested folks.

 

Dear Users! I solved a PDE by using the following code. 
restart;a := 1:b:= 2:l:= 1:alpha[1]:= 1:alpha[2]:= 3:
  syspde:= [diff(u(x, t), t)-a+u(x, t)-u(x, t)^2*v(x, t)-alpha[1]*(diff(u(x, t), x$2)) = 0, diff(v(x, t), t)-b+u(x, t)^2*v(x, t)-alpha[2]*(diff(v(x, t), x$2)) = 0];
Bcs:= [u(x,0)=1,v(x,0)=1,D[1](u)(-l, t) = 0,D[1](u)(l, t) = 0,D[1](v)(-l, t) = 0,D[1](v)(l, t) = 0];
  sol:=pdsolve(syspde, Bcs, numeric);
  p1:=sol:-plot3d( u(x,t), t=0..1, x=-1..1, color=red);
  p2:=sol:-plot3d( v(x,t), t=0..1, x=-1..1, color=blue);
Now I want to see the value of u(x, t)+diff(u(x, t), x)+diff(u(x, t), t) when x=0 and t=1. Please help me to fix the problem. Thanks in advance. 

with(RegularChains):
with(ChainTools):
with(MatrixTools):
with(ConstructibleSetTools):
with(ParametricSystemTools):
with(SemiAlgebraicSetTools):
with(FastArithmeticTools):
R := PolynomialRing([x,y,z,a,b]):
sys := [x^2 + y^2 - x*y - 1 = 0, y^2 + z^2 - y*z - a^2 = 0, z^2 + x^2 - x*z - b^2 = 0,x > 0, y > 0, z > 0, a - 1 >= 0, b-a >= 0, a+1-b > 0]:

dec := RealTriangularize(sys,R): # very slow
Display(dec, R);

dec := LazyRealTriangularize(sys,R): # it is faster
dec2 := value(dec): # very slow
value(dec2); 

find a , b to satisfy sys have real solution

expect  one of solution is below, but above function are very slow, load a very time still no result, where is wrong?

R1 = a^2+a+1-b^2;
R1 = a^2-1+b-b^2;

[R1 > 0, R2 > 0]


 

When the Explore command results in a slider, for example like this:

Explore(plot(x^2 + a, x = 0 .. 10), a = 10.5000000000 .. 11.5000000000)

The value shown next to the slider has only one decimal place, despite the fact that the slider can be easly placed at values in between.  Is there a way to change the number of decimal places shown on the slider label for the Explore command?

Thanks.

Hello
    In this example, we have the KdV equation    
         t] - 6 uux] + xxx] = 0                
    I would like to find the Lax pair for the KdV equation, which are    
               Lψ=λψ                
               ψ[t] = Mψ                
        
              Lt+ML-LM = 0  called a compatibility condition               
    So, I will start from this purpose    
    Then we will assume M in the form   
    will assume M in the form   
              M := a3*Dx^3+a^2+a1*Dx+a0              
    thenb using M and L in the for L[tL-LM = 0can find   
      Dx^5+( ) Dx^4+( ) Dx^3+( ) Dx^2+( ) Dx+( )=0              
    then wean find a_i =0,1,2,3   
  In the following maple code to do that 
  my question is    
   .How I canoue the soluo get a_i2,3 usinmaple code  
    any maple packge to find Lax pair for PDE -  


 

restart; with(DEtools); with(PDEtools)

     in this exampile we have KdV equation

      u[t]-6*uu[x]+u[xxx] = 0

    I would likeind the Lax pair for the KdV equation, which are

       Lψ=λψ

    psi[t] = M*psi

   where``

    L[t]+ML-LM = 0    called  apatibility  condition

    So, I  will start this purpose

     L:=-Dx^2+u;

    then we will assume M the m

    Ma3*Dx^3+a2*Dx^2+Dx+a0

    then busing in the form L[t]+ML-LM = 0 can find

  ( ) Dx^5+( ) Dx^4+( ) Dx^3+( ) Dx^2+( ) Dx+( )=0

 then we can find a_i ;i=,2,3

  

the fllowile code to

 my queion is ;

  1) How I can continue the solution  to get a_i ;i=0,1,2,3 using maple code  ?

  2) isir any maple packge to find  Lax pair for PDE ?

 

alias(u = u(x, t)); declare(u(x, t)); alias(a3 = a3(x, t)); declare(a3(x, t)); alias(a2 = a2(x, t)); declare(a2(x, t)); alias(a1 = a1(x, t)); declare(a1(x, t)); alias(a0 = a0(x, t)); declare(a0(x, t))

u

 

` u`(x, t)*`will now be displayed as`*u

 

u, a3

 

` a3`(x, t)*`will now be displayed as`*a3

 

u, a3, a2

 

` a2`(x, t)*`will now be displayed as`*a2

 

u, a3, a2, a1

 

` a1`(x, t)*`will now be displayed as`*a1

 

u, a3, a2, a1, a0

 

` a0`(x, t)*`will now be displayed as`*a0

(1)

_Envdiffopdomain := [Dx, x]

[Dx, x]

(2)

L := -Dx^2+u

-Dx^2+u

(3)

M := Dx^3*a3+Dx^2*a2+Dx*a1+a0

a3*Dx^3+a2*Dx^2+a1*Dx+a0

(4)

 

 

 

LM := expand(mult(L, M))

-a3*Dx^5-2*Dx^4*(diff(a3, x))-a2*Dx^4+Dx^3*u*a3-Dx^3*(diff(diff(a3, x), x))-2*Dx^3*(diff(a2, x))-Dx^3*a1+Dx^2*u*a2-Dx^2*(diff(diff(a2, x), x))-2*Dx^2*(diff(a1, x))-Dx^2*a0+Dx*u*a1-Dx*(diff(diff(a1, x), x))-2*Dx*(diff(a0, x))+u*a0-(diff(diff(a0, x), x))

(5)

ML := expand(mult(M, L))

-a3*Dx^5-a2*Dx^4+Dx^3*u*a3-Dx^3*a1+3*Dx^2*a3*(diff(u, x))+Dx^2*u*a2-Dx^2*a0+3*Dx*a3*(diff(diff(u, x), x))+2*Dx*a2*(diff(u, x))+Dx*u*a1+a3*(diff(diff(diff(u, x), x), x))+a2*(diff(diff(u, x), x))+a1*(diff(u, x))+u*a0

(6)

Commutator := simplify(ML-LM)

a3*(diff(diff(diff(u, x), x), x))+(3*Dx*a3+a2)*(diff(diff(u, x), x))+diff(diff(a0, x), x)+Dx*(diff(diff(a1, x), x))+Dx^2*(diff(diff(a2, x), x))+Dx^3*(diff(diff(a3, x), x))+(3*Dx^2*a3+2*Dx*a2+a1)*(diff(u, x))+2*Dx^4*(diff(a3, x))+2*Dx^3*(diff(a2, x))+2*Dx^2*(diff(a1, x))+2*Dx*(diff(a0, x))

(7)

sol := diff(L, t)-Commutator = 0

diff(u, t)-a3*(diff(diff(diff(u, x), x), x))-(3*Dx*a3+a2)*(diff(diff(u, x), x))-(diff(diff(a0, x), x))-Dx*(diff(diff(a1, x), x))-Dx^2*(diff(diff(a2, x), x))-Dx^3*(diff(diff(a3, x), x))-(3*Dx^2*a3+2*Dx*a2+a1)*(diff(u, x))-2*Dx^4*(diff(a3, x))-2*Dx^3*(diff(a2, x))-2*Dx^2*(diff(a1, x))-2*Dx*(diff(a0, x)) = 0

(8)

collect(sol, [Dx, x])

-2*Dx^4*(diff(a3, x))+(-(diff(diff(a3, x), x))-2*(diff(a2, x)))*Dx^3+(-3*a3*(diff(u, x))-(diff(diff(a2, x), x))-2*(diff(a1, x)))*Dx^2+(-2*a2*(diff(u, x))-3*a3*(diff(diff(u, x), x))-(diff(diff(a1, x), x))-2*(diff(a0, x)))*Dx-a1*(diff(u, x))-a2*(diff(diff(u, x), x))-a3*(diff(diff(diff(u, x), x), x))-(diff(diff(a0, x), x))+diff(u, t) = 0

(9)

 

 

 

 

``

NULL


 

Download find_lax_pair.mw

1 2 3 4 5 6 7 Last Page 1 of 1630