MaplePrimes Questions

According to the attached file "test" I would like to determine the limit of the function f(n,x) for n-->00 as an exercise. I'm asking for advice on using "rsolve". I also want to calculate the limit of sqrt((n/3))*f(n,x) for n-->00 using f(n,x) from the file "test". I also need help with this. (This isn't a school assignment ;-).)

test.mw

How can I upload and attach a file here?

Either a worksheet or a text file?

"Approximation of ODE's with Cubic Splines.mw"

or

package "ODECSplines.mpl"

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

Only for my understanding:
Why is the concatenation operator not working in this assignment on the righthand side

for i to 5 do
  x_ || i := x_ ||(i-1); 
end do;
                           x_1 := x_0

                           x_2 := x_0

                           x_3 := x_0

                           x_4 := x_0

                           x_5 := x_0

Somehow i in (i-1) equals always 1
Why do I have to use

for i to 5 do      
  x_ || i := cat(x_,i-1);  
end do;  
                           x_1 := x_0

                           x_2 := x_1

                           x_3 := x_2

                           x_4 := x_3

                           x_5 := x_4

 

I’m trying to simplify the results I obtained from two scenarios. In the first scenario, I have results labeled g1,g2,g3​, and in the second scenario, I have g_1, g_2, g_3​. The issue is that the expressions are quite lengthy, and I want to shorten them by identifying and substituting common sub-expressions.

Is there a method or syntax that can help me automatically detect repeated terms and substitute them with a variable to improve readability?

For example:

Let’s say:

x=2f+3d+4(d+h+k)j+f

y=1(d+h+k)+hf+4d

Here, the expression d+h+k appears in both x and y, so I can define a new variable:

A=d+h+k

and substitute it into the equations to make them more concise and readable.

Attaching the sheet: Difference_two_model.mw

Historically, when the Maple program is open and I double-click on a Maple document in my file manager (Windows), the document appears in a new tab of the open program.

With version 2025.0, I performed a completely clean install, deleting files and inheriting no properties from 2024. Now, when I repeat this process, a new window/program is created with the document appearing there. The document does not appear in another tab of the original window/program. Changing the option of sharing the same Maple math engine does not affect this unexpected behavior. 

Do others observe this behavior? Is there an option in one of the "Maple.ini" files that I could change? Or is this a bug?

I should note that this behavior is identical on multiple Windows 11 machines. The 2nd one was not a clean install. 

Hello

I am looking for an efficient code that calculates all partitions of a positive integer n into parts >1. Example:

for n=8 the program should return

[2,6],[3,5],[4,4],[2,2,4],[2,3,3],[[2,2,2,2].

The program should be able to calculate these partitions for n=1..10000 in reasonable time

Who can help me?

Thanks.

I have functions using define_external to call a .dll  In uploaded file "dll_test.mw" I'm showing one such function.  Immediately after defining the function I call it and it works.  There are a lot more similarly defined functions and once defined in the worksheet they are working as hoped. 

My question is can I make the functions avaliable across multiple worksheets somehow?  google ai suggested using "read" but in uploaded file "read and load test.mw" you can see that it's not working for me.  using read I get an error I don't understand and using load doesn't return an error but it also doesn't result in an executable KinAddCurveData function.

Any help would be very appreciated.

KinAddCurveData := define_external('AddCurveData', 'LIB' = "C:\\Users\\tom\\Documents\\Excel docs\\kinexa dll solver\\equilibriumdll\\Equilibrium.dll")

NULL

KinAddCurveData()

 

NULL

Download dll_test.mw

read "C:/Users/tom/Documents/maple docs/KinExA tools/dll_test.mw"

Error, on line %1, syntax error, character `?` unexpected:

 

<?xml version="1.0" encoding="UTF-8"?>
 ^

 

Error, while reading `%1`

 

load("C:/Users/tom/Documents/maple docs/KinExA tools/dll_test.mw")

load("C:/Users/tom/Documents/maple docs/KinExA tools/dll_test.mw")

(1)

KinAddCurveData()

KinAddCurveData()

(2)

jhdladjkh()

jhdladjkh()

(3)
 

NULL

Download read_and_load_test.mw

I ran the Fourier Transform about 6 months ago.

>

>

The out put was 23 lines long, and then used the Simplify/Simplify option for the result to obtain

, a relatively easier result.

I tried to re-run it today but it just gave me

with the result

Do you have any idea as to why this happens?? I seem to recall there may be similar “memory” problem

that occurred in the past.

HIPT.mw

Could you please help me to solve this error.

In this example by applying the substitution i can get half of paicewise function but how get another  half ? i am looking for B_rs as Piecewise function ?

restart

eij := ((-3*k[i]*(k[i]-k[j])*l[j]+beta)*l[i]^2-(2*(-3*k[j]*(k[i]-k[j])*l[j]*(1/2)+beta))*l[j]*l[i]+beta*l[j]^2)/((-3*k[i]*(k[i]+k[j])*l[j]+beta)*l[i]^2-(2*(3*k[j]*(k[i]+k[j])*l[j]*(1/2)+beta))*l[j]*l[i]+beta*l[j]^2)

((-3*k[i]*(k[i]-k[j])*l[j]+beta)*l[i]^2-2*(-(3/2)*k[j]*(k[i]-k[j])*l[j]+beta)*l[j]*l[i]+beta*l[j]^2)/((-3*k[i]*(k[i]+k[j])*l[j]+beta)*l[i]^2-2*((3/2)*k[j]*(k[i]+k[j])*l[j]+beta)*l[j]*l[i]+beta*l[j]^2)

(1)

eval(eij, k[j] = b*k[i]); series(%, k[i], 3); convert(%, polynom); eval(%, b = k[j]/k[i]); Bij := (%-1)/(k[i]*k[j])

((-3*k[i]*(-b*k[i]+k[i])*l[j]+beta)*l[i]^2-2*(-(3/2)*b*k[i]*(-b*k[i]+k[i])*l[j]+beta)*l[j]*l[i]+beta*l[j]^2)/((-3*k[i]*(b*k[i]+k[i])*l[j]+beta)*l[i]^2-2*((3/2)*b*k[i]*(b*k[i]+k[i])*l[j]+beta)*l[j]*l[i]+beta*l[j]^2)

 

series(1+((-3*(-b+1)*l[j]*l[i]^2+3*b*(-b+1)*l[j]^2*l[i]+3*(b+1)*l[j]*l[i]^2+3*b*(b+1)*l[j]^2*l[i])/(beta*l[i]^2-2*beta*l[i]*l[j]+beta*l[j]^2))*k[i]^2+O(k[i]^4),k[i],4)

 

1+(-3*(-b+1)*l[j]*l[i]^2+3*b*(-b+1)*l[j]^2*l[i]+3*(b+1)*l[j]*l[i]^2+3*b*(b+1)*l[j]^2*l[i])*k[i]^2/(beta*l[i]^2-2*beta*l[i]*l[j]+beta*l[j]^2)

 

1+(-3*(-k[j]/k[i]+1)*l[j]*l[i]^2+3*k[j]*(-k[j]/k[i]+1)*l[j]^2*l[i]/k[i]+3*(k[j]/k[i]+1)*l[j]*l[i]^2+3*k[j]*(k[j]/k[i]+1)*l[j]^2*l[i]/k[i])*k[i]^2/(beta*l[i]^2-2*beta*l[i]*l[j]+beta*l[j]^2)

 

(-3*(-k[j]/k[i]+1)*l[j]*l[i]^2+3*k[j]*(-k[j]/k[i]+1)*l[j]^2*l[i]/k[i]+3*(k[j]/k[i]+1)*l[j]*l[i]^2+3*k[j]*(k[j]/k[i]+1)*l[j]^2*l[i]/k[i])*k[i]/((beta*l[i]^2-2*beta*l[i]*l[j]+beta*l[j]^2)*k[j])

(2)

simplify((-3*(-k[j]/k[i]+1)*l[j]*l[i]^2+3*k[j]*(-k[j]/k[i]+1)*l[j]^2*l[i]/k[i]+3*(k[j]/k[i]+1)*l[j]*l[i]^2+3*k[j]*(k[j]/k[i]+1)*l[j]^2*l[i]/k[i])*k[i]/((beta*l[i]^2-2*beta*l[i]*l[j]+beta*l[j]^2)*k[j]))

6*l[j]*l[i]*(l[i]+l[j])/((l[i]-l[j])^2*beta)

(3)


Download Lim.mw

Determine the analytic function whose real part is 𝑢(𝑥, 𝑦) = sin2𝑥/cosh2𝑦–cos2𝑥

using Direct method

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

In 1D-Math an inert division can be entered as an infix operator using "%/"

The same sequence of chracters does not work the same way in 2D-Math

In 2D-Math I have to use

Is there an infix division operator in 2D-Math?

Is there a helppage describing %arithop and the like?

I was reading a book on complex analysis, and I tried to answer some questions like "Find and plot the sixth roots of unity on Maple."  I tried the following code, which works. Is there any other way to solve and plot the same question?

with(plots); interface(imaginaryunit = 'I'); s := [seq(exp(2*I*Pi*k*(1/6)), k = 0 .. 5)]; X := [seq(Re(s[k]), k = 1 .. 6)]; Y := [seq(Im(s[k]), k = 1 .. 6)]

[1, 1/2+((1/2)*I)*3^(1/2), -1/2+((1/2)*I)*3^(1/2), -1, -1/2-((1/2)*I)*3^(1/2), 1/2-((1/2)*I)*3^(1/2)]

 

[1, 1/2, -1/2, -1, -1/2, 1/2]

 

[0, (1/2)*3^(1/2), (1/2)*3^(1/2), 0, -(1/2)*3^(1/2), -(1/2)*3^(1/2)]

(1)

UnitCircle := plot([cos(t), sin(t), t = 0 .. 2*Pi], color = gray, linestyle = dash); RootsPlot := pointplot([X, Y], symbol = solidcircle, color = blue, symbolsize = 10); display(UnitCircle, RootsPlot, scaling = constrained, title = "6th Roots of Unity")

 

NULL


 

Download 6th_roots_of_unity.mw

4 5 6 7 8 9 10 Last Page 6 of 2409