MaplePrimes Questions

restart;
T := diff(Phi(xi), xi);
                           d          
                          ---- Phi(xi)
                           dxi        
restart;
T := (p*a^(-Phi(xi))+q+r*a^Phi(xi))/ln(a);
                    (-Phi(xi))          Phi(xi)
                 p a           + q + r a       
                 ------------------------------
                             ln(a)             
u[0] := C[0]+C[1]*a^Phi(xi)+C[2]*a^(2*Phi(xi));
                         Phi(xi)         (2 Phi(xi))
            C[0] + C[1] a        + C[2] a           
u[1] := diff(u[0], xi);
               Phi(xi) / d          \      
         C[1] a        |---- Phi(xi)| ln(a)
                       \ dxi        /      

                      (2 Phi(xi)) / d          \      
            + 2 C[2] a            |---- Phi(xi)| ln(a)
                                  \ dxi        /      
d[1] := C[1]*a^Phi(xi)*T*ln(a)+2*C[2]*a^(2*Phi(xi))*T*ln(a);
         Phi(xi) /   (-Phi(xi))          Phi(xi)\
   C[1] a        \p a           + q + r a       /

                (2 Phi(xi)) /   (-Phi(xi))          Phi(xi)\
      + 2 C[2] a            \p a           + q + r a       /
u[2] := diff(d[1], xi);
      Phi(xi) / d          \       /   (-Phi(xi))    
C[1] a        |---- Phi(xi)| ln(a) \p a           + q
              \ dxi        /                         

        Phi(xi)\         Phi(xi) /
   + r a       / + C[1] a        |
                                 \
    (-Phi(xi)) / d          \      
-p a           |---- Phi(xi)| ln(a)
               \ dxi        /      

        Phi(xi) / d          \      \           (2 Phi(xi)) / d  
   + r a        |---- Phi(xi)| ln(a)| + 4 C[2] a            |----
                \ dxi        /      /                       \ dxi

          \       /   (-Phi(xi))          Phi(xi)\          
   Phi(xi)| ln(a) \p a           + q + r a       / + 2 C[2] 
          /                                                 

   (2 Phi(xi)) /    (-Phi(xi)) / d          \      
  a            |-p a           |---- Phi(xi)| ln(a)
               \               \ dxi        /      

        Phi(xi) / d          \      \
   + r a        |---- Phi(xi)| ln(a)|
                \ dxi        /      /
d[2] := C[1]*a^Phi(xi)*T*ln(a)*(p*a^(-Phi(xi))+q+r*a^Phi(xi))+C[1]*a^Phi(xi)*(-p*a^(-Phi(xi))*T*ln(a)+r*a^Phi(xi)*T*ln(a))+4*C[2]*a^(2*Phi(xi))*T*ln(a)*(p*a^(-Phi(xi))+q+r*a^Phi(xi))+2*C[2]*a^(2*Phi(xi))*(-p*a^(-Phi(xi))*T*ln(a)+r*a^Phi(xi)*T*ln(a));
                                              2                  
      Phi(xi) /   (-Phi(xi))          Phi(xi)\          Phi(xi) /
C[1] a        \p a           + q + r a       /  + C[1] a        \
    (-Phi(xi)) /   (-Phi(xi))          Phi(xi)\
-p a           \p a           + q + r a       /

        Phi(xi) /   (-Phi(xi))          Phi(xi)\\
   + r a        \p a           + q + r a       //

                                                         2       
             (2 Phi(xi)) /   (-Phi(xi))          Phi(xi)\        
   + 4 C[2] a            \p a           + q + r a       /  + 2 C[

      (2 Phi(xi)) /
  2] a            \
    (-Phi(xi)) /   (-Phi(xi))          Phi(xi)\
-p a           \p a           + q + r a       /

        Phi(xi) /   (-Phi(xi))          Phi(xi)\\
   + r a        \p a           + q + r a       //
expand((2*k*k)*w*beta*d[2]-(2*alpha*k*k)*d[1]-2*w*u[0]+k*u[0]*u[0]);
          2                         Phi(xi)
-2 alpha k  C[1] p + 2 k C[0] C[1] a       

                             2                      3     
                   / Phi(xi)\             / Phi(xi)\      
   + 2 k C[0] C[2] \a       /  + 2 k C[1] \a       /  C[2]

                      2             Phi(xi)
   - 2 w C[0] + k C[0]  - 2 w C[1] a       

                        2                     2
              / Phi(xi)\          2 / Phi(xi)\ 
   - 2 w C[2] \a       /  + k C[1]  \a       / 

                       4                                
           2 / Phi(xi)\       2              Phi(xi)    
   + k C[2]  \a       /  + 4 k  w beta C[1] a        p r

                                2    
        2             / Phi(xi)\     
   + 6 k  w beta C[1] \a       /  q r

         2              Phi(xi)    
   + 12 k  w beta C[2] a        p q

                                 2    
         2             / Phi(xi)\     
   + 16 k  w beta C[2] \a       /  p r

                                 3                          
         2             / Phi(xi)\           2              2
   + 20 k  w beta C[2] \a       /  q r + 4 k  w beta C[2] p 

                                                            2  
              2       Phi(xi)              2      / Phi(xi)\   
   - 2 alpha k  C[1] a        q - 2 alpha k  C[1] \a       /  r

                                                            2  
              2       Phi(xi)              2      / Phi(xi)\   
   - 4 alpha k  C[2] a        p - 4 alpha k  C[2] \a       /  q

                               3                         
              2      / Phi(xi)\         2                
   - 4 alpha k  C[2] \a       /  r + 2 k  w beta C[1] p q

        2              Phi(xi)  2
   + 2 k  w beta C[1] a        q 

                                3   
        2             / Phi(xi)\   2
   + 4 k  w beta C[1] \a       /  r 

                                2   
        2             / Phi(xi)\   2
   + 8 k  w beta C[2] \a       /  q 

                                 4   
         2             / Phi(xi)\   2
   + 12 k  w beta C[2] \a       /  r 
value(%);
          2                         Phi(xi)
-2 alpha k  C[1] p + 2 k C[0] C[1] a       

                             2                      3     
                   / Phi(xi)\             / Phi(xi)\      
   + 2 k C[0] C[2] \a       /  + 2 k C[1] \a       /  C[2]

                      2             Phi(xi)
   - 2 w C[0] + k C[0]  - 2 w C[1] a       

                        2                     2
              / Phi(xi)\          2 / Phi(xi)\ 
   - 2 w C[2] \a       /  + k C[1]  \a       / 

                       4                                
           2 / Phi(xi)\       2              Phi(xi)    
   + k C[2]  \a       /  + 4 k  w beta C[1] a        p r

                                2    
        2             / Phi(xi)\     
   + 6 k  w beta C[1] \a       /  q r

         2              Phi(xi)    
   + 12 k  w beta C[2] a        p q

                                 2    
         2             / Phi(xi)\     
   + 16 k  w beta C[2] \a       /  p r

                                 3                          
         2             / Phi(xi)\           2              2
   + 20 k  w beta C[2] \a       /  q r + 4 k  w beta C[2] p 

                                                            2  
              2       Phi(xi)              2      / Phi(xi)\   
   - 2 alpha k  C[1] a        q - 2 alpha k  C[1] \a       /  r

                                                            2  
              2       Phi(xi)              2      / Phi(xi)\   
   - 4 alpha k  C[2] a        p - 4 alpha k  C[2] \a       /  q

                               3                         
              2      / Phi(xi)\         2                
   - 4 alpha k  C[2] \a       /  r + 2 k  w beta C[1] p q

        2              Phi(xi)  2
   + 2 k  w beta C[1] a        q 

                                3   
        2             / Phi(xi)\   2
   + 4 k  w beta C[1] \a       /  r 

                                2   
        2             / Phi(xi)\   2
   + 8 k  w beta C[2] \a       /  q 

                                 4   
         2             / Phi(xi)\   2
   + 12 k  w beta C[2] \a       /  r 
simplify(%);
           2                         Phi(xi)
 -2 alpha k  C[1] p + 2 k C[0] C[1] a       

                     (2 Phi(xi))             (3 Phi(xi))     
    + 2 k C[0] C[2] a            + 2 k C[1] a            C[2]

                (2 Phi(xi))         2  (2 Phi(xi))
    - 2 w C[2] a            + k C[1]  a           

            2  (4 Phi(xi))            2       (2 Phi(xi))  
    + k C[2]  a            - 2 alpha k  C[1] a            r

               2       (2 Phi(xi))  
    - 4 alpha k  C[2] a            q

               2       (3 Phi(xi))                      2
    - 4 alpha k  C[2] a            r - 2 w C[0] + k C[0] 

                Phi(xi)      2              (2 Phi(xi))    
    - 2 w C[1] a        + 6 k  w beta C[1] a            q r

          2              (2 Phi(xi))    
    + 16 k  w beta C[2] a            p r

          2              (3 Phi(xi))    
    + 20 k  w beta C[2] a            q r

         2              Phi(xi)    
    + 4 k  w beta C[1] a        p r

          2              Phi(xi)          2              2
    + 12 k  w beta C[2] a        p q + 4 k  w beta C[2] p 

               2       Phi(xi)              2       Phi(xi)  
    - 2 alpha k  C[1] a        q - 4 alpha k  C[2] a        p

         2              (3 Phi(xi))  2
    + 4 k  w beta C[1] a            r 

         2              (2 Phi(xi))  2
    + 8 k  w beta C[2] a            q 

          2              (4 Phi(xi))  2      2                
    + 12 k  w beta C[2] a            r  + 2 k  w beta C[1] p q

         2              Phi(xi)  2
    + 2 k  w beta C[1] a        q 
collect(%, a^Phi(xi));
Error, (in collect) cannot collect a^Phi(xi)
 

Is it possible to auto close brackets in Maple? Like when I type "sin(pi" it would automatically create a closing bracket and I could just press enter to calculate

I am trying to find Lie subalgebra for finding optimal solutions directly with the help of MAPLE.  Please help me to find it. Share MAPLE code please.

Any good online training for maple soft to purchase 

How to solve this differential equation numerically

eq:=diff(f(tau), tau) =Af(tau) +Lf(tau) +C+Bf(tau)

Hello everyone, I am very new to Maple so please bear with me. I have created a procuedure that rearranges 

NaturalNumbers:=proc(k)
[$1..2*k-1]
end proc;

Into 

eq_arrangement:=proc(k)  local i,j,a;  for i from 1 to k-1 do 
  a[2*i-1]:=k+i; 
  a[2*i]:=k-i; 
end do:
[k,seq(a[j],j=1..2*(k-1))];end proc; 

 

My question is how I can repeat this procudure the sufficient number of times until I get back to [$1..2*k-1] in that order. 

 

Thank you so much!

 

 

Hi,

I'm trying to plot the function below. However, I cannot get the plot to exceed 10 on the x-axis. I have tried changing the axis properties but the function is just "cut off". I have had the same problem with similar functions and ended up using other software.

The function should have valid values above 10.

 

Does anyone know how I can fix this?

h := x -> 1.23 + x*1*0.0001 + 0.12*log(50000*x) + abs((-1)*0.03*log(x/0.001))

Thank you in advance :)

Hello, dear All

I have Maple2021 installed and I'll use the newest Physics Version. But
it does not work.

How can I activate the Physic Version 935?

When I start the file: "Wirtinger_Derivatives.mw"  I get

With kind regards

Wolfgang Gellien
 

I have found few PDE's so far  that timeout in Maple 2021 which did not do that in Maple 2020.2. Using same amount of time out, on same PC.

After some debugging, I found that that cause is calling latex:-Settings(....) before calling  timelimit(pdsolve(...))  causes the timeout.

At first, I thought this must be coincidence. Why would calling latex make pdsolve timeout?

So I tried again and again and again. Each time, removing the call to latex makes pdsolve not time out. Putting latex call back in, now pdsolve times out. Each time restart is always called (in new cell) before.

The timeout is 10 minutes.  Without latex called before, pdsolve took about about 5 minutes on my PC to solve the PDE.  

Any one could see if they can reproduce this?

Why would calling latex:-Settings(....)  causes pdsolve now use all 10 minutes and then timeout? This is very strange.

Maple 2021. Latex Physics package. Windows 10.

attached is worksheet showing this with many tries.

restart;
latex:-Settings(UseImaginaryUnit=i,
      UseColor = false,
      powersoftrigonometricfunctions= mixed, ## computernotation,
      leavespaceafterfunctionname = true,
      cacheresults = false,
      spaceaftersqrt = true  
);

pde :=  a*ln(lambda*x)^n*diff(w(x,y),x)+ b*ln(mu*x)^m*diff(w(x,y),y) = c*ln(nu*x)^k*w(x,y)+p*ln(beta*y)^s+q;
timelimit(60*10,pdsolve(pde,w(x,y)));

#Error, (in expand) time expired
#OR 
#Error, (in evala/Divide/heuristic) time expired


restart;
pde :=  a*ln(lambda*x)^n*diff(w(x,y),x)+ b*ln(mu*x)^m*diff(w(x,y),y) = c*ln(nu*x)^k*w(x,y)+p*ln(beta*y)^s+q;
timelimit(60*10,pdsolve(pde,w(x,y)));

#no problem solution found.

 

why_time_out_with_latex_march_23_2021.mw


I can't understand how to use Optimization in Operator Form when the objective function relies upon the numerical solution of a parameterized ODE.

Here is a very simple example :

  • I have a differential system that can be solved only numerically (so do not focus on the system I give to reply that I could solve it formally, I know that and the example is notional)
  • This system contains free parameters (K and M in my example) and an event whose firing time T I want to capture. 
  • The goal is to find what is the maximum value of T when K and M both belong to bounded ranges.
     
  • In the example I implicitely assumed that the event is fired for any (K, M) in their admissible ranges: this is a quite restrictive assumption that I will manage later.
restart:
sys := { M*diff(x(t), t$2)=t-K*x(t), x(0)=0, D(x)(0)=0};
evs := [[x(t)-5, halt]];

sol := dsolve(sys, numeric, events=evs, parameters=[K, M]):
interface(warnlevel=0):

TV := proc(P)
  sol(parameters=P):
  sol(10):
  return sol(eventfired=[1])[];
end proc:

# verification
TV([1$2])
                   HFloat(4.152620782382694)

# what I'm interested in
ranges := P[1]=0.8..1.2, P[2]=0.8..1.2:
Optimization:-NLPSolve(TV, ranges);
Error, (in Optimization:-NLPSolve) unexpected parameters: P[1] = .8 .. 1.2, P[2] = .8 .. 1.2

# another way
cstr := {0.8 < P[1], 1.2 > P[1], 0.8 < P[2], 1.2 > P[2]}:
Optimization:-Maximize(TV, cstr);
Error, (in Optimization:-NLPSolve) constraints must be specified as a set or list of  procedures


optim_parametric_dsolve.mw


I'm using both Maple 2015 and Maple 2020 and would appreciate an answer which fits these two versions.
Could you help me solve this issue?

TIA

K := x^3*y^4 + 6*x^2*y^3 + 3*x*y^4 + x^2*y^2 + 2*x*y^3;

f := (x, y) -> K; f(t, x);

 

It displays as x^3*y^4 + 6*x^2*y^3 + 3*x*y^4 + x^2*y^2 + 2*x*y^3;

 

instead of t^3*x^4 + 6*t^2*x^3 + 3*t*x^4 + t^2*x^2 + 2*t*x^3

 

But if i do direct assignment like f := (x, y) ->x^3*y^4 + 6*x^2*y^3 + 3*x*y^4 + x^2*y^2 + 2*x*y^3;

Then f(t,x) becomes and displays as t^3*x^4 + 6*t^2*x^3 + 3*t*x^4 + t^2*x^2 + 2*t*x^3;

But I want it like f:=(x,y)->K Later I should be able to make f(t,x) or f(p,s) like that K i can take some arbitary polynomial

Hi trying plot phase plane with these critical points. Howver what would I put for y at P1 to make it display when all y values

with(plots);
with(plottools);
with(DEtools);
solve({x*y = 0, x^2*y - x^2 = 0}, {x, y});
                         {x = 0, y = y}
initialset := {seq(seq([x(0) = a, y(0) = b], a = -2 .. 2), b = -2 .. 2)};
initialset := {[x(0) = -2, y(0) = -2], [x(0) = -2, y(0) = -1],

  [x(0) = -2, y(0) = 0], [x(0) = -2, y(0) = 1],

  [x(0) = -2, y(0) = 2], [x(0) = -1, y(0) = -2],

  [x(0) = -1, y(0) = -1], [x(0) = -1, y(0) = 0],

  [x(0) = -1, y(0) = 1], [x(0) = -1, y(0) = 2],

  [x(0) = 0, y(0) = -2], [x(0) = 0, y(0) = -1],

  [x(0) = 0, y(0) = 0], [x(0) = 0, y(0) = 1],

  [x(0) = 0, y(0) = 2], [x(0) = 1, y(0) = -2],

  [x(0) = 1, y(0) = -1], [x(0) = 1, y(0) = 0],

  [x(0) = 1, y(0) = 1], [x(0) = 1, y(0) = 2],

  [x(0) = 2, y(0) = -2], [x(0) = 2, y(0) = -1],

  [x(0) = 2, y(0) = 0], [x(0) = 2, y(0) = 1], [x(0) = 2, y(0) = 2]

  }
A := DEplot([diff(x(t), t) = x(t)^2*y(t) - x(t)^2, diff(y(t), t) = x(t)*y(t)], [x(t), y(t)], t = -3 .. 3, x = -8 .. 6, y = -5 .. 7, initialset, stepsize = 0.01, color = blue, linecolor = magenta, arrows = medium, axes = boxed, size = [1250, 1250]);
P1 := ellipse([0, y], 0.1, 0.15, filled = true, color = black);
Error, (in Plot:-TranslateOptions) unexpected options: [[0, y], .1, .15]
display([P1, A]);

 

Hi everyone,
Could you tell me please if I have a polynomial vector of combinations x[i] x[j] (huge), how to recover the homogenuous part of some degree d ? and how to get a vector of coeficients of each combination of that vector please ?
In the following a simple example, 
V:=Vector[column](2, [3*x[1]^4*x[2]^2 + 7*x[1]^3*x[2]^3 + 6*x[1]^2*x[2]^4 + 7*xi[1]*xi[2]^5 + 65*xi[1]^3 + 76*xi[1]^2*xi[2] + 56*xi[1]^2*xi[3], 13*x[1]^6 - 7*x[1]^5*x[2] + 30*x[1]^4*x[2]^2 + 75*x[1]^3*x[2]^3 + 130*x[1]^2*x[2]^4 + 54*xi[1]*xi[2]^5 + 43*xi[2]^6 + xi[2]^2*xi[3] + 76*xi[2]^2*xi[4] + 43*xi[2]*xi[3]^2]); 
The homogenuous part of degree 3 is then 
Vector[column](2, [65*xi[1]^3 + 76*xi[1]^2*xi[2] + 56*xi[1]^2*xi[3], xi[2]^2*xi[3] + 76*xi[2]^2*xi[4] + 43*xi[2]*xi[3]^2]).h

thanks in advance,
Best regards

When inside a section, why typing a command or any Maple expression, makes the cursor jump to outside the section after that?

Is it possible to create a new cell (i.e. >) and jump to that, so to remain inside the section?

Currently, I have to do CTRL-J to make new exection group, i.e. >, below the current one and remain inside the section, which is too much work. 

This is using worksheet mode. I see an option in tools->options->display to do that automatically. Which is great. But it does not work inside a SECTION. 

This is how to reproduce

1. set  tools->options->display->always insert new execution group after executing

2. In worksheet, click on insert->section to make new section.

3. in the first cell inside the section, type any Maple command or statement. Now you will see the cursor jumps outside the section, and makes new exection group (i.e. >).  But my cursor is now outside the section. So I have to move it back to inside the section.

I want to remain inside the section and have ">" be created inside the section.

Is this possible?

Maple 2021, windows. Worksheet mode.

I will make small movie to illustrate.

 

sometimes when I see such things, I get the feeling that the folks who develop the interface at Maplesoft, do not use it too much themselves. Else they would have noticed this annoyance in using sections. 

When inside a section, one would expect that a new exection cell to be created inside the section itself and not outside. 

 

Comparing the following 2 outputs, all done using worksheet mode. They are same expression. But one is generated using assignment and one using function definition (with arrow).

restart;
expr:=sinh(Pi)/Pi*(1+  Sum( (-1)^n/(1+n^2)*(cos(n*x)+n*sin(n*x)),n=1..m)):
f1:=expr;
f2:=unapply(expr,x);

Why Maple 2D display shows small dot for multiplication in the second case, but not in the first? Is there a way to remove this dot? I do not like it and find it distracting.  I looked at options->display and see nothing there to affect this.

 

Maple 2021 on windows 10

 

First 78 79 80 81 82 83 84 Last Page 80 of 2084