MaplePrimes Questions

Dear Users!

Hope everyone is fine here. I want to formulate the table like give bellow (Table 5.17) in maple so that I can copy it in word file and can edit.

The values of y[1,1],y[2,1],y[2,2],y[3,1],y[3,2],y[3,3]...y[nops(HAq),nops(HAq)] present in the following maple code. Thanks in advance

Refine_Extrapolation.mw

I'm a bit confused about set ordering.

According to help there are those features

  1. object id (same kind of data-structures to be grouped togther)
  2. object length
  3. lexicographical or numerical orders
  4. recurse on components
  5. address

Have a look at the following set.

  • If object length has higher priority than lexicographical order, why is HBSEVO before LBS?
  • If lexicographical order has higher priority, which is HBSPLATEEVO after VGZEVO?

Download SetSortOrder.mw

I asked before how to determine whether a graph is  outerplanar graph.  vv  and  Carl Love  provided very good guidance. 

https://www.mapleprimes.com/questions/229128--How-To-Determine-If-A-Graph-Is-Outerplanar

 Today I tried to use the previous code to further determine whether a plane graph is maximal outerplanar graph.

maximal outerplanar graph is an outerplanar graph that cannot have any additional edges added to it while preserving outerplanarity.

IsOuterplanar:= proc(G::Graph)
uses GT= GraphTheory;
    GT:-IsPlanar(GT:-GraphJoin(G, GT:-PathGraph(1)))
end proc:
IsmaximalOuterplanar:= proc(G::Graph)
uses GT= GraphTheory:
local glist, Outerplanartest:
      glist:= map[2](GT:-AddEdge,G,GT:-Edges(GT:-GraphComplement(G)),inplace = false ):
       Outerplanartest:=IsOuterplanar~(glist):
      if evalb(true in Outerplanartest) then  
         return false:
       else
         return true:
      fi:
end proc:

I feel that the  above adding edges in programs is a bit inefficient.

So I wonder if there is a better way.  Then I want to start from property of this graph class.

Some Properties:

  1. Every maximal outerplanar graph with n vertices has exactly 2n − 3 edges.
  2. A graph on  n (>=3) vertices  is  maximal outerplanar graph  if and if  every bounded face of a maximal outerplanar graph is a triangle and boundary of  unbounded face  is  Hamiltonian cycle. 

I noticed the second one. I don’t know if it can be achieved through programming

I want to get some information about the degree sequence of the face with the help of the dual graph . But I know  dual graph not unique   since  there are different plane embeddings  for not 3 connected  planar graphs. 

Or is there a more efficient way?

 

 

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

First 424 425 426 427 428 429 430 Last Page 426 of 2428