Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

Help me to solve this problem with pdsolve

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

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 >, <a,b,c>.

 

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 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
 

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        /                           
 

 

 

 

Can anyone help get solution to a coupled pair of PDEs

Error, (in pdsolve/numeric/plot3d) unable to compute solution for t>HFloat(0.0):
Newton iteration is not converging..

I attach file: SemiclassicalTestfile.mw

Melvin

 

 


 

Hello, 

For a few days Maple crashs everytime i try to use the command "plot3d()". 

I had'nt this problem befor and I have no idea what the reason could be. It ist irrelevant what Funktion I try to visualize,  the window just get closed evertime.

I hope someone can help me.

Thank you!

Tom

Error, (in PDEtools/NumerDenom) invalid input: `PDEtools/NumerDenom` expects its 1st argument, ee, to be of type algebraic, but received {[(s_j*e^sigma*b^m*`σ_m`*y_i-s_j*e^sigma*beta*`σ_i`+s_j*e^sigma*b_ilo+(1/2)*b^(m+2)*`σ_j`*e^sigma*`σ_m`*y_i-b^2*`σ_j`*e^sigma*beta*`σ_i`+(1/2)*b^2*`σ_j`*e^sigma*b_ilo-(1/2)*b^(2*m)*`σ_m`^2*b_j*e^sigma*y_i+(1/2)*b^m*`σ_m`*b_j*e^sigma*beta*`σ_i`-(1/2)*b^m*`σ_m`*b_j*e^sigma*b_ilo+b_j*(s_ilo+(1/2)*(b^2*`σ_i`-b^m*`σ_m`*beta)*_lo)+b_j*(s_jlo+(1/2)*(b^2*`σ_j`-b^m*`σ_m`*beta)*_lo)+s_i*e^sigma*b^m*`σ_m`*y_j-s_i*e^sigma*be... when I use simplify I have this error. please guide me Saberali

Hi all,

I have a system of nonlinear equations with for equations, 4 variables I want to solve for, and 2 parameters. All of the variables and parameters must be non-negative.

The code I used to try to do this is:

Where eqi (i = 1, ... , 4) are expression (not equations in themselves). For example, eq1 is:

 

When I try to run this code I get the following error:

"Error, (in SolveTools:-Inequality:-Piecewise) piecewise takes at least 2 parameters"

 

Can anyone help me how I can make Maple do what I want here? :)

 

Thank you in advance,

JTamas

I am trying to solve the pde:= (d/dt)^2v+(d/dx)^2v+v=0 with initial boundary conditions v=xexp(x^2)

I use pdsolve to get v but I wish to tell pdsolve to use a different numerical method because my output of v is coming out like a step function.

Dear reader,

Have to create digital questions in Mobius on quaternions. Aim is to teach students of robot engineering about rotations besides the matrix rotations. Made some code, it works but very simplistic. I could not load a quarternion-toolbox.

Any suggestions?

# quaternion product
# define two vecotrs p and q:
$p0=range(3,3,1);
$px=range(1,1,1);
$py=range(-2,-2,1);
$pz=range(1,1,1);
$q0=range(2,2,1);
$qx=range(-1,-1,1);
$qy=range(2,2,1);
$qz=range(3,3,1);
$p=maple("Vector([$px,$py,$pz])");
$q=maple("Vector([$qx,$qy,$qz])");
$displayp=maple("printf(MathML:-ExportPresentation($p))");
$displayq=maple("printf(MathML:-ExportPresentation($q))");
# p.q=p0.q0-(p.q)+p0.q+q0.p+p*q
# scalar part
$dot=maple("LinearAlgebra[DotProduct]($p,$q,conjugate=false)");
$scalar_part=$p0*$q0-$dot;
# vector part
$cross=maple("LinearAlgebra[CrossProduct]($p,$q)");
$p0q=maple("LinearAlgebra[MatrixMatrixMultiply]($p0,$q)");
$q0p=maple("LinearAlgebra[MatrixMatrixMultiply]($q0,$p)");
$pq=maple("LinearAlgebra[VectorAdd]($p0q,$q0p)");
$vector_part=maple("LinearAlgebra[VectorAdd]($pq,$cross)");
$displayvector_part=maple("printf(MathML:-ExportPresentation($vector_part))");
# unit vectors
$i=maple("Vector([1,0,0])");
$j=maple("Vector([0,1,0])");
$k=maple("Vector([0,0,1])");
# generate answers
$x=maple("LinearAlgebra[DotProduct]($vector_part,$i)");
$y=maple("LinearAlgebra[DotProduct]($vector_part,$j)");
$z=maple("LinearAlgebra[DotProduct]($vector_part,$k)");
 

Best regards,

Nico Booij

I'm plotting some simple plots such as

plot(frac(x^2/3)*3,x=-5..5, discont=true);

 

Some discontinuities are connected. Using numpoints, resolution, and Digits doesn't help. Sometimes it will produce a plot with no connections but then other times it does. I need a general solution that is simple. Is there any way to refine the quality of discont?

 

discont=[usefdiscont=[bins=35]],

 

I have tried that and it seems to work but I haven't put it through the ringer. Is that all I have?

 

I wrote a code.mw for a numerical method for a PDE. (You can find the numerical method, exact solution and error between them in the code.)

The method depends on parameters k, M, which are any positive integers, and also depends on teta, beta>-1 which are real numbers.

According to the used method,

when k and M increase, we expect that the error (exact-numeric) generally decreases. 

In the code, I selected k=2, M=2, teta=1 and beta=1. And so k=2, M=2, CPU time is low. Error is not bad.

But for k=4, M=3 and also for bigger values of them, CPU time is high. I can' t get the solution.

Question 1: 

I don't know, but it may be possible to simplify the code in order to calculate for k=4, M=4?

Question 2:

I want to find optimal values of teta and beta for minimizing the error between numerical and exact solution, when k=2, M=2, or k=3, M=1 etc.

How can we write a Maple code for finding optimal values of teta and beta?

You can download the code.mw

 

 

 
 
 
 
 

Hello, I'm using free 15 day trial Maple 2019.2 on my Macbook (Macos 10.15.3).

I can't work Maple. I enter some inputs (2+3) and press enter. It works. But when I write plot, version(), f, sin.. or something else it didn't works. And no response. When I click enter, nothind happen. What is the problem? Please help me.. 

How do I simplify KdV equation in Maple by using =fxt))xx)?)


 

``

   I am by using =2*difffxtxx)
    My aim is to get the form
   diff((f*(diff(f, x, t))-(diff(f, x))*(diff(f, t))+f*(diff(f, x, x, x))-4*(diff(f, x, x, x))*(diff(f, x))+3*(diff(f, x, x))^2)/f^2, x) = 0

NULL

``

restart; with(PDEtools); with(DEtools)

``

alias(u = u(x, t)); declare(u(x, t)); alias(f = f(x, t)); declare(f(x, t))

u

 

` u`(x, t)*`will now be displayed as`*u

 

u, f

 

` f`(x, t)*`will now be displayed as`*f

(1)

KdV := diff(u, t)+6*u.(diff(u, x))+diff(u, x, x, x) = 0

diff(u, t)+6*(u.(diff(u, x)))+diff(diff(diff(u, x), x), x) = 0

(2)

KdV_f := eval(KdV, u = 2*(diff(ln(f), x, x)))

2*(diff(diff(diff(f, t), x), x))/f-2*(diff(diff(f, x), x))*(diff(f, t))/f^2-4*(diff(f, x))*(diff(diff(f, t), x))/f^2+4*(diff(f, x))^2*(diff(f, t))/f^3+6*((2*(diff(diff(f, x), x))/f-2*(diff(f, x))^2/f^2).(2*(diff(diff(diff(f, x), x), x))/f-6*(diff(diff(f, x), x))*(diff(f, x))/f^2+4*(diff(f, x))^3/f^3))+2*(diff(diff(diff(diff(diff(f, x), x), x), x), x))/f-10*(diff(diff(diff(diff(f, x), x), x), x))*(diff(f, x))/f^2+40*(diff(diff(diff(f, x), x), x))*(diff(f, x))^2/f^3-20*(diff(diff(diff(f, x), x), x))*(diff(diff(f, x), x))/f^2-120*(diff(diff(f, x), x))*(diff(f, x))^3/f^4+60*(diff(diff(f, x), x))^2*(diff(f, x))/f^3+48*(diff(f, x))^5/f^5 = 0

(3)

df := collect(KdV_f, f)

6*((2*(diff(diff(f, x), x))/f-2*(diff(f, x))^2/f^2).(2*(diff(diff(diff(f, x), x), x))/f-6*(diff(diff(f, x), x))*(diff(f, x))/f^2+4*(diff(f, x))^3/f^3))+(2*(diff(diff(diff(f, t), x), x))+2*(diff(diff(diff(diff(diff(f, x), x), x), x), x)))/f+(-2*(diff(diff(f, x), x))*(diff(f, t))-20*(diff(diff(diff(f, x), x), x))*(diff(diff(f, x), x))-4*(diff(f, x))*(diff(diff(f, t), x))-10*(diff(diff(diff(diff(f, x), x), x), x))*(diff(f, x)))/f^2+(60*(diff(diff(f, x), x))^2*(diff(f, x))+4*(diff(f, x))^2*(diff(f, t))+40*(diff(diff(diff(f, x), x), x))*(diff(f, x))^2)/f^3-120*(diff(diff(f, x), x))*(diff(f, x))^3/f^4+48*(diff(f, x))^5/f^5 = 0

(4)

factor(simplify(df, size))

2*(12*(((diff(diff(f, x), x))*f-(diff(f, x))^2)/f^2.(((diff(diff(diff(f, x), x), x))*f^2-3*(diff(diff(f, x), x))*(diff(f, x))*f+2*(diff(f, x))^3)/f^3))*f^5+f^4*(diff(diff(diff(f, t), x), x))+f^4*(diff(diff(diff(diff(diff(f, x), x), x), x), x))-f^3*(diff(diff(f, x), x))*(diff(f, t))-10*f^3*(diff(diff(f, x), x))*(diff(diff(diff(f, x), x), x))-2*f^3*(diff(f, x))*(diff(diff(f, t), x))-5*f^3*(diff(f, x))*(diff(diff(diff(diff(f, x), x), x), x))+30*f^2*(diff(diff(f, x), x))^2*(diff(f, x))+2*f^2*(diff(f, t))*(diff(f, x))^2+20*f^2*(diff(diff(diff(f, x), x), x))*(diff(f, x))^2-60*(diff(diff(f, x), x))*(diff(f, x))^3*f+24*(diff(f, x))^5)/f^5 = 0

(5)

``

``

``

``


 

Download KdV_simplify

First 77 78 79 80 81 82 83 Last Page 79 of 334