MaplePrimes Questions

plot3d([arctan(-tan(u/4)) + ((cosh(v) - sinh(v))*sin(u))/2, -v/2 + ((cosh(v) - sinh(v))*cos(u))/2, 2*(cosh(v/2) - sinh(v/2))*sin(u/2)], u = 0 .. 6*Pi, v = -1 .. 1, grid = [80, 15], orientation = [50, 79], shading = XYZ, style = patch)

I started to draw minimal surfaces in Maple and I noticed a problem with the parameterization of the function. When I have piecwise function like this arctan(-tan(u/4)) which graph I sent below the 3dplot shows this discontinuity. If it was only 2dplot I could use discont in the code but here I don't see a good solution.

I found these two posts but I can't translate it into a problem with the given parameterization, thank you for all advise.

https://www.mapleprimes.com/questions/200617-Analog-Of--Disconttrue--In--Plot3d

https://www.mapleprimes.com/questions/151216-Maple-Plotting-Discontinuous-Functions


 

Instead of the nice output from the help, I get the following message:

with(GlobalOptimization);

          [GetLastSolution, GlobalSolve, Interactive]

GlobalSolve(x3 - y3 - x + y, {x2 + 2*y <= 6}, x = 0 .. 5, y = 0 .. 5);
Error, (in GlobalOptimization:-GlobalSolve) finite bounds must be provided for all variables

 


 

I have the following expresion:

G_{ik}=|u_{i} - u_{k}|-(u_{i}-u_{k})^2

 

Where i, k=1,2,3,4. How can I write this expresion in maple? I want to be able to write G_{1 2} and in the RHS

Hi all, 

I am trying to plot the amplitude spectrum of a square wave. I plotted the wave by using its fourier series but I want to find the 5th harmonic which should be around 0.5 however, maplesoft retruns it as 0.7 for some reason. When the stem plot is plotted even that look likes 0.5 at the 5th harmonic but the F(5) is giving wrong value. 

Please have a look at the screenshot and file attached. 

Pulse_width_8us.mw

 

(Note: Maple was not giving wrong answer, I accidently uploaded the wrong file and have edited/updated the question)

I want to perform a numerical evaluation of sums of integrals of relatively complicated functions. I know about the evalf(Int( )) and evalf(Sum( )) commands to numerically evaluate both sums and integrals individually. My question is: what is the time-efficient way to numerically evaluate a sum of integrals? 

Here is a simplified sketch of what I have.

Say I define my complicated function F of the variable x (which will be integrated over) and of some constant parameter n.

I am interested in numerically evaluating in a time efficient way the following sum of integrals of F:

Where should I apply the evalf() command(s)? Should I go evalf(Sum( evalf(Int( )))) or evalf(Sum( Int())) or sum( evalf(Int( ))), or something else? I am not too worried about the accuracy here: it is for plots mainly. How to make this numercal evaluation fast?

Bonus question. If now I make F also depend on t, and wish to define a function G(t) out of a linear combination of such sums of integrals: is the method the same? I can have G(t) defined numerically with a t dependance. For example:

Thanks a lot!

PS: F is a complicated function in the sense that it is rationnal in some (non-usual) polynomials defined by a Rodrigues Rormula. The integrand has no singularity on the domain of integration. I have Maple 2018.

complexplot3d((z - 1)/(z^2 + z + 1), z = -4 - 4*I .. 4 + 4*I, view = [-2 .. 2, -2 .. 2, 0 .. 2], grid = [70, 70], shading = zhue)

How can I change this color of complex plot to take mirror image of my enhanced portrait? I see this is inverse but I don't know the source of this situation. I guess that zhue is indicaded by H = arg(f(z)) L = l(|f(z)|) S=1 in MAPLE but I don't know how to transfer and change this to the second picture coloring. I built the code for the second picture using codes from this post:

https://www.mapleprimes.com/questions/226790-Is-There-Any-Maple-Code-For-The-domain

 

I want to present this complexplot with the same coloring so thank for all yours advise.

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 

First 304 305 306 307 308 309 310 Last Page 306 of 2308