MaplePrimes Questions

The command eval allows to simplify a complicated expression

in a more compact form for a later output in LATEX

In the example which follows I was able to insert A and B but non C in the expression.

There is already a post on this kind of topic but I failed to understand the details.

Perhaps a Maple worksheet of answer on this topic  would be useful !

bye Lorenzo
 

restart;

expression:=exp(-b*x^c/2)*((x^(-(3*c)/2 + a/2 + 1/2)*(c + a + 1)*b^(-(3*c + a + 1)/(2*c)) + c*x^(a/2 + 1/2 - c/2)*b^(-(c + a + 1)/(2*c)))*c*WhittakerM((-c + a + 1)/(2*c), (2*c + a + 1)/(2*c), b*x^c) + b^(-(3*c + a + 1)/(2*c))*x^(-(3*c)/2 + a/2 + 1/2)*WhittakerM((c + a + 1)/(2*c), (2*c + a + 1)/(2*c), b*x^c)*(c + a + 1)^2)/((a + 1)*(c + a + 1)*(2*c + a + 1));

exp(-(1/2)*b*x^c)*((x^(-(3/2)*c+(1/2)*a+1/2)*(c+a+1)*b^(-(1/2)*(3*c+a+1)/c)+c*x^((1/2)*a+1/2-(1/2)*c)*b^(-(1/2)*(c+a+1)/c))*c*WhittakerM((1/2)*(-c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)+b^(-(1/2)*(3*c+a+1)/c)*x^(-(3/2)*c+(1/2)*a+1/2)*WhittakerM((1/2)*(c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)*(c+a+1)^2)/((a+1)*(c+a+1)*(2*c+a+1))

(1)

``

(2)

expression_ABC:=eval(expression,[x^(-(3*c)/2 + a/2 + 1/2)*(c + a + 1)*b^(-(3*c + a + 1)/(2*c))=A,c*x^(a/2 + 1/2 - c/2)*b^(-(c + a + 1)/(2*c))=B,((a + 1)*(c + a + 1)*(2*c + a + 1))=C]);

exp(-(1/2)*b*x^c)*((A+B)*c*WhittakerM((1/2)*(-c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)+b^(-(1/2)*(3*c+a+1)/c)*x^(-(3/2)*c+(1/2)*a+1/2)*WhittakerM((1/2)*(c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)*(c+a+1)^2)/((a+1)*(c+a+1)*(2*c+a+1))

(3)

 

 

 

 


 

Download maple_primes_eval.mw

 

maple does not work at all

it displays this error

Error, (in StringTools:-FormatMessage) unknown option MAPLE
 

"From the list of positive integers 1; 2; 3; 4; : : :, remove every second number, leaving
1; 3; 5; 7; 9; : : : Since 3 is the flrst surviving number above 2 that has not been used
as the \killer", we remove every 3rd number from the remaining numbers, yielding
1; 3; 7; 9; 13; 15; 19; 21; : : :"

 I have tried using this:

A:= proc(n::integer)::list;
   local B,C,j;
   B:={seq(i,i=1..n)};
   for j from 2 by 2 to n do
       C:= {B minus {B[j]}};
   end do;
 end proc;

But I'm not getting the desired result.

Hi, I am trying to get back into the habit of making maplets for the sake of uncomplicating things, I never had trouble with loading this package before, but strangely now when i enter:

 

with(Maplets[Elements]);
maplet1 := Maplet(["Hello World!", Button("OK", Shutdown())]);

 

 

I get the error message:


Error, `Elements` does not evaluate to a module

Hi

 

I've just installed Maple latest + MapleSim with the license provided by my university (I use VPN with a secure key to remotely access server license. Everything works fine, except for the context menu. It seems that the context menu module is missing! I tried uninstalling and reinstalling, but did not help.

 

I went back to the campus and checked Maple installation on computers there, and this problem is absent (context menu is working fine).

 

I can only use the context menu toolbar on the right... but this is not very convenient. 

What could be the problem? See the attached image.

 

Thanks

---------------------

 

 

``

restart

with(LinearAlgebra):

"for k from 0 to 1 do;    u(t,x):=1+x;  u[k+1](t,x):=1+x-(∫)[0]^(t)(diff(u[k],x) +2+s+x)ⅆs;  U[k+1](t,x)=u[k+1 ](t,x)-(u[k](t,0)-(1+t));  end      "

Error, invalid operator parameter name

> restart;
> with(LinearAlgebra);
> for k from 0 to 1 do;    u(t,x):=1+x;  u[k+1](t,x):=1+x-(∫)[0]^(t)(diff(u[k],x) +2+s+x)ⅆs;  U[k+1](t,x)=u[k+1 ](t,x)-(u[k](t,0)-(1+t));  end      ;

 

``

``


 

Download ITRATIVE.mw

 

 

 PLS

HOW CAN I ITERATE THIS PDE IN THE FORM OF PICARD ITERTION.

ATTACHED IS THE MAPLECODE  STARTED WITH.

How we can integrate this matrix from -1 to 1 w.r.t   't'  ?

I have a PDE system that relates four functions: sht1, svt1, Lt1, Jirt1.

I'm trying to solve this system numerically, but the pdsolve command returns an error (this error does not make sense to me).

Where am I going wrong?

Thanks!

Test.mw

Hi!

How to calculate  a value in MAPLE:

My code:

evalf(eval(diff(n*Zeta(n, 3), n), n = 3)); give me:

#-0.3740436824 + 3.*eval(diff(Zeta(n, 3), n), {n = 3}) ,it should be only:-0.3740436824

OR:

fdiff(n*Zeta(n, 3), [n], n = 3);

#fdiff(n -> n*Zeta(n, 3), [1], [3]) ???

It's a Bug  or (As Designed / Not a Bug) ?

Thanks in advance.

 

Mathematica code:

D[n*Derivative[n][Zeta][3], n] /. n -> 3 // N;

(* -0.374044*)

 

 

Hi!

I am very interested in using the "phc.module", which is a module to work with "polynomial homotopy continuation" method. Please, see this paper       PHCmaple.pdf

I have downloaded the following files:  phc.zip

Then, I open (as an "ordinary" maple worksheet) the file "phc_savelib.maple" and execute it, but it seems that I can not use their functions and procedures because it returns errors. 

For instance, follwing the attached PDF,  in the phc_savelib.maple file, define the polynomial system:

 

T := makeSystem([x, y], [], [x^2+y^2-1, x^3+y^3-1])

 

and try to solve the above system 

sols := solve(T)

 

but returns the error 

Error, (in fopen) file or directory does not exist
 

Many thanks in advance for your help!

 

Hi! I have some problems with solving convection-diffusion equation. The liquid phase move up with velocity W. And displace vapor phase. C - molar concentration of gas. z - coordinate. w - velocity. h - height of tank. t - time.

 

Its not clear to me how to set moving boundary condition on bottom boundary, so C(0,t)=cs must move up with w velocity.

May be maple have some procedures to make moving boundary or adaptive mesh??? thank you!

 

eq1 := diff(c(z, t), t)+diff(w*c(z, t), z) = d*(diff(c(z, t), z$2));
IBC := { c(z, 0) = 0, c(0, t) = cs, (D[1](c))(h, t) = 0}

restart;
T := -S(xi)*S(xi)+mu*R(xi)-lambda;
                        2                    
                  -S(xi)  + mu R(xi) - lambda
Q := -S(xi)*R(xi);
                          -S(xi) R(xi)
u := a[0]+a[1]*S(xi)+b[1]*R(xi);
                 a[0] + a[1] S(xi) + b[1] R(xi)
diff(u, xi);
                  / d        \        / d        \
             a[1] |---- S(xi)| + b[1] |---- R(xi)|
                  \ dxi      /        \ dxi      /
Fr := Q*b[1]+T*a[1];
                         /      2                    \     
     -S(xi) R(xi) b[1] + \-S(xi)  + mu R(xi) - lambda/ a[1]
diff(Fr, xi);
       / d        \                    / d        \     
      -|---- S(xi)| R(xi) b[1] - S(xi) |---- R(xi)| b[1]
       \ dxi      /                    \ dxi      /     

           /         / d        \      / d        \\     
         + |-2 S(xi) |---- S(xi)| + mu |---- R(xi)|| a[1]
           \         \ dxi      /      \ dxi      //     
d := -T*R(xi)*b[1]-S(xi)*Q*b[1]+(-2*S(xi)*T+mu*Q)*a[1];
 /      2                    \                   2           
-\-S(xi)  + mu R(xi) - lambda/ R(xi) b[1] + S(xi)  R(xi) b[1]

     /         /      2                    \                 \   
   + \-2 S(xi) \-S(xi)  + mu R(xi) - lambda/ - mu S(xi) R(xi)/ a[

  1]
diff(d, xi);
 /         / d        \      / d        \\           
-|-2 S(xi) |---- S(xi)| + mu |---- R(xi)|| R(xi) b[1]
 \         \ dxi      /      \ dxi      //           

     /      2                    \ / d        \     
   - \-S(xi)  + mu R(xi) - lambda/ |---- R(xi)| b[1]
                                   \ dxi      /     

                        / d        \        2 / d        \        /
   + 2 S(xi) R(xi) b[1] |---- S(xi)| + S(xi)  |---- R(xi)| b[1] + |
                        \ dxi      /          \ dxi      /        \
   / d        \ /      2                    \
-2 |---- S(xi)| \-S(xi)  + mu R(xi) - lambda/
   \ dxi      /                              

             /         / d        \      / d        \\
   - 2 S(xi) |-2 S(xi) |---- S(xi)| + mu |---- R(xi)||
             \         \ dxi      /      \ dxi      //

        / d        \                  / d        \\     
   - mu |---- S(xi)| R(xi) - mu S(xi) |---- R(xi)|| a[1]
        \ dxi      /                  \ dxi      //     
h := -(-2*S(xi)*T+mu*Q)*R(xi)*b[1]-(-S(xi)^2+mu*R(xi)-lambda)*Q*b[1]+2*S(xi)*R(xi)*b[1]*T+S(xi)^2*Q*b[1]+(-2*T*(-S(xi)^2+mu*R(xi)-lambda)-2*S(xi)*(-2*S(xi)*T+mu*Q)-mu*T*R(xi)-mu*S(xi)*Q)*a[1];
 /         /      2                    \                 \       
-\-2 S(xi) \-S(xi)  + mu R(xi) - lambda/ - mu S(xi) R(xi)/ R(xi) 

           /      2                    \                 
  b[1] + 3 \-S(xi)  + mu R(xi) - lambda/ S(xi) R(xi) b[1]

                         /                                2         
          3              |   /      2                    \          
   - S(xi)  R(xi) b[1] + \-2 \-S(xi)  + mu R(xi) - lambda/  - 2 S(xi

    /         /      2                    \                 \
  ) \-2 S(xi) \-S(xi)  + mu R(xi) - lambda/ - mu S(xi) R(xi)/

                                                             \   
        /      2                    \                 2      |   
   - mu \-S(xi)  + mu R(xi) - lambda/ R(xi) + mu S(xi)  R(xi)/ a[

  1]
collect(expand(h+3*Fr*Fr+(4*omega+3)*Fr), S(xi), R(xi));
     /      2         \      4
R(xi)\3 a[1]  - 6 a[1]/ S(xi) 

                                                  3        /  
   + R(xi)(6 R(xi) a[1] b[1] - 6 b[1] R(xi)) S(xi)  + R(xi)\3 

       2     2                  2                   
  R(xi)  b[1]  - 6 R(xi) mu a[1]  + 12 a[1] mu R(xi)

                  2                                        \ 
   + 6 lambda a[1]  - 8 a[1] lambda - 4 omega a[1] - 3 a[1]/ 

       2        /        2                       2        
  S(xi)  + R(xi)\-6 R(xi)  mu a[1] b[1] + 6 R(xi)  mu b[1]

   + 6 R(xi) lambda a[1] b[1] - 5 R(xi) lambda b[1]

                                      \              /      2   2 
   - 4 R(xi) omega b[1] - 3 b[1] R(xi)/ S(xi) + R(xi)\3 a[1]  mu  

       2            2      2         2                
  R(xi)  - 3 a[1] mu  R(xi)  - 6 a[1]  mu R(xi) lambda

   + 5 a[1] mu R(xi) lambda + 4 omega a[1] mu R(xi)

           2       2                                  2
   + 3 a[1]  lambda  + 3 a[1] mu R(xi) - 2 a[1] lambda 

                                        \
   - 4 omega a[1] lambda - 3 a[1] lambda/

Generally when I respond to questions on this site, I make sure that I tick the checkbox requesting that I get an email when updates are made to the thread.

I've just realised that I have been receiving no such updates for a week or so. Two possibilities

  1. Problem with Mapleprimes website, meaning that email updates aren't being generated/sent
  2. Problem with my ISP

Before I try investigating (2) above, I'd just like to know if anyone else has seen any issue which might be explained by (1) above

For what ever reason I found myself curious to know more about how random number generators work, rand() being one of my favourite tools in the shed to call apon when conducting one of my hobbyist number investigations. So reviewing the output from commands:

with(RandomTools[LinearCongruence]);
showstat(GetState);

 

Which was:

RandomTools:-LinearCongruence:-GetState := proc($)
                                                                      1   return LCState
                                                                            end proc

Due to my lack of understanding as to how the maple kernel is designed, I am struggling to understand how the end of parameters marker is able to be accepted alone as the parameter sequence for proc, and was unable to find a help page for "LCState". I'm in such a state of confusion on this matter, it's really difficult to present the forum with a concise question, I really only have a request for a direction to go to understand this package further more.

car_2som_opp := proc (U::list, V::list)  #construction d'un carré connaissant 2 sommets opposés 
local dist, eqCerU, eqCerV, r, sol, X, Y; 
dist := proc (M, N) sqrt(add((M[i]-N[i])^2, i = 1 .. 2)) end proc;
r := dist(U, V)/sqrt(2); 
eqCerU := (x-U[1])^2+(y-U[2])^2 = r^2; 
eqCerV := (x-V[1])^2+(y-V[2])^2 = r^2;
sol := solve([eqCerU, eqCerV], [x, y],allsolutions,explicit);  
map(allvalues,sol): 
X := [subs(op(sol[1]), x), subs(op(sol[1]), y)]; 
Y := [subs(op(sol[2]), x), subs(op(sol[2]), y)]; 
display(plot([U, X, V, Y, U],scaling = constrained, axes = none)) 
end proc:

car_2som_opp([-5,6],[7,-3]);"error
 

4 5 6 7 8 9 10 Last Page 6 of 1764