Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi,

I'm trying to plot:

y = x(x^4 - 10*x^2 + 39)/30

I keep getting a what looks like a straight line. it should be a curved line.

I got it to work on :

y = x(x^4 - 10*x^2 + 39)/30

https://www.mathway.com/Algebra

Hi,

I'm wanting to use nonlinear least squares fittting to minimise the error between two curves.

One curve, f, I know the parameters for and the other, f2 , I do not, which is what I am wanting to find through this methood.

f1=(2*x)/(3+5*x)  

f2=a1*(2-exp(-a2*x)) 

Any help would be muchly appricated, thank you in advance! 

I am trying to recreate an example,  See attached worksheet below.  I can't figure out what I am doing wrong here.  I have tried using the command StepProperties on other discrete transfer functions, without any problems.  Having a function that plots the Step Response of a system, Continuous or Discrete, should be built in.


 

Trying to recreate step response of discrete time system as in this example below:

 

https://www.mathworks.com/help/control/examples/creating-discrete-time-models.html

 

restart:with(DynamicSystems):interface(version);

`Standard Worksheet Interface, Maple 2019.2, Windows 7, November 26 2019 Build ID 1435526`

(1)

 

sysz:=TransferFunction((z-1)/(z^2-1.85*z+0.9),discrete,sampletime=0.1);

"module() ... end module"

(2)

propz:=StepProperties(sysz);

HFloat(0.0), [undefined, undefined], [undefined, undefined], [undefined, undefined], [undefined, undefined], [undefined, undefined], [undefined, undefined]

(3)

 

 


 

Download DiscreteStepResponseError.mw

Regards,

Georgios

I explore the "PracticeSheet" command of the "Basic" package, and I want to build two sheets on the Discriminant of polynomial ( send degree) and tangent to curves ( Derivative application). Do you have any ideas?

Many thanks!

DrillerConceptMaple.mwDrillerConceptMaple.mw

Hello,

I am Seonhwa Kim, a mathematical researcher in Korea. Recently, I have extensively used Maple to compute character varieties of 3-manifolds. Several months ago, I obtained some strange results in Maple which implies a contradiction in theory.  I have been struggling with these issues since it is usually about enormous polynomial systems.  Eventually, I could figure out that the issues are caused by a defect in Maple and were able to construct a minimal working example to produce wrong computations in Maple.  I am writing this post to report them.

 

This is mainly about the PolynomialIdeal package.  Along with the documentation in Maple, If an ideal J is radical, PrimeDecomposition and PrimaryDecomposition should have the same result.  But, as we see the following, the result of PrimeDecomposition and PrimaryDecomposition are different although J is a radical ideal.


The problem seems to be that the PrimaryDecomposition command in Maple sometimes produces incorrect results.

We can compute the primary decomposition of J by hand,  It should be <x> and  <y, x-1>.

I double-checked this by the other software;Macauley2, Singular, and Magma, for example, you can see it as follows.

 

 

 

Secondly, not only for PrimaryDecomposition but also PrimeDecomposition may produce an incorrect result.

Here is a minimal working example.

Maple tells us a compatible result of prime and primary decomposition of a radical ideal J.

But the first component of J,  < b-1, c-a+1 >, contains the third component < a, b-1, c+1 >.

It contradicts with the definition of Primary decomposition. So the correct answer should be  < b - 1, c - a +1 >.

 

I also checked that  Macaluey2, Singular and Magma. They all say that my hand computation is correct. as follows.


 

I have used Maple 2017 by the license of my institute (Korea Institute for Advanced Study).

When I noticed these defects, I thought it would be fixed in the newest Maple version.

So, I have tried my examples by Maple2019  free trial, but It also has the same problem. 

I guess this problem is not reported or recognized yet. 

 

I hope this problem will be fixed as soon as possible.

Thank you for attention.

 

Sincerely,

Seonhwa

Hello

I need to add a legend to a figure using dataplot (I am not even sure that is the right option).  In what follows I show what I did.

 

dataplot([28,28,28],[.6481496576, .648149657615473, .6512873548],style='point',colorscheme=["Blue","Orange","Red"],	
labels = ["k", "y(k)"], legend = ["10-digit precision", "15-digit precision", "Floating-point iteration"] ,legendstyle = [font = ["HELVETICA", 9], location = right]);

The outcome is

As can be seen some parts of the legend are missing.

 

How can I get this right? Do I have other ways to do the same thing?  

 

Many thanks

 

Ed

 

Suppose that we have a 3D plot in Maple like above. How can we adjust the ranges of the axes as follows? 

  • The ranges of axes x and axes t must be decimal like (0.1, 0.2 ,...,1)
  • The range of axes z must be scientific as figure above.

Maple sometimes automatically does it but sometimes doesn't it. I don't understand the logic behind it.

 
 
 
 
 

Hi all, why maple output alway change from `> =` to `<=` ? example

How to config to `>=`. Thank you very much

I am using an integal sign using Int. If there is a minus sign in front of it, then

I get the expression -(Int ... dx). Why is the parenthesis there? Can we avoind it?

Thank you!

mapleatha

 

Hi all,

How to get the real and imaginary parts of this complex expression.

Thank you in advance

real_imag_parts.mw

Hello every one
I have a question!
My code starts with assuming the time variable (t) to be specified in a an interval for each time that the for loop executes as follows:

discontinuity := [0.403e-8, 0.45e-8, 0.478e-8, 0.55e-8];
 for j from 1 to 3 do
assume(discontinuity[j]<=t,t<discontinuity[j+1]);

After that the code runs and calculate every thing. For the second time, I mean for J=2, it does not work properly.
T[1] is the result of its first running (for j=1):
T[1]:=3.000023586*10^(-6)*exp(-4977.085344*t~)-1.325122648*10^(-6)*exp(-4.015800624*10^9*t~)
When it wants to evaluate this expression at specific time such as discontinuity[2] it cannot evaluate it. I tried to use unapply command to consider it as a function of t but it did not work. Here is the results:
AA:=simplify(eval(T[1], t = discontinuity[1]));
This is its result:        AA:=3.000023586*10^(-6)*exp(-4977.085344*t~)-1.325122648*10^(-6)*exp(-4.015800624*10^9*t~)
Without unapply command:    AA:=T[1]
Please answer my question.
Thank you so much
 

Hi, 

Here is the minimal situation that reveals which that could be a (little) bug in the MAPLE 2015 version of Explore.

In the attached file y is a list of numbers and val(r) a procedure that just print the value the rth element of y.
Changing the value of r is done with Explore (of course of no interest at all).
If I define the parameter r as a list ( r=[1..numelems(y)] ), only the value of y[1] is displayed: changing the value of r generates an error.
This doesn(t happen if r is defined as a slider ( r=1..numelems(r) ).

I discovered than the initial instance of Explore defines r as an integer while all the others (due to a change of r) define r as a string.
In the last command of the attached file you will see hjow I have circumvent this problem.

Is it a bug in Explore or does it exist some way to force the values of r to the implicit type they have in r=[$1..numelems(y)] ?

TIA

Download explore.mw

 

I'd like to solve this ODE

But not sure how to write it in Maple. In Mathematica, this is what I do

ClearAll[F, x, y, t];
ode = D[F[x[t], y[t]], x[t]]*D[x[t], t] + D[F[x[t], y[t]], y[t]]*D[y[t], t] == 0;
DSolve[ode, F[x[t], y[t]], {x[t], y[t]}]

and it gives

In Maple, I tried

ode:=diff(F(x(t),y(t)),x(t))*diff(x(t),t)+diff(F(x(t),y(t)),y(t))*diff(y(t),t)=0

Error, invalid input: diff received x(t), which is not valid for its 2nd argument

ode:=D[1](F)(x(t),y(t))*diff(x(t),t)+D[2](F)(x(t),y(t))*diff(y(t),t)=0;
dsolve(ode,F(x(t),y(t)))

Error, (in dsolve) expected the indeterminate function as, say, F(x) where x is of type "name" - and also cannot be a procedure name. Received: [F(x(t), y(t))]

 

What is the correct way to write this in Maple?

 

 

Hello,

I want to sort the formulae to Psi and Beta, but I don't know how it works. I have tried it with sort, simplify, isolate, but that isn't what I'm searching.

It should looks like the simplier formula in the picture.

 

ab := (diff(Psii(t), t, t))*J-l[f]*(F[s, f, l]+F[s, f, r])+l[r]*(F[s, r, l]+F[s, r, r])-(1/2)*b[r]*(-F[s, r, l]*delta[l]+F[s, r, r]*delta[r]) = 0;
  / d  / d         \\                                   
  |--- |--- Psii(t)|| J - l[f] (F[s, f, l] + F[s, f, r])
  \ dt \ dt        //                                   

     + l[r] (F[s, r, l] + F[s, r, r])

       1                                                      
     - - b[r] (-F[s, r, l] delta[l] + F[s, r, r] delta[r]) = 0
       2                                                      
bc := (diff(betaa(t), t, t))*m*v*betaa(t)+F[s, r, l]*delta[l]+F[s, r, r]*delta[r]-(diff(Psii(t), t)) = 0;
    / d  / d          \\                                   
    |--- |--- betaa(t)|| m v betaa(t) + F[s, r, l] delta[l]
    \ dt \ dt         //                                   

                               / d         \    
       + F[s, r, r] delta[r] - |--- Psii(t)| = 0
                               \ dt        /    
cd := (diff(betaa(t), t))*m*v+F[s, r, l]+F[s, r, r]+F[s, f, l]+F[s, f, r]-(diff(Psii(t), t)) = 0;
   / d          \                                           
   |--- betaa(t)| m v + F[s, r, l] + F[s, r, r] + F[s, f, l]
   \ dt         /                                           

                     / d         \    
      + F[s, f, r] - |--- Psii(t)| = 0
                     \ dt        /    
F[s, f, l] := c[fl]*alpha[fl];
                        c[fl] alpha[fl]
F[s, f, r] := c[fr]*alpha[fr];
                        c[fr] alpha[fr]
F[s, r, l] := c[rl]*alpha[rl];
                        c[rl] alpha[rl]
F[s, r, r] := c[rr]*alpha[rr];
                        c[rr] alpha[rr]
alpha[fl] := (-v*betaa-l[f]*(diff(Psii(t), t)))/(-v+(1/2)*b[f]*(diff(Psii(t), t)));
                                 / d         \
                 -v betaa - l[f] |--- Psii(t)|
                                 \ dt        /
                 -----------------------------
                        1      / d         \  
                   -v + - b[f] |--- Psii(t)|  
                        2      \ dt        /  
alpha[fr] := (-v*betaa-l[f]*(diff(Psii(t), t)))/(v-(1/2)*b[f]*(diff(Psii(t), t)));
                                 / d         \
                 -v betaa - l[f] |--- Psii(t)|
                                 \ dt        /
                 -----------------------------
                       1      / d         \   
                   v - - b[f] |--- Psii(t)|   
                       2      \ dt        /   
alpha[rl] := delta[l]+(-v*betaa+l[r]*(diff(Psii(t), t)))/(-v+(1/2)*b[r]*(diff(Psii(t), t)));
                                       / d         \
                       -v betaa + l[r] |--- Psii(t)|
                                       \ dt        /
            delta[l] + -----------------------------
                              1      / d         \  
                         -v + - b[r] |--- Psii(t)|  
                              2      \ dt        /  
alpha[rr] := delta[r]+(-v*betaa+l[r]*(diff(Psii(t), t)))/(-v-(1/2)*b[r]*(diff(Psii(t), t)));
                                       / d         \
                       -v betaa + l[r] |--- Psii(t)|
                                       \ dt        /
            delta[r] + -----------------------------
                              1      / d         \  
                         -v - - b[r] |--- Psii(t)|  
                              2      \ dt        /  


ab;
                             /
                             |
/ d  / d         \\          |
|--- |--- Psii(t)|| J - l[f] |
\ dt \ dt        //          |
                             |
                             \

        /                / d         \\
  c[fl] |-v betaa - l[f] |--- Psii(t)||
        \                \ dt        //
  -------------------------------------
             1      / d         \      
        -v + - b[f] |--- Psii(t)|      
             2      \ dt        /      

           /                / d         \\\        /      /      
     c[fr] |-v betaa - l[f] |--- Psii(t)|||        |      |      
           \                \ dt        //|        |      |      
   + -------------------------------------| + l[r] |c[rl] |delta[
               1      / d         \       |        |      |      
           v - - b[f] |--- Psii(t)|       |        |      |      
               2      \ dt        /       /        \      \      

                       / d         \\
       -v betaa + l[r] |--- Psii(t)||
                       \ dt        /|
  l] + -----------------------------|
              1      / d         \  |
         -v + - b[r] |--- Psii(t)|  |
              2      \ dt        /  /

           /                           / d         \\\          /
           |           -v betaa + l[r] |--- Psii(t)|||          |
           |                           \ dt        /||   1      |
   + c[rr] |delta[r] + -----------------------------|| - - b[r] |
           |                  1      / d         \  ||   2      |
           |             -v - - b[r] |--- Psii(t)|  ||          |
           \                  2      \ dt        /  //          \
       /                           / d         \\         
       |           -v betaa + l[r] |--- Psii(t)||         
       |                           \ dt        /|         
-c[rl] |delta[l] + -----------------------------| delta[l]
       |                  1      / d         \  |         
       |             -v + - b[r] |--- Psii(t)|  |         
       \                  2      \ dt        /  /         

           /                           / d         \\         \   
           |           -v betaa + l[r] |--- Psii(t)||         |   
           |                           \ dt        /|         |   
   + c[rr] |delta[r] + -----------------------------| delta[r]| = 
           |                  1      / d         \  |         |   
           |             -v - - b[r] |--- Psii(t)|  |         |   
           \                  2      \ dt        /  /         /   

  0
bc;
 / d  / d          \\             
 |--- |--- betaa(t)|| m v betaa(t)
 \ dt \ dt         //             

            /                           / d         \\         
            |           -v betaa + l[r] |--- Psii(t)||         
            |                           \ dt        /|         
    + c[rl] |delta[l] + -----------------------------| delta[l]
            |                  1      / d         \  |         
            |             -v + - b[r] |--- Psii(t)|  |         
            \                  2      \ dt        /  /         

            /                           / d         \\         
            |           -v betaa + l[r] |--- Psii(t)||         
            |                           \ dt        /|         
    + c[rr] |delta[r] + -----------------------------| delta[r]
            |                  1      / d         \  |         
            |             -v - - b[r] |--- Psii(t)|  |         
            \                  2      \ dt        /  /         

      / d         \    
    - |--- Psii(t)| = 0
      \ dt        /    
cd;
 / d          \    
 |--- betaa(t)| m v
 \ dt         /    

            /                           / d         \\
            |           -v betaa + l[r] |--- Psii(t)||
            |                           \ dt        /|
    + c[rl] |delta[l] + -----------------------------|
            |                  1      / d         \  |
            |             -v + - b[r] |--- Psii(t)|  |
            \                  2      \ dt        /  /

            /                           / d         \\
            |           -v betaa + l[r] |--- Psii(t)||
            |                           \ dt        /|
    + c[rr] |delta[r] + -----------------------------|
            |                  1      / d         \  |
            |             -v - - b[r] |--- Psii(t)|  |
            \                  2      \ dt        /  /

            /                / d         \\
      c[fl] |-v betaa - l[f] |--- Psii(t)||
            \                \ dt        //
    + -------------------------------------
                 1      / d         \      
            -v + - b[f] |--- Psii(t)|      
                 2      \ dt        /      

            /                / d         \\                    
      c[fr] |-v betaa - l[f] |--- Psii(t)||                    
            \                \ dt        //   / d         \    
    + ------------------------------------- - |--- Psii(t)| = 0
                1      / d         \          \ dt        /    
            v - - b[f] |--- Psii(t)|                           
                2      \ dt        /                           
 

 

 

 

1 2 3 4 5 6 7 Last Page 1 of 1638