Maple 18 Questions and Posts

These are Posts and Questions associated with the product, Maple 18

I encountered this bizarre inconsistency issue that Maple18 generates different outputs when executing the same command:

test_res2:= factor( simplify( expand( value( subs( Perturbation_Sol, EQ_PX2_order_7 ) ) ) ) )

'EQ_PX2_order_7' is a rational expression in sin(i0), cos(i0), sin(uL), and cos(uL) with rational coefficient terms. It also has inert differentiation terms Diff( * , uL ).

'Perturbation_Sol' is a set of 171 elements in the form of 'parameter_name = expression'.

My goal is to check if substituting 'Perturbation_Sol' into 'EQ_PX2_order_7' yields 0. Since 'EQ_PX2_order_7' has inert differentiation terms, I've applied 'value' after using 'subs'. Then I apply 'expand', 'simplify', and 'factor' to reduce the result to the simplest form.

However, Maple18 generates different outputs when I just execute this repeatedly. Please see the worksheet "test.mw" for details. Any insight will be greatly appreciated! Also, I wonder if the same issue would happen when the worksheet is executed with newer versions of Maple.

EQN_SOL_test1.mla

test.mw

 

 

I encountered the problem with .m files originally. But MaplePrimes doesn't allow uploading .m files, so I had to save the expressions into the file "EQN_SOL_test1.mla", which is included in this question. Below we load the expressions from the .mla file first, and then save them into a .m file in order to recreate the problem that I encountered.

restart;

>

 

read "EQN_SOL_test1.mla":

# Load 'EQ_PX2_order_7' and 'Perturbation_Sol'

 

save

EQ_PX2_order_7,
Perturbation_Sol,

"EQN_SOL_test1_m.m";

# Save the expressions into a .m file

 

Now we demonstrate the inconsistency problem with .m files. Notice that Maple generates 3 possible outputs:

test_res2 := 0

test_res2 := -(1/4)*rho0^2*a0^2*Be^2*cos(uL)*J2re*R_earth^2*(5*cos(i0)^2*cos(uL)^2-7*cos(i0)^2-5*cos(uL)^2+4)/sha

 

test_res2 := -(1/8)*rho0^2*a0^2*Be^2*cos(uL)*J2re*R_earth^2*(5*cos(i0)^2*cos(uL)^2-7*cos(i0)^2-5*cos(uL)^2+4)/sha

 

The last 2 outputs cannot be reduced to 0 since 5*cos(i0)^2*cos(uL)^2-7*cos(i0)^2-5*cos(uL)^2+4 is nonzero as shown below.

 

 

plot3d( 5*cos(i0)^2*cos(uL)^2-7*cos(i0)^2-5*cos(uL)^2+4 , uL=0..2*Pi, i0=0..2*Pi );

 
 

restart;

 

read "EQN_SOL_test1_m.m":

 

length( EQ_PX2_order_7 );

939346

(1)

length( Perturbation_Sol );

2082306

(2)

numelems( Perturbation_Sol );

171

(3)

Perturbation_Sol[1..5];

# Just to give an example of what the elements in 'Perturbation_Sol' look like

{PX1[1] = 0, PX1[2] = 0, PX1[3] = -(1/4)*rho0*a0*Be, PX1[4] = (1/2)*rho0*a0*Be*WEra*cos(i0)-(3/16)*R_earth^2*a0*rho0*(3*cos(i0)^2-1)*J2re*Be/sha+(1/4)*Be*a0*rho0*X10[3]/sha, PX1[5] = (1/4)*rho0*a0*X10[4]*Be/sha-(1/256)*R_earth^4*a0*rho0*(163*cos(i0)^4-110*cos(i0)^2+19)*J2re^2*Be/sha^2+(3/16)*R_earth^2*a0*rho0*(3*cos(i0)^2-1)*J2re*Be*X10[3]/sha^2+(3/8)*cos(i0)*R_earth^2*WEra*a0*rho0*(3*cos(i0)^2-1)*J2re*Be/sha-(1/48)*Be^3*a0^3*rho0^3*s1/sha^2-(1/8)*Be*a0*rho0*X10[3]^2/sha^2-(1/2)*cos(i0)*WEra*a0*rho0*Be*X10[3]/sha-(1/16)*rho0*a0*(3*cos(i0)^2+1)*Be*WEra^2-(1/32)*Be^2*J2re*R_earth^2*a0^2*rho0^2*sin(i0)^2*sin(2*uL)/sha^2}

(4)

 

 

for j from 1 to 50 do
    test_res2:= factor( simplify( expand( value( subs( Perturbation_Sol, EQ_PX2_order_7 ) ) ) ) );
end do;

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

0

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

0

 

0

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

0

 

0

 

0

 

0

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

0

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

0

 

0

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

0

 

0

 

0

 

0

 

0

 

0

 

0

 

0

 

0

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

0

 

0

 

-(1/4)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

0

(5)

 

 

It seems that with .mla files the problem occurs in a different way! With "EQN_SOL_test1.mla", the outputs for all 50 iterations stay the same as

test_res2 := -(1/4)*rho0^2*a0^2*Be^2*cos(uL)*J2re*R_earth^2*(5*cos(i0)^2*cos(uL)^2-7*cos(i0)^2-5*cos(uL)^2+4)/sha               (A)

 

but they may all change to the following different result after retarting many times:

test_res2 := -(1/8)*rho0^2*a0^2*Be^2*cos(uL)*J2re*R_earth^2*(5*cos(i0)^2*cos(uL)^2-7*cos(i0)^2-5*cos(uL)^2+4)/sha               (B)

 

In particular, after a large number of test runs (i.e., open the file "test.mw", execute the worksheet, close the file, and repeat), the result (B) has only occured twice. The second appearance is saved here for you to view. Once you re-execute this worksheet, most likely all outputs below will change back to (A), and (B) will only reappear after a large number of reruns.

 

restart;

 

read "EQN_SOL_test1.mla":

# Load 'EQ_PX2_order_7' and 'Perturbation_Sol'

 

 

for j from 1 to 50 do
    test_res2:= factor( simplify( expand( value( subs( Perturbation_Sol, EQ_PX2_order_7 ) ) ) ) );
end do;

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

 

-(1/8)*rho0^2*a0^2*Be^2*cos(uL)*R_earth^2*J2re*(5*cos(uL)^2*cos(i0)^2-5*cos(uL)^2-7*cos(i0)^2+4)/sha

(6)

 

Download test.mw

HIPT.mw

Could you please help me to solve this error.

Hey everyone,
I am trying to find the roots of a very large polynomial, specifically targeting the leading Fisher's zero (the root with the smallest positive imaginary part). I'm using Maple's RootFinding[Analytic] package with Digits := 10, but the results only show 5-digit accuracy (see the attached file plz)

  1. Why does RootFinding[Analytic] fail to achieve full 10-digit precision despite the Digits setting? Are there hidden limitations or optional parameters to improve this?

  2. Are there alternative methods in Maple to accurately locate only the leading zero (without computing all roots in a region)?
    Root_Poly.mw

I will look for sensitivity analysis for parameters in the epidemic model using the normalization formula, the result should be between -1 to 1 but there are 2 parameters whose values ​​are more than 1, how do I set the limit so that the sensitivity value is between -1 to 1?

restart

with(VectorCalculus):

with(linalg):

_local(I):

I

 

Warning, The imaginary unit, I, has been renamed _I

 

dS := VectorCalculus:-`+`(VectorCalculus:-`+`(Lambda, VectorCalculus:-`-`(VectorCalculus:-`*`(VectorCalculus:-`*`(alpha, S), P))), VectorCalculus:-`-`(VectorCalculus:-`*`(mu, S)));

-P*S*alpha-S*mu+Lambda

 

alpha*S*P-(-T*eta+1)*beta*E-theta*E-mu*E

 

(-T*eta+1)*beta*E-delta*I-gamma*I-mu*I

 

E*theta+I*gamma-R*mu

 

-P*T*sigma+I*xi-P*tau

 

r*T*(1-T/K)-phi*T

(1)

Ro := VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(Lambda, alpha), beta), r), xi), VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`-`(VectorCalculus:-`*`(VectorCalculus:-`*`(K, eta), phi)), VectorCalculus:-`*`(VectorCalculus:-`*`(K, eta), r)), VectorCalculus:-`-`(r))), 1/VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(mu, VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`*`(VectorCalculus:-`*`(K, phi), sigma), VectorCalculus:-`-`(VectorCalculus:-`*`(VectorCalculus:-`*`(K, r), sigma))), VectorCalculus:-`-`(VectorCalculus:-`*`(r, tau)))), VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(K, beta), eta), phi), VectorCalculus:-`-`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(K, beta), eta), r))), VectorCalculus:-`*`(beta, r)), VectorCalculus:-`*`(mu, r)), VectorCalculus:-`*`(r, theta))), VectorCalculus:-`+`(VectorCalculus:-`+`(delta, gamma), mu)));

Lambda*alpha*beta*r*xi*(-K*eta*phi+K*eta*r-r)/(mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*(delta+gamma+mu))

(2)

`as1_Λ` := VectorCalculus:-`*`(diff(Ro, Lambda), VectorCalculus:-`*`(Lambda, 1/Ro));

1

(3)

`as1_μ` := VectorCalculus:-`*`(diff(Ro, mu), VectorCalculus:-`*`(mu, 1/Ro));

(-Lambda*alpha*beta*r*xi*(-K*eta*phi+K*eta*r-r)/(mu^2*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*(delta+gamma+mu))-Lambda*alpha*beta*r^2*xi*(-K*eta*phi+K*eta*r-r)/(mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)^2*(delta+gamma+mu))-Lambda*alpha*beta*r*xi*(-K*eta*phi+K*eta*r-r)/(mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*(delta+gamma+mu)^2))*mu^2*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*(delta+gamma+mu)/(Lambda*alpha*beta*r*xi*(-K*eta*phi+K*eta*r-r))

(4)

`as1_η` := VectorCalculus:-`*`(diff(Ro, eta), VectorCalculus:-`*`(eta, 1/Ro));

(Lambda*alpha*beta*r*xi*(-K*phi+K*r)/(mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*(delta+gamma+mu))-Lambda*alpha*beta*r*xi*(-K*eta*phi+K*eta*r-r)*(K*beta*phi-K*beta*r)/(mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)^2*(delta+gamma+mu)))*eta*mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*(delta+gamma+mu)/(Lambda*alpha*beta*r*xi*(-K*eta*phi+K*eta*r-r))

(5)

`as1_β` := VectorCalculus:-`*`(diff(Ro, beta), VectorCalculus:-`*`(beta, 1/Ro));

(Lambda*alpha*r*xi*(-K*eta*phi+K*eta*r-r)/(mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*(delta+gamma+mu))-Lambda*alpha*beta*r*xi*(-K*eta*phi+K*eta*r-r)*(K*eta*phi-K*eta*r+r)/(mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)^2*(delta+gamma+mu)))*mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*(delta+gamma+mu)/(Lambda*alpha*r*xi*(-K*eta*phi+K*eta*r-r))

(6)

`as1_θ` := VectorCalculus:-`*`(diff(Ro, theta), VectorCalculus:-`*`(theta, 1/Ro));

-r*theta/(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)

(7)

`as1_τ` := VectorCalculus:-`*`(diff(Ro, tau), VectorCalculus:-`*`(tau, 1/Ro));

r*tau/(K*phi*sigma-K*r*sigma-r*tau)

(8)

as1_r := VectorCalculus:-`*`(diff(Ro, r), VectorCalculus:-`*`(r, 1/Ro));

(Lambda*alpha*beta*xi*(-K*eta*phi+K*eta*r-r)/(mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*(delta+gamma+mu))+Lambda*alpha*beta*r*xi*(K*eta-1)/(mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*(delta+gamma+mu))-Lambda*alpha*beta*r*xi*(-K*eta*phi+K*eta*r-r)*(-K*sigma-tau)/(mu*(K*phi*sigma-K*r*sigma-r*tau)^2*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*(delta+gamma+mu))-Lambda*alpha*beta*r*xi*(-K*eta*phi+K*eta*r-r)*(-K*beta*eta+beta+mu+theta)/(mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)^2*(delta+gamma+mu)))*mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*(delta+gamma+mu)/(Lambda*alpha*beta*xi*(-K*eta*phi+K*eta*r-r))

(9)

`as1_φ` := VectorCalculus:-`*`(diff(Ro, phi), VectorCalculus:-`*`(phi, 1/Ro));

(-Lambda*alpha*beta*r*xi*K*eta/(mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*(delta+gamma+mu))-Lambda*alpha*beta*r*xi*(-K*eta*phi+K*eta*r-r)*K*sigma/(mu*(K*phi*sigma-K*r*sigma-r*tau)^2*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*(delta+gamma+mu))-Lambda*alpha*beta^2*r*xi*(-K*eta*phi+K*eta*r-r)*K*eta/(mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)^2*(delta+gamma+mu)))*phi*mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*(delta+gamma+mu)/(Lambda*alpha*beta*r*xi*(-K*eta*phi+K*eta*r-r))

(10)

param := Lambda = 0.133e-1, alpha = 0.7954551e-1, delta = .9, K = 300, r = 0.76e-1, tau = 0.900982e-1, gamma = 0.917e-2, mu = 0.56e-3, phi = 0.9e-1, eta = 0.9e-2, sigma = 0.456e-3, beta = .567, theta = 0.9e-2, xi = 0.487e-1:

subs(param, `svΛ` = `as1_Λ`);

`svΛ` = 1

 

`svμ` = -1.001267817

 

`svη` = 0.3698561176e-2

 

`svβ` = 0.1113482136e-1

 

`svθ` = -0.1048257226e-1

 

`svτ` = -1.388300446

 

svr = -2.519993617

 

`svφ` = 2.519993621

(11)
 

``

Download sensitivity.mw

i have an equilibrium, i want to simplify SEkuil_End[1] but with R0 eq in the simplify, how can i do that?

restart

with(VectorCalculus):

with(linalg):

with(DETools):

with(DynamicSystems):

_local(I):

I

 

Warning, The imaginary unit, I, has been renamed _I

 

dS := VectorCalculus:-`+`(VectorCalculus:-`+`(Lambda, VectorCalculus:-`-`(VectorCalculus:-`*`(VectorCalculus:-`*`(alpha, S), P))), VectorCalculus:-`-`(VectorCalculus:-`*`(mu, S)));

-P*S*alpha-S*mu+Lambda

 

alpha*S*P-(-T*eta+1)*beta*E-theta*E-mu*E

 

(-T*eta+1)*beta*E-delta*I-gamma*I-mu*I

 

E*theta+I*gamma-R*mu

 

-P*T*sigma+I*xi-P*tau

 

r*T*(1-T/K)-phi*T

(1)

SEkuil := solve({dE, dI, dP, dR, dS, dT}, {E, I, P, R, S, T}):

SEkuil_End := SEkuil[4]:

R0 := VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(Lambda, alpha), beta), r), xi), VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`*`(VectorCalculus:-`*`(K, eta), r), VectorCalculus:-`-`(VectorCalculus:-`*`(VectorCalculus:-`*`(K, eta), phi))), VectorCalculus:-`-`(r))), 1/VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(mu, VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`*`(VectorCalculus:-`*`(K, phi), sigma), VectorCalculus:-`-`(VectorCalculus:-`*`(VectorCalculus:-`*`(K, r), sigma))), VectorCalculus:-`-`(VectorCalculus:-`*`(r, tau)))), VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(K, beta), eta), phi), VectorCalculus:-`-`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(K, beta), eta), r))), VectorCalculus:-`*`(beta, r)), VectorCalculus:-`*`(mu, r)), VectorCalculus:-`*`(r, theta))), VectorCalculus:-`+`(VectorCalculus:-`+`(delta, gamma), mu)));

Lambda*alpha*beta*r*xi*(-K*eta*phi+K*eta*r-r)/(mu*(K*phi*sigma-K*r*sigma-r*tau)*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*(delta+gamma+mu))

(2)

SEkuil_End[1]

E = (K^2*beta*delta*eta*mu*phi^2*sigma-2*K^2*beta*delta*eta*mu*phi*r*sigma+K^2*beta*delta*eta*mu*r^2*sigma+K^2*beta*eta*gamma*mu*phi^2*sigma-2*K^2*beta*eta*gamma*mu*phi*r*sigma+K^2*beta*eta*gamma*mu*r^2*sigma+K^2*beta*eta*mu^2*phi^2*sigma-2*K^2*beta*eta*mu^2*phi*r*sigma+K^2*beta*eta*mu^2*r^2*sigma+K*Lambda*alpha*beta*eta*phi*r*xi-K*Lambda*alpha*beta*eta*r^2*xi-K*beta*delta*eta*mu*phi*r*tau+K*beta*delta*eta*mu*r^2*tau-K*beta*eta*gamma*mu*phi*r*tau+K*beta*eta*gamma*mu*r^2*tau-K*beta*eta*mu^2*phi*r*tau+K*beta*eta*mu^2*r^2*tau+K*beta*delta*mu*phi*r*sigma-K*beta*delta*mu*r^2*sigma+K*beta*gamma*mu*phi*r*sigma-K*beta*gamma*mu*r^2*sigma+K*beta*mu^2*phi*r*sigma-K*beta*mu^2*r^2*sigma+K*delta*mu^2*phi*r*sigma-K*delta*mu^2*r^2*sigma+K*delta*mu*phi*r*sigma*theta-K*delta*mu*r^2*sigma*theta+K*gamma*mu^2*phi*r*sigma-K*gamma*mu^2*r^2*sigma+K*gamma*mu*phi*r*sigma*theta-K*gamma*mu*r^2*sigma*theta+K*mu^3*phi*r*sigma-K*mu^3*r^2*sigma+K*mu^2*phi*r*sigma*theta-K*mu^2*r^2*sigma*theta+Lambda*alpha*beta*r^2*xi-beta*delta*mu*r^2*tau-beta*gamma*mu*r^2*tau-beta*mu^2*r^2*tau-delta*mu^2*r^2*tau-delta*mu*r^2*tau*theta-gamma*mu^2*r^2*tau-gamma*mu*r^2*tau*theta-mu^3*r^2*tau-mu^2*r^2*tau*theta)/((K*eta*phi-K*eta*r+r)*xi*beta*(K*beta*eta*phi-K*beta*eta*r+beta*r+mu*r+r*theta)*alpha)

(3)
 

``

Download end.mw

I am trying to draw the Poincare section diagram related pendulum problem, article is shared below. I can not understand and code gives error, can you help me to draw Poincare section Fig. 4 of attached article?7._Energy_distribution_in_intrinsically_coupled_system [moderator: URL changed to respect IP, as per Mapleprimes Terms of Use]

pendulum.mw

Hi Guys,

I encountered this rather unexpected behavior of Maple 18 when using the "read" function as shown below, where Maple fails to reduce the answer to 0, especially for (5). I'm curious if there's any deeper reason for this, and if there's a better or more standard solution than mine, that is, to use "parse( convert( expr, string ) )" as in (6)?

Thanks a lot!

``

restart;

 

assume(x>0);

 

f := x^2;

x^2

(1)

 

save f, "read_test.m";

 

restart;

 

f;

f

(2)

 

read "read_test.m";

 

f;

x^2

(3)

 

f - x^2;

-x^2+x^2

(4)

 

assume(x>0);

 

f - x^2;

x^2-x^2

(5)

 

f1 := parse( convert( f, string ) );

x^2

(6)

 

f1;

x^2

(7)

 

f1 - x^2;

0

(8)

 

NULL

Download test1.mw

I have an epidemic model and the endemik equilibrium point contains rootOf _Z, here's one of the example

i still don't understand about the _Z and find the "remove_RootOf" command. Does it affect the result or is it an explicit result of Z?

How can we collect coefficients of different powers of involved variables form Eq, to get system of algebraic equations, like x,y,z,t but these are also appear in JacobiCN function? Maple file link is attached below, please help me to solve this issue. 

collection_of_coefficients.mw

VC1.mw

How to solve this error?

scmch.mw

I can't get a graph. Is this code is correct.Please help.

sps1.mw

how to plot this.i got error

sstf.mw

In Graph has curves that are overlapping each other and the values of  S[t] = -1, -2, 1, 2 and also the y axis to range from 0 to 1.

I am trying to find the phase portraits of a dynamical system; couples ODE system but it appears in singular form. How can we remove the singularity of coupled ODE system in P and W depending on \xi, where \alpha is scalar and v is velocity.

How remove quadratic singularity to make this system Hamiltonian in below coupled ODE system in P & W.

 singular_system.mw

restart

with(PDEtools):

alias(P = P(xi), W = W(xi))

P, W

(1)

rf1 := diff(P, xi) = W

diff(P, xi) = W

(2)

rf2 := diff(W, xi) = (P-(alpha^2+1)*P*W^2)/(v+(1/2*(alpha^2+1))*P^2)

diff(W, xi) = (P-(alpha^2+1)*P*W^2)/(v+(1/2)*(alpha^2+1)*P^2)

(3)
 

 

Download singular_system.mw

Hello, I need help to find the real and Imaginary components of following complex model using maple, here q=u+iv,

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