MaplePrimes Questions

1.47449729919434*10^10*c[0, 1]*c[0, 2]*c[2, 2]*c[3, 0]+3.38624318440755*10^8*c[0, 1]*c[0, 3]*c[1, 0]*c[2, 1]+1.54309415817260*10^10*c[0, 1]*c[0, 3]*c[1, 3]*c[2, 0]+1.69527735464914*10^14*c[0, 2]*c[0, 3]*c[1, 3]*c[3, 3]+5.64571777979530*10^11*c[0, 1]*c[1, 3]*c[3, 0]*c[3, 1]+5.64571777979530*10^11*c[0, 1]*c[1, 1]*c[3, 0]*c[3, 3]+3.44365358352662*10^11*c[0, 1]*c[1, 1]*c[3, 1]*c[3, 2]+4.56141047477722*10^11*c[0, 1]*c[0, 2]*c[2, 1]*c[3, 3]+1.47449729919434*10^10*c[0, 1]*c[0, 2]*c[2, 0]*c[3, 2]+1.00292015075684*10^10*c[0, 1]*c[0, 2]*c[2, 1]*c[3, 1]+4.96419365552208*10^14*c[1, 1]*c[2, 3]*c[3, 1]*c[3, 2]+2.41547661753786*10^16*c[1, 1]*c[2, 3]*c[3, 2]*c[3, 3]+3.09237360954284*10^11*c[0, 2]*c[1, 1]*c[1, 3]*c[3, 1]+2.07077209298372*10^13*c[0, 2]*c[2, 2]*c[2, 3]*c[3, 0]+2.77395036220550*10^11*c[0, 2]*c[1, 1]*c[1, 2]*c[3, 2]+3.25883571082134*10^15*c[1, 2]*c[2, 3]*c[3, 1]*c[3, 2]+2.77442234357198*10^11*c[0, 2]*c[1, 1]*c[2, 1]*c[2, 3]+7.80736282336175*10^14*c[2, 0]*c[2, 1]*c[3, 2]*c[3, 3]+3.25883571082134*10^15*c[1, 2]*c[2, 2]*c[3, 1]*c[3, 3]+5.35593751087840*10^15*c[1, 2]*c[2, 3]*c[3, 0]*c[3, 3]+3.63255405301248*10^15*c[1, 1]*c[2, 3]*c[3, 1]*c[3, 3]+3.25883571082134*10^15*c[1, 2]*c[2, 1]*c[3, 2]*c[3, 3]+1.48022406855142*10^13*c[1, 0]*c[2, 1]*c[2, 2]*c[3, 3]+5.19766484559825*10^15*c[0, 1]*c[2, 3]*c[3, 2]*c[3, 3]+3.63255405301248*10^15*c[1, 3]*c[2, 1]*c[3, 1]*c[3, 3]+1.03156027712140*10^14*c[0, 3]*c[1, 2]*c[1, 3]*c[2, 3]+6.84418565576730*10^13*c[1, 1]*c[1, 2]*c[1, 3]*c[3, 3]+1.36253689407226*10^13*c[0, 1]*c[1, 2]*c[2, 3]*c[3, 2]+4.50722523384354*10^11*c[0, 1]*c[0, 2]*c[1, 2]*c[3, 3]+4.63272867590191*10^14*c[1, 1]*c[1, 3]*c[2, 3]*c[3, 2]+9.56722337372450*10^9*c[0, 1]*c[0, 2]*c[1, 2]*c[1, 3]+7.56283392524430*10^14*c[0, 3]*c[1, 1]*c[2, 3]*c[3, 3]+1.51879056084535*10^13*c[0, 3]*c[1, 1]*c[2, 3]*c[3, 1]+8.15436050904650*10^14*c[1, 1]*c[2, 3]*c[3, 0]*c[3, 3]+1.51879056084535*10^13*c[0, 1]*c[1, 1]*c[2, 3]*c[3, 3]+3.05712170936082*10^11*c[0, 1]*c[1, 1]*c[1, 3]*c[2, 3]+2.21942429315476*10^9*c[0, 1]*c[0, 2]*c[1, 0]*c[3, 2]+1.50960286458333*10^9*c[0, 1]*c[0, 2]*c[1, 1]*c[3, 1]+6.37602806091310*10^9*c[0, 1]*c[1, 1]*c[1, 2]*c[1, 3]+2.22015380859375*10^7*c[0, 0]*c[1, 0]*c[1, 1]*c[3, 0]+2.24812825520834*10^6*c[0, 0]*c[0, 1]*c[1, 0]*c[2, 1]+2.24812825520834*10^6*c[0, 0]*c[0, 1]*c[1, 1]*c[2, 0]+4.45556640625000*10^5*c[0, 0]*c[0, 1]*c[0, 2]*c[1, 0]+1.80236816406250*10^7*c[0, 0]*c[0, 2]*c[0, 3]*c[1, 0]+9.99813988095240*10^6*c[0, 1]*c[1, 0]*c[1, 1]*c[2, 0]+1.64310515873016*10^7*c[0, 0]*c[0, 1]*c[1, 0]*c[3, 1]+1.09924316406250*10^7*c[0, 0]*c[0, 1]*c[0, 2]*c[1, 2]+1.22578938802084*10^7*c[0, 0]*c[0, 1]*c[0, 3]*c[1, 1]+6.74438476562500*10^5*c[0, 0]*c[0, 1]*c[1, 0]*c[2, 0]+3.27484130859375*10^7*c[0, 0]*c[0, 1]*c[2, 0]*c[3, 0]+4.96419365552208*10^14*c[1, 1]*c[2, 2]*c[3, 1]*c[3, 3]+1.48022406855142*10^13*c[1, 2]*c[2, 0]*c[2, 1]*c[3, 3]+1.48022406855142*10^13*c[1, 2]*c[2, 0]*c[2, 3]*c[3, 1]+7.00457388588595*10^14*c[1, 2]*c[2, 0]*c[2, 3]*c[3, 3]+9.01806926154510*10^12*c[1, 2]*c[2, 1]*c[2, 2]*c[3, 1]+4.26195329427362*10^14*c[1, 1]*c[2, 2]*c[2, 3]*c[3, 2]+8.70017911044035*10^14*c[1, 1]*c[3, 0]*c[3, 2]*c[3, 3]+1.64960358855012*10^13*c[1, 2]*c[1, 3]*c[3, 0]*c[3, 1]+8.70017911044035*10^14*c[1, 3]*c[3, 0]*c[3, 1]*c[3, 2]+4.11701503132284*10^16*c[1, 3]*c[3, 0]*c[3, 2]*c[3, 3]+1.32823657812862*10^13*c[2, 0]*c[2, 1]*c[2, 2]*c[2, 3]+2.49782355477406*10^13*c[0, 1]*c[0, 3]*c[3, 1]*c[3, 3]+1.86077008928572*10^7*c[0, 0]*c[0, 1]*c[0, 2]*c[0, 3]+4.50750425170068*10^11*c[0, 3]*c[1, 2]*c[1, 3]*c[2, 0]+2.41765159606934*10^10*c[0, 0]*c[0, 2]*c[2, 0]*c[3, 3]+1.28155946659681*10^15*c[2, 0]*c[2, 3]*c[3, 0]*c[3, 3]+7.80736282336175*10^14*c[2, 0]*c[2, 3]*c[3, 1]*c[3, 2]+2.95015059452266*10^13*c[2, 0]*c[2, 3]*c[3, 0]*c[3, 1]+1.64424324035644*10^10*c[0, 1]*c[0, 3]*c[2, 0]*c[3, 1]+7.80736282336175*10^14*c[2, 0]*c[2, 2]*c[3, 1]*c[3, 3]+3.38624318440755*10^8*c[0, 1]*c[0, 3]*c[1, 1]*c[2, 0]+6.83811849201320*10^14*c[0, 2]*c[2, 1]*c[2, 3]*c[3, 3]+4.96419365552208*10^14*c[1, 1]*c[2, 1]*c[3, 2]*c[3, 3]+4.50722523384354*10^11*c[0, 1]*c[0, 2]*c[1, 3]*c[3, 2]+2.74640085129511*10^12*c[0, 3]^2*c[1, 3]*c[3, 0]+4.53797990504672*10^10*c[0, 2]^2*c[2, 0]*c[2, 3]+2.76260943995885*10^10*c[0, 2]^2*c[2, 1]*c[2, 2]+5.63905988420760*10^10*c[0, 3]^2*c[1, 0]*c[3, 1]+2.74640085129511*10^12*c[0, 3]^2*c[1, 0]*c[3, 3]+5.63905988420760*10^10*c[0, 3]^2*c[1, 1]*c[3, 0]+1.67039675031390*10^12*c[0, 3]^2*c[1, 1]*c[3, 2]+1.67039675031390*10^12*c[0, 3]^2*c[1, 2]*c[3, 1]

When I try to calculate the derivative of a covariant metric with respect to the corresponding contravariant metric, or vice versa, the result is correct up to the sign, which is wrong:

diff(g_[nu, tau], g_[~mu, ~eta]);

Maple's result: g_[eta, nu] g_[mu, tau]

Correct result: -g_[eta, nu] g_[mu, tau]

diff(g_[~nu, ~tau], g_[mu, eta]);

Maple's result: g_[~eta, ~nu] g_[~mu, ~tau]

Correct result: -g_[~eta, ~nu] g_[~mu, ~tau]

I've loaded DifferentialGeometry, Tensor, Physics. Is this my fault, or Maple's?

Dear friends,

I have attached a document with two commands  in slider0 for plotting the same graph in two plot components.
use DocumentTools in 
a := Do(%Slider0/100);
b := Do(%Slider1/100);

Do(%Plot0 = plot(sin(a*x)+cos(b*x^2),x=0..10,y=-3..3));
SetProperty("Plot1",value,plot(sin(a*x)+cos(b*x^2),x=0..10,y=-3..3));
end use; 

I am just curious to know which one is better and when?

 

``

``

 

``


 

Download DoubtOnLatestCodesinEmbeddedPlot.mw

Thanks for answers.

Ramakrishnan V

restart;
A[0] := 0;
                               0
A[1] := sqrt(2*(k[1]^2-w[1]^2))/n;
                                       (1/2)
                    /      2         2\     
                    \2 k[1]  - 2 w[1] /     
                    ------------------------
                               n            
A[2] := sqrt(2*(k[2]^2-w[2]^2))/n;
                                       (1/2)
                    /      2         2\     
                    \2 k[2]  - 2 w[2] /     
                    ------------------------
                               n            
c[1] := 1;
                               1
c[2] := 1;
                               1
c[3] := 1;
                               1
c[4] := 1;
                               1
c[5] := 1;
                               1
c[6] := 1;
                               1
k[1] := 10.5;
                              10.5
k[2] := 3.5;
                              3.5
w[1] := 5.05;
                              5.05
w[2] := .5;
                              0.5
m := 1.9;
                              1.9
n := 1.75;
                              1.75
xi[1] := -t*w[1]+x*k[1];
                        -5.05 t + 10.5 x
xi[2] := -t*w[2]+x*k[2];
                         -0.5 t + 3.5 x
a := m/sqrt(2*(k[1]^2-w[1]^2));
                          0.1459402733
b := m/sqrt(k[2]^2-w[2]^2);
                          0.5484827558
g := a*(c[2]*exp(a*xi[1])+c[3]*exp(-a*xi[1]));
     0.1459402733 exp(-0.7369983802 t + 1.532372870 x)

        + 0.1459402733 exp(0.7369983802 t - 1.532372870 x)
h := c[1]+c[2]*exp(a*xi[1])+c[3]*exp(-a*xi[1]);
            1 + exp(-0.7369983802 t + 1.532372870 x)

               + exp(0.7369983802 t - 1.532372870 x)
G := b*(c[5]*exp(b*xi[2])+c[6]*exp(-b*xi[2]));
     0.5484827558 exp(-0.2742413779 t + 1.919689645 x)

        + 0.5484827558 exp(0.2742413779 t - 1.919689645 x)
H := c[4]+c[5]*exp(b*xi[2])+c[6]*exp(-b*xi[2]);
            1 + exp(-0.2742413779 t + 1.919689645 x)

               + exp(0.2742413779 t - 1.919689645 x)
u := A[0]+A[1]*[g/h]+A[2]*[G/H];
[(2.799416849 (0.5484827558 exp(-0.2742413779 t + 1.919689645 x)

   + 0.5484827558 exp(0.2742413779 t - 1.919689645 x)))/(1

   + exp(-0.2742413779 t + 1.919689645 x)

   + exp(0.2742413779 t - 1.919689645 x)) + (7.439442594 

  (0.1459402733 exp(-0.7369983802 t + 1.532372870 x)

   + 0.1459402733 exp(0.7369983802 t - 1.532372870 x)))/(1

   + exp(-0.7369983802 t + 1.532372870 x)

   + exp(0.7369983802 t - 1.532372870 x))]
plot3d(u, x = -20 .. .20, t = -20 .. .20);

t := 0;
                               0
plot(u, x = -15 .. 15);


Error, (in plot) found points with fewer or more than 2 components
 

fgure set 1;
Error, missing operation
 Typesetting:-mambiguous(fgure Typesetting:-mambiguous(set 1, 

   Typesetting:-merror("missing operation")))
restart;
l := 4;
                               4
m := 1;
                               1
n := 2;
                               2
k := 1/sqrt(-6*beta*l^2+24*beta*m*n);
                               1        
                        ----------------
                                   (1/2)
                        4 (-3 beta)     
w := alpha/(5*beta*sqrt(l^2-4*m*n));
                                 (1/2)
                          alpha 2     
                          ------------
                            20 beta   

B[0] := -(1/25)*alpha*(5*l^3/(5*sqrt(l^2-4*m*n))-20*l*m*n/(5*sqrt(l^2-4*m*n))-l^2+2*m*n)*sqrt(-6*beta*l^2+24*beta*m*n)*(5*sqrt(l^2-4*m*n))/((l^2-4*m*n)^2*beta);
                 /   (1/2)     \          (1/2)  (1/2)
           alpha \8 2      - 12/ (-3 beta)      2     
         - -------------------------------------------
                             40 beta                  
B[1] := -(12/5)*m*alpha*(5*l/(5*sqrt(l^2-4*m*n))-1)/sqrt(-6*beta*l^2+24*beta*m*n);
                               / (1/2)    \
                       3 alpha \2      - 1/
                     - --------------------
                                    (1/2)  
                         5 (-3 beta)       
B[2] := -12*m^2*alpha/(sqrt(-6*beta*l^2+24*beta*m*n)*(5*sqrt(l^2-4*m*n)));
                                  (1/2)  
                         3 alpha 2       
                      - -----------------
                                    (1/2)
                        20 (-3 beta)     
theta := sqrt(l^2-4*m*n);
                               (1/2)
                            2 2     
xi[0] := 1;
                               1
F := -l/(2*m)-theta*tanh((1/2)*theta*(xi+xi[0]))/(2*m);
                     (1/2)     / (1/2)         \
               -2 - 2      tanh\2      (xi + 1)/
beta := -2;
                               -2
alpha := -3;
                               -3

                               1


xi := k*x-t*w;
                   1   (1/2)     3     (1/2)
                   -- 6      x - -- t 2     
                   24            40         
u := B[0]+B[1]*F+B[2]*F*F;
  3  /   (1/2)     \  (1/2)  (1/2)   3  / (1/2)    \  (1/2) /  
- -- \8 2      - 12/ 6      2      + -- \2      - 1/ 6      |-2
  80                                 10                     \  

      (1/2)     / (1/2) /1   (1/2)     3     (1/2)    \\\   3  
   - 2      tanh|2      |-- 6      x - -- t 2      + 1||| + -- 
                \       \24            40             ///   40 

   (1/2)  (1/2) 
  6      2      

                                                            2
  /      (1/2)     / (1/2) /1   (1/2)     3     (1/2)    \\\ 
  |-2 - 2      tanh|2      |-- 6      x - -- t 2      + 1||| 
  \                \       \24            40             /// 
plot3d(u, x = -30 .. .30, t = -30 .. .30);

t := 0;
                               0
plot([u], x = -30 .. 30);

case2222;
                            case2222
restart;
l := 2;
                               2
m := 1;
                               1
n := 2;
                               2
k := 1/sqrt(-6*beta*l^2+24*beta*m*n);
                              (1/2)   
                             6        
                          ------------
                                 (1/2)
                          12 beta     
w := alpha/(5*beta*sqrt(l^2-4*m*n));
                            1         
                            -- I alpha
                            10        
                          - ----------
                               beta   

B[0] := -(1/25)*alpha*(5*l^3/(5*sqrt(l^2-4*m*n))-20*l*m*n/(5*sqrt(l^2-4*m*n))-l^2+2*m*n)*sqrt(-6*beta*l^2+24*beta*m*n)*(5*sqrt(l^2-4*m*n))/((l^2-4*m*n)^2*beta);
                                 (1/2)
                          alpha 6     
                          ------------
                                (1/2) 
                          5 beta      
B[1] := -(12/5)*m*alpha*(5*l/(5*sqrt(l^2-4*m*n))-1)/sqrt(-6*beta*l^2+24*beta*m*n);
                     /1   1  \        (1/2)
                     |- + - I| alpha 6     
                     \5   5  /             
                     ----------------------
                               (1/2)       
                           beta            
B[2] := -12*m^2*alpha/(sqrt(-6*beta*l^2+24*beta*m*n)*(5*sqrt(l^2-4*m*n)));
                       1           (1/2)
                       -- I alpha 6     
                       10               
                       -----------------
                               (1/2)    
                           beta         
theta := sqrt(l^2-4*m*n);
                              2 I
xi[0] := 1;
                               1
C := -2;
                               -2
F := -l/(2*m)-theta*tanh((1/2)*theta*xi)/(2*m)+sech((1/2)*theta*xi)/(C*cosh((1/2)*theta*xi)-2*m*sinh((1/2)*theta*xi)/theta);
                                   sec(xi)       
              -1 + tan(xi) + --------------------
                             -2 cos(xi) - sin(xi)

beta := -2;
                               -2
alpha := 3;
                               3

xi := k*x-t*w;
                  1   (1/2)     (1/2)     3     
                - -- 6      (-2)      x - -- I t
                  24                      20    
u := B[0]+B[1]*F+B[2]*F*F;
  3   (1/2)     (1/2)   /  3    3   \  (1/2)     (1/2) /  
- -- 6      (-2)      + |- -- - -- I| 6      (-2)      |-1
  10                    \  10   10  /                  \  

        /1   (1/2)     (1/2)     3     \   /   /1   (1/2) 
   - tan|-- 6      (-2)      x + -- I t| + |sec|-- 6      
        \24                      20    /   \   \24        

      (1/2)     3     \\//      /1   (1/2)     (1/2)     3     \
  (-2)      x + -- I t|| |-2 cos|-- 6      (-2)      x + -- I t|
                20    // \      \24                      20    /

        /1   (1/2)     (1/2)     3     \\\   3     (1/2) 
   + sin|-- 6      (-2)      x + -- I t||| - -- I 6      
        \24                      20    ///   20          

      (1/2) /        /1   (1/2)     (1/2)     3     \   /   /1  
  (-2)      |-1 - tan|-- 6      (-2)      x + -- I t| + |sec|-- 
            \        \24                      20    /   \   \24 

   (1/2)     (1/2)     3     \\//
  6      (-2)      x + -- I t|| |
                       20    // \
      /1   (1/2)     (1/2)     3     \
-2 cos|-- 6      (-2)      x + -- I t|
      \24                      20    /

        /1   (1/2)     (1/2)     3     \\\  
   + sin|-- 6      (-2)      x + -- I t|||^2
        \24                      20    ///  
plot3d(Re(u), x = -30 .. .30, t = -30 .. .30);

t := 0;
                               0
plot([Re(u)], x = -30 .. 30);

plot3d(Im(u), x = -10 .. .10, t = -10 .. .10);
Error, (in plot3d) bad range arguments: x = -10 .. .10, 0 = -10 .. .10
t := 0;
                               0
plot([Im(u)], x = -30 .. 30);

fgure set 2;
Error, missing operation
 Typesetting:-mambiguous(fgure Typesetting:-mambiguous(set 2, 

   Typesetting:-merror("missing operation")))
restart;
l := 4;
                               4
m := 1;
                               1
n := 2;
                               2
k := 1/sqrt(6*beta*l^2-24*beta*m*n);
                              (1/2)   
                             3        
                          ------------
                                 (1/2)
                          12 beta     
w := alpha/((5*sqrt(l^2-4*m*n))*beta);
                                 (1/2)
                          alpha 2     
                          ------------
                            20 beta   

B[0] := (1/25)*alpha*(5*l^3/(5*sqrt(l^2-4*m*n))-20*l*m*n/(5*sqrt(l^2-4*m*n))+l^2-6*m*n)*sqrt(6*beta*l^2-24*beta*m*n)*(5*sqrt(l^2-4*m*n))/((l^2-4*m*n)^2*beta);
                     /   (1/2)    \  (1/2)  (1/2)
               alpha \8 2      + 4/ 3      2     
               ----------------------------------
                                 (1/2)           
                          40 beta                
B[1] := -(12/5)*m*alpha*(5*l/(5*sqrt(l^2-4*m*n))-1)/sqrt(6*beta*l^2-24*beta*m*n);
                          / (1/2)    \  (1/2)
                    alpha \2      - 1/ 3     
                  - -------------------------
                                 (1/2)       
                           5 beta            
B[2] := -12*m^2*alpha/(sqrt(6*beta*l^2-24*beta*m*n)*(5*sqrt(l^2-4*m*n)));
                              (1/2)  (1/2)
                       alpha 3      2     
                     - -------------------
                                 (1/2)    
                          20 beta         

                       1           (1/2)
                       -- I alpha 6     
                       10               
                       -----------------
                               (1/2)    
                           beta         
theta := sqrt(l^2-4*m*n);
                               (1/2)
                            2 2     
xi[0] := 1;
                               1
F := -l/(2*m)-theta*tanh((1/2)*theta*(xi+xi[0]))/(2*m);
                     (1/2)     / (1/2)         \
               -2 - 2      tanh\2      (xi + 1)/
beta := -2;
                               -2
alpha := -3;
                               -3

                               1


xi := k*x-t*w;
               1   (1/2)     (1/2)     3     (1/2)
             - -- 3      (-2)      x - -- t 2     
               24                      40         
u := B[0]+B[1]*F+B[2]*F*F;
 3  /   (1/2)    \     (1/2)  (1/2)  (1/2)   3  / (1/2)    \ 
 -- \8 2      + 4/ (-2)      3      2      - -- \2      - 1/ 
 80                                          10              

    (1/2)     (1/2) /  
   3      (-2)      |-2
                    \  

       (1/2)     / (1/2) /  1   (1/2)     (1/2)     3     (1/2)
    - 2      tanh|2      |- -- 3      (-2)      x - -- t 2     
                 \       \  24                      40         

       \\\   3   (1/2)     (1/2)  (1/2) /  
    + 1||| - -- 3      (-2)      2      |-2
       ///   40                         \  

       (1/2)     / (1/2) /  1   (1/2)     (1/2)     3     (1/2)
    - 2      tanh|2      |- -- 3      (-2)      x - -- t 2     
                 \       \  24                      40         

       \\\  
    + 1|||^2
       ///  
plot3d(Re(u), x = -30 .. .30, t = -30 .. .30);
Error, (in plot3d) bad range arguments: x = -30 .. .30, 0 = -30 .. .30
t := 0;
                               0
plot([Re(u)], x = -30 .. 30);

plot3d(Im(u), x = -1 .. 1, t = -1 .. 1);
Error, (in plot3d) bad range arguments: x = -1 .. 1, 0 = -1 .. 1
t := 0;
                               0
plot([Im(u)], x = -30 .. 30);

case2222;
                            case2222
restart;
l := 2;
                               2
m := 1;
                               1
n := 2;
                               2
k := 1/sqrt(-6*beta*l^2+24*beta*m*n);
                              (1/2)   
                             6        
                          ------------
                                 (1/2)
                          12 beta     
w := alpha/(5*beta*sqrt(l^2-4*m*n));
                            1         
                            -- I alpha
                            10        
                          - ----------
                               beta   

B[0] := -(1/25)*alpha*(5*l^3/(5*sqrt(l^2-4*m*n))-20*l*m*n/(5*sqrt(l^2-4*m*n))-l^2+2*m*n)*sqrt(-6*beta*l^2+24*beta*m*n)*(5*sqrt(l^2-4*m*n))/((l^2-4*m*n)^2*beta);
                                 (1/2)
                          alpha 6     
                          ------------
                                (1/2) 
                          5 beta      
B[1] := -(12/5)*m*alpha*(5*l/(5*sqrt(l^2-4*m*n))-1)/sqrt(-6*beta*l^2+24*beta*m*n);
                     /1   1  \        (1/2)
                     |- + - I| alpha 6     
                     \5   5  /             
                     ----------------------
                               (1/2)       
                           beta            
B[2] := -12*m^2*alpha/(sqrt(-6*beta*l^2+24*beta*m*n)*(5*sqrt(l^2-4*m*n)));
                       1           (1/2)
                       -- I alpha 6     
                       10               
                       -----------------
                               (1/2)    
                           beta         
theta := sqrt(l^2-4*m*n);
                              2 I
xi[0] := 1;
                               1
C := -2;
                               -2
F := -l/(2*m)-theta*tanh((1/2)*theta*xi)/(2*m)+sech((1/2)*theta*xi)/(C*cosh((1/2)*theta*xi)-2*m*sinh((1/2)*theta*xi)/theta);
                                   sec(xi)       
              -1 + tan(xi) + --------------------
                             -2 cos(xi) - sin(xi)

beta := -2;
                               -2
alpha := 3;
                               3

xi := k*x-t*w;
                  1   (1/2)     (1/2)     3     
                - -- 6      (-2)      x - -- I t
                  24                      20    
u := B[0]+B[1]*F+B[2]*F*F;
  3   (1/2)     (1/2)   /  3    3   \  (1/2)     (1/2) /  
- -- 6      (-2)      + |- -- - -- I| 6      (-2)      |-1
  10                    \  10   10  /                  \  

        /1   (1/2)     (1/2)     3     \   /   /1   (1/2) 
   - tan|-- 6      (-2)      x + -- I t| + |sec|-- 6      
        \24                      20    /   \   \24        

      (1/2)     3     \\//      /1   (1/2)     (1/2)     3     \
  (-2)      x + -- I t|| |-2 cos|-- 6      (-2)      x + -- I t|
                20    // \      \24                      20    /

        /1   (1/2)     (1/2)     3     \\\   3     (1/2) 
   + sin|-- 6      (-2)      x + -- I t||| - -- I 6      
        \24                      20    ///   20          

      (1/2) /        /1   (1/2)     (1/2)     3     \   /   /1  
  (-2)      |-1 - tan|-- 6      (-2)      x + -- I t| + |sec|-- 
            \        \24                      20    /   \   \24 

   (1/2)     (1/2)     3     \\//
  6      (-2)      x + -- I t|| |
                       20    // \
      /1   (1/2)     (1/2)     3     \
-2 cos|-- 6      (-2)      x + -- I t|
      \24                      20    /

        /1   (1/2)     (1/2)     3     \\\  
   + sin|-- 6      (-2)      x + -- I t|||^2
        \24                      20    ///  
plot3d(Re(u), x = -30 .. .30, t = -30 .. .30);

t := 0;
                               0
plot([Re(u)], x = -30 .. 30);

plot3d(Im(u), x = -10 .. .10, t = -10 .. .10);
Error, (in plot3d) bad range arguments: x = -10 .. .10, 0 = -10 .. .10
t := 0;
                               0
plot([Im(u)], x = -30 .. 30);

You use curly braces, ie '{}' as a container. Within Maple such curly braces designate a set, and Maple will always display sets in "lexicographic" order.

Since order has no meaning for entries in a set, trying to "sort" a set is meaningless. You can only sort lists, Arrays etc where the concept of order meaningful

See the attached for examples of sorting sets, lists, Arrays, and note that sorting of sets doesn't do anything useful

For future reference

  1. This should be a "Question", not a "Post" (and if I knew how to move it I would!)
  2. When posting on this site, try to avoid using third party sites like dropbox. Upload code (not pictures of code) using the big green up-arrow in the Mapleprimes toolbar

  restart;
  alpha:=[2,3,4,5];
#
# Try sorting sets - won't work because
# order is meaningless in a set
#
  sort( {abs(alpha[1]-30),abs(alpha[2]-30),abs(alpha[3]-30),abs(alpha[4]-30)}, `<`);
  whattype(%);
  sort( {abs(alpha[1]-30),abs(alpha[2]-30),abs(alpha[3]-30),abs(alpha[4]-30)}, `>`);
  whattype(%);
#
# Do the same thing with lists, where order is significant
#
  sort( [abs(alpha[1]-30),abs(alpha[2]-30),abs(alpha[3]-30),abs(alpha[4]-30)], `<`);
  whattype(%);
  sort( [abs(alpha[1]-30),abs(alpha[2]-30),abs(alpha[3]-30),abs(alpha[4]-30)], `>`);
  whattype(%);
#
# You can also sort entries in an Array()
#
  sort(Array([abs(alpha[1]-30),abs(alpha[2]-30),abs(alpha[3]-30),abs(alpha[4]-30)]), `<`);
  whattype(%);
  sort(Array([abs(alpha[1]-30),abs(alpha[2]-30),abs(alpha[3]-30),abs(alpha[4]-30)]), `>`);
  whattype(%);

alpha := [2, 3, 4, 5]

 

{25, 26, 27, 28}

 

set

 

{25, 26, 27, 28}

 

set

 

[25, 26, 27, 28]

 

list

 

[28, 27, 26, 25]

 

list

 

Vector[row](4, {(1) = 25, (2) = 25, (3) = 25, (4) = 25})

 

Array

 

Array(%id = 18446744074423548974)

 

Array

(1)

 

Vector[row](4, {(1) = 25, (2) = 25, (3) = 25, (4) = 25})

 

Array

 

Array(%id = 18446744074423548974)

 

Array

(2)

 

Download sortSet.mw

Hi,
I face a problem using Tolerances:-NominalValue and Tolerances:-ToleranceValue on a quantity constructed from add.

Example

restart:
with(Tolerances):
x := 10 &+-1:
y := 20 &+- 2:
z := 3*x+2*y;
NominalValue(z);     
# returns 70 as expected
ToleranceValue(z);   # returns 7 as expected


Now I define another quantity Z this way:

Z := add([3, 2] *~ [x, y]);
(or equivalently add(ListOfCoeffs[k]*ListOfVars[k], k=1..K) where ListOfCoeffs and ListOfVars are previously defined adhoc lists)

Both NominalValue(Z) and ToleranceValue(Z) return an error.
PS: already (and this probably explains that) Z does not appear as 70 +/- 7 but as 3*Interval(...)+2*Interval(...) (lprint confirmed)

How can I obtain NominalValue(Z) and ToleranceValue(Z) when Z comes from 'add' constructor?

Hellow

 

I want to create a function that sort an array with a parametric variable alpha[k]. But Maple ignores the sort command, so the array never gets sorted. Please see attached url to creen capture of the problem:

 

https://www.dropbox.com/s/gjy5zbm4gjwmwdv/sort.png?dl=0

Thnaks

 

Hi everyone, my question is how do I get maple to process these commands. It is currently not evaluating them, and output is also similar to the image above. This occurs when I open a workbook from my Professor, all the math commands that are already inserted into the worksheet output this when I try to execute them.

I have found a workaround, I simply copy and paste the code in a new command line but this is tedious and I was wondering if anyone knew how to fix this.

Thanks!

         Fract := proc(P::posint, Q::posint)  
         local p,q:
         for p from 1 to P-1 do
            for q from 1 to Q-1 do
              if (P-p)*q-P*(Q-q)=1 the return (p/q,(P-p)/(Q-q): fi:
          od:od:  
       end;
        debug(Fract);
        Fract(5, 13);
        Fract(77, 200);

 

How can type 

[
 

"seq('op'('S['i'])',i=1..5)"

op(S[1]), op(S[2]), op(S[3]), op(S[4]), op(S[5])

(1)

into

into

(2)

op(S[1]), op(S[2]), op(S[3]), op(S[4]), op(S[5])

``

(3)

``


 

Download op_seq.mw

seq('op'('S['i'])',i=1..5)]

export

[op(S[1]), op(S[2],op(S[3],op(S[4])]

Please help me

I need to plot 2 surfaces (f, g) and a plane (Op) (two surfaces and the osculating plane to their complete intersection curve). When I use

f := x*w - z
g := -z^2-w+x+2*z-1
Op := 5*x-4-4*z+3*w
implicitplot3d({f, g, Op}, x = 0 .. 2, z = 0 .. 2, w = 0 .. 2, grid = [50, 50, 50])

it is very difficult to differentiate between them, so I would like to plot f, g and Op using different color schemes or something. Any ideas on how to do this?

Hello everyone!

I am confronted with a problem that seems to result from different definition of spherical coordinates in Maple and in Student[VectorCalculus] package.

I want to visualize a vector field defined in spherical coordinates (r,theta,phi).

A simple exampe is < 0, theta, 0 >. If I want to see just one slice of the field in OXY plane, I type:

fieldplot3d(<0, theta, 0>, r = 0 .. 1, theta = 0 .. 2*Pi, phi = 0 .. Pi, coords = spherical, grid = [10, 20, 3], color = black, fieldstrength = fixed(1), arrows = THICK)

And get:

which looks OK more or less but I don't like the nonuniform distribution of arrows. But since the field is defined in spherical coordinates there seems to be no way to produce a uniform distribution with fieldplot3d command.

However VectorField command in Student[VectorCalculus] package seems to do just what I want. But a similar call to it:

SetCoordinates('spherical'[r, theta, phi])

VectorField(<0, theta, 0>, output = plot, view = [-5 .. 5, -5 .. 5, -10 .. 10], fieldoptions = [arrows = THICK, color = black, grid = [10, 10, 3], view = [-5 .. 5, -5 .. 5, -1 .. 1]])  produces quite a different result:

which means that the second argument 'theta' is not the azimuthal angle but the angle from the Z axis, and amounts to Pi/2 since we look at the OXY plane.

The result of: VectorField(<0, 0, theta>, output = plot, view = [-5 .. 5, -5 .. 5, -10 .. 10], fieldoptions = [arrows = THICK, color = black, grid = [10, 10, 3], view = [-5 .. 5, -5 .. 5, -1 .. 1]])  looks better:

but is not correct since the magnitude of the field does not change with the azimutal angle. Finally, 

VectorField(<0, 0, phi>, output = plot, view = [-5 .. 5, -5 .. 5, -10 .. 10], fieldoptions = [arrows = THICK, color = black, grid = [10, 10, 3], view = [-5 .. 5, -5 .. 5, -1 .. 1]]) produces almost what I want:

but it's quite different from what you get with fieldplot3d command. Apparently, not only azimuthal angle is now the third argument but it varies from -Pi to Pi, not from 0 to 2Pi as it does in fieldplot3d. I hoped to use both fieldplot3d and VectorField  with my vector fields but I cannot since they are not consistent in the definition of spherical coordinates.

My questions therefore are:

1) Is there a way to redifine spherical coordinates in VectorField command to make them consistent with the rest of Maple?

2) Can I produce a uniform 3D distribution of arrows for a field in spherical coordinates without VectorField command?

Many thanks for your help in advance!

Figure;
                             Figure
restart;
A[0] := 0;
                               0
A[1] := sqrt(2*(k[1]^2-w[1]^2))/sqrt(lambda);
                                       (1/2)
                    /      2         2\     
                    \2 k[1]  - 2 w[1] /     
                    ------------------------
                                (1/2)       
                          lambda            
A[2] := sqrt(2*(k[2]^2-w[2]^2))/sqrt(lambda);
                                       (1/2)
                    /      2         2\     
                    \2 k[2]  - 2 w[2] /     
                    ------------------------
                                (1/2)       
                          lambda            
c[1] := 1;
                               1
c[2] := 1;
                               1
c[3] := 1;
                               1
c[4] := 1;
                               1
c[5] := 1;
                               1
c[6] := 1;
                               1
k[1] := 10.5;
                              10.5
k[2] := 3.5;
                              3.5
w[1] := 5.05;
                              5.05
w[2] := .5;
                              0.5
m := 1.9;
                              1.9
lambda := 1.75;
                              1.75
xi[1] := -t*w[1]+x*k[1];
                        -5.05 t + 10.5 x
xi[2] := -t*w[2]+x*k[2];
                         -0.5 t + 3.5 x
a := m/sqrt(k[1]^2-w[1]^2);
                          0.2063907138
b := m/sqrt(k[2]^2-w[2]^2);
                          0.5484827558
g := a*(c[2]*cos(a*xi[1])-c[3]*sin(a*xi[1]));
0.2063907138 cos(2.167102495 x) - 0.2063907138 sin(2.167102495 x)
h := c[1]+c[2]*sin(a*xi[1])+c[3]*cos(a*xi[1]);
          1 + sin(2.167102495 x) + cos(2.167102495 x)
G := b*(c[5]*cos(b*xi[2])-c[6]*sin(b*xi[2]));
0.5484827558 cos(1.919689645 x) - 0.5484827558 sin(1.919689645 x)
H := c[4]+c[5]*sin(b*xi[2])+c[6]*cos(b*xi[2]);
          1 + sin(1.919689645 x) + cos(1.919689645 x)
u := A[0]+A[1]*[g/h]+A[2]*[G/H];
  [                     1                                   
  [------------------------------------------- (3.703280398 
  [1 + sin(1.919689645 x) + cos(1.919689645 x)              

    (0.5484827558 cos(1.919689645 x)

     - 0.5484827558 sin(1.919689645 x))) + 

                         1                                   
    ------------------------------------------- (9.841457496 
    1 + sin(2.167102495 x) + cos(2.167102495 x)              

    (0.2063907138 cos(2.167102495 x)

                                        ]
     - 0.2063907138 sin(2.167102495 x)))]
                                        ]
plot3d(Re(u), x = -20 .. .20, t = -20 .. .20);
Error, invalid input: `simpl/Re` expects its 1st argument, x, to be of type {boolean, algebraic}, but received [3.703280398*(.5484827558*cos(1.919689645*x)-.5484827558*sin(1.919689645*x))/(1+sin(1.919689645*x)+cos(1.919689645*x))+9.841457496*(.2063907138*cos(2.167102495*x)-.2063907138*sin(2.167102495*x))/(1+sin(2.167102495*x)+cos(2.167102495*x))]
t := 0;
                               0
plot(u, x = -15 .. 15);

I don't know how to simplify the expression A/B in the worksheet below.  I know that it should simplify to exp(I*Pi/3).  How do I lead Maple to discover that result without telling it the solution ahead of the time?  All variables other than A and B are real.

restart;

local gamma:

A := I*sqrt(3) + 2*c*exp(I*(gamma+(1/3)*Pi)) + 2*a*exp(I*alpha) - 2*a*exp(I*(alpha+(1/3)*Pi)) - 2*b*exp(I*beta) - 1;

I*3^(1/2)+2*c*exp(I*(gamma+(1/3)*Pi))+2*a*exp(I*alpha)-2*a*exp(I*(alpha+(1/3)*Pi))-2*b*exp(I*beta)-1

B := I*sqrt(3) - 2*a*exp(I*(alpha+(1/3)*Pi)) - 2*b*exp(I*beta) + 2*b*exp(I*(beta+(1/3)*Pi)) + 2*c*exp(I*gamma) + 1;

I*3^(1/2)-2*a*exp(I*(alpha+(1/3)*Pi))-2*b*exp(I*beta)+2*b*exp(I*(beta+(1/3)*Pi))+2*c*exp(I*gamma)+1

How to show that A/B = e^((1/3)*i*Pi)?

 

Download mw.mw

First 722 723 724 725 726 727 728 Last Page 724 of 2427