Maple 2018 Questions and Posts

These are Posts and Questions associated with the product, Maple 2018

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

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

I want to calculate (partialH/partialq). But I encountered an error when I evaluate it.

restart;
with(PDEtools);
with(linalg);
alias(q = q(x, t), p = p(x, t));
                              q, p
H := lambda*p*q+conjugate(lambda)*conjugate(p)*conjugate(q)+(1/2*(p^2+conjugate(q)^2))*(conjugate(p)^2+q^2);
                                      
diff(H, q(x, t));

maple shows error:

Error, invalid input: diff received q(x, t), which is not valid for its 2nd argument
How to fix this issue?

 

I want to find the numbers a, b, c, d, t, m, n of this equation. I tried
 

restart:
 k := 0:
 for a to 10 do
for b to 10 do 
for c to 10 do 
for d to 10 do 
for t to 2 do 
for m to 10 do
for n to 10 do 
if a > c and igcd(a, b, c, d, t, m, n) = 1 and abs(b)+abs(d)-n <> 0 then X := [solve(abs(a*x+b)+abs(c*x+d)-t*x^2+m*x-n = 0)]; if nops(X) = 6 and type(X[1], integer) and type(X[2], integer) and type(X[3], integer) and type(X[4], integer) and type(X[5], integer) and type(X[6], integer) then k := k+1; L[k] := [a, b, c, d, t, m, n, X[]] 
end if end if
end do end do end do end do end do end do end do; 
L := convert(L, list); 
k; 
L;

I can not get the result for along time. How can I get the result and reduce the time?

I want to define the co-ordianates (phi, PI, ....)  as functions of some variable eg:- x,y.

 

,Hello dears

I have the following function

where L=10 and I want to plot this function, so I use 

But it does not work.

Is there any help.

Amr

I am trying to find six integer numbers a, b, c, d, n, p so that this equation
abs(a*x+b)+abs(c*x+d)+x^2+n*x+p = 0
has 6 integer solutions are 1, 2, 3, 4, 5, 6. I tried
f:=x-> abs(a*x+b)+abs(c*x+d)+x^2+n*x+p;
solve([f(1) = 0, f(2) = 0, f(3) = 0, f(4) = 0, f(5) = 0, f(6) = 0], [a, b, c, d, n, p])


This equation has no solution. Is there six integer numbers a, b, c, d, n, p so that this equation has 6 integer solutions?

I have just found one solution is
solve(abs(-2*x+5)+abs(-2*x+9)-x^2+7*x-16 = 0, x);

With Mathematica, I see at here 
https://mathematica.stackexchange.com/questions/212808/find-integers-a-b-c-d-m-n-p-so-equation-has-six-distinct-solutions

Maple programming is certainly full of pitfalls for the unwary and the inexperienced as my recent difficulty demonstrates.

I have encountered disconcerting behaviour in the way the Maple type system treats tables and names as a result of last name evaluation.  In my case, it created a rather difficult debugging session in a procedure I was writing.

Specifically, in a procedure where a defined table is an argument, within the procedure the table satisfies the type test for a table, as well as for a name and a symbol. In retrospect, I realize that this makes sense when last name evaluation is in play, but I don't recall any mention of this particular side effect in the help files describing parameter processing or tables.  (or I forgot)
Once identified the problem, I found two fixes:

1) test for a table before I testing for a name(symbol).
2) use eval(T) as the argument when calling the procedure.  

I feel a bit uneasy about the first approach because I'm not certain there isn't some pitfall writing a procedure where the order of execution changes the outcome. Is the second approach the best way (as a rule of thumb) to feed a table into a procedure.

A somewhat artifical worksheet is attached to illustrate the problem and these approaches.


tabletypeanomaly.mw

I was trying to display a Physics[Vectors] vector name in a 3dplot with an up arrow
on it. I found that this old 2008 trick still works in MAPLE 2018.

 


 

restart;

with(plots):
with(Physics[Vectors]):

# Using MAPLE 2018.2

a:=arrow([-1,1,1],view=[-1.5..1.5,-1.5..1.5,-1.5..1.5]):

v_;
t:= textplot3d([-1.1,1.1,1,v_]):
display(a,t);

v_

 

 

# I found this on an old 2008 post
t:= textplot3d([-1.1,1.1,1,typeset(`#mover(mi(` || v ||  `),mo("→"))`)]):
display(a,t);

 


 

Download VectorTypeSetting.mw

Hi everybody:

I have an equation that attached with this question and my goal is to solve it, how can do it?

Note: in this equation must be considered 49.32883964 <= x and x is real.

solve_equation.mw

 

 

Hi,

I am new to Maple. I am attempting to find the asymptotic expression for the confluent Heun function (HeunC) under certain set of parameters (i.e. still symbolic and possibly complex, but less parameters compared to the general case).

From the literature, it seems that for certain cases there are such closed analytic expressions.

Is it possible to find such in Maple? I tried using "asympt", which gave me a generic error (...unable to compute series).

Thank you very much.

Good day to you all.

I would like to construct a plot of several data sources and would like to understand how I can animate each event.

For instance - consider a plot of 2 data sets (a simple example is in the attached worksheet), one as a point and another as a column. What is the most efficient way to construct this? Following that, how can both data sets be animated in synch?

Thanks for reading!

MaplePrimes_Example.mw

Hello,

I was working one of the problems for my course in structural dynamics and came across the following function that needs to be plotted. How can we do it in maple 2018.

 

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