MaplePrimes Questions

using diff command to find  partial dervative of function g give zero in maple...it shouldn't be zero...how to fix itpartial_dervative.mw

restart:

 

sigma_t:= map(epsilon-> E_0[90]*epsilon_dot*((epsilon/epsilon_dot)-(sum(p[i], i = 1 .. 3)*(epsilon/epsilon_dot))+(sum(p[i]*tau[i],i=1..3))-(sum(p[i]*tau[i]*exp(-(epsilon/(epsilon_dot*tau[i]))),i=1..3))),true_strain):

 g:= sum(( sigma[j]-sigma_t[j])^2,j=1..10):

diff(g,p[1]);

0

(1)
 

 

Download partial_dervative.mw

if i want to solve non linear least square problem ..maple optimazation Interactive box show ..many option...but when it comes to least square default....what kind of algothrim does it used....and in maple ..NonLinear fit commad use what kind of algothrim?..Levenberg-Marquardt algorithm?

I use one engine per one worksheet. So one would expect that doing restart; command; to always behave the same way. Right?

Because each time, new or refreshed mserver.exe is used.  But here is a worksheet, where I run it few times (all with restart each time), where sometime the command timelimit hangs, and sometime does not. I do not mean it takes little longer sometime. I mean completely hang.

I've waited 10-20 minutes and nothing happens. And sometime I saw it return back in 2 or 3 minutes. But most of the time it hangs.

I wish someone could explain this to me. If it hangs each time, or not hang each time, I can understand. (ofcourse timelimit should never hang, as it was supposed to have been fixed in 2021, but this is separate issue).

But why it hangs sometimes and not other times? Does Maple use some sort of random number generator inside it to decide on things? For me, software should behave the same each time when run from same initial state.

It also depends on the amount of timeout given if it hangs or not.

What can cause this different behavior and most important, what can one do to make it behave same way each time? I thought that what restart supposed to do.

Any insight what can cause this is welcome.

I also found that closing the worksheet completely and opening it again, results in different behavior in the timing. It looks like restart does not clear everything, as what happens when closing the worksheet and reopeing it again.

i.e. Sometimes when it completes and not hang, then issuing restart again and running the int() command, it will also not hang most likely.

It seems Maple have remembered something. But closing the worksheet and opening it again, it will hang again most of the times.

The point of all this, is that Maple behaves differently each time. But why??

9704

``

restart;

24868

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1762. The version installed in this computer is 1757 created 2024, June 6, 14:53 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1)

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

time();
#hangs sometimes and not other times. Most of the time it hangs. increasing time
#will improve the chance it will hang
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
time();

.375

Download hangs_int_june_16_2024.mw

Here is one screen shot of one of those times where it returned back. Took little over one minute. Good.

Here is second screen shot where it took about1,800 real time seconds to return. (30 minutes, even though timelimit was one minute). Same exact code.

update

I tried the suggestion given below to use _EnvProbabilistic:=0 but it had no effect on making Maple behavior consistent each time.

Below worksheet shows this. I tried 6 trials, each with restart. 

First trial it timeout at 74 second. good. Second trial took 1403 seconds !  Third trial went back to 74 seconds again (good).  Trial 4 took also took about 74 seconds (good). trial 5 went back to being slow and took about 1400 seconds again. Trial 6 went back to being fast and took about 74 seconds.

So the pattern seems to be 

                     fast SLOW fast fast SLOW fast.....

But I also tried this whole test again, by closing the worksheet and opening. Now the pattern changed to

                     SLOW fast fast fast SLOW SLOW ....

I also attached the worksheet for the above below.

So Maple still behaves in random fashion in doing the integration above. sometimes it is slow, sometimes fast. All using same exact code and same integral. Extra points to anyone who could find out why and how to fix this.  

This worksheet have pattern    fast SLOW fast fast SLOW fast....

1036

restart;

1036

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1762. The version installed in this computer is 1757 created 2024, June 6, 14:53 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

 

Trial #1

 

restart;

1036

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]();
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

4019.660

Error, (in PDEtools/NumerDenom) time expired

"time taken ", 74.618

 

Trial #2

 

restart;

1036

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in sdmp:-mul) time expired

"time taken ", 1403.978

 

Trial #3

 

restart;

1036

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in PDEtools/NumerDenom) time expired

"time taken ", 73.979

 

Trial #4

 

restart;

1036

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in PDEtools/NumerDenom) time expired

"time taken ", 73.732

 

 

 

Trial #5

 

restart;

1036

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in sdmp:-mul) time expired

"time taken ", 1396.089

 

Trila #6

 

restart;

1036

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in anonymous procedure called from PDEtools/NumerDenom) time expired

"time taken ", 73.383

 

 

Download hangs_int_V2_june_16_2024.mw

This worksheet below have pattern      SLOW fast fast fast SLOW SLOW ....

 

restart;

21096

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1762. The version installed in this computer is 1757 created 2024, June 6, 14:53 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

 

Trial #1

 

restart;

21096

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]();
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

28.483

Error, (in sdmp:-mul) time expired

"time taken ", 1400.316

 

Trial #2

 

restart;

21096

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in PDEtools/NumerDenom) time expired

"time taken ", 74.404

 

Trial #3

 

restart;

21096

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in PDEtools/NumerDenom) time expired

"time taken ", 73.993

 

Trial #4

 

restart;

21096

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in PDEtools/NumerDenom) time expired

"time taken ", 73.550

 

 

 

Trial #5

 

restart;

21096

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in sdmp:-mul) time expired

"time taken ", 1373.684

 

Trila #6

 

restart;

21096

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in sdmp:-mul) time expired

"time taken ", 1383.174

 

 

Download hangs_int_V3_june_16_2024.mw

Observation: When it finishes fast, timeout is always in  PDEtools/NumerDenom.

When it takes long time, timeout is always in sdmp:-mull

Any other suggestions what to try are welcome.

expr:=cos(x)^2;
expr=combine[trig](expr);
(x->x=combine[trig])(expr);

Update:
Same outcome with

expr=`combine/trig`(expr);
(x->x=`combine/trig`)(expr);
                          2   1            1
                    cos(x)  = - cos(2 x) + -
                              2            2

                           2               
                     cos(x)  = combine/trig

Hi everyone ...

How can I define the below Matrix with for command: (A[n] is n*n and n=1...i)

Tnx...

It seems like there exists a bug when taking the following limit in Maple (I tried Maple 2021):

If I run this command:
> evalf(limit(CylinderU(0,CylinderU(0,x)),x=0));
1.2722774800
the result is 1.2722774800, which seems to be incorrect.
evalf(limit(CylinderU(0,CylinderU(0,x)),x=0));
evalf(limit(CylinderU(0,CylinderU(0,x)),x=0))

However, when I run this command:
> evalf(CylinderU(0,limit(CylinderU(0,x),x=0)));
0.5456799403
the result is 0.5456799403, which seems to be correct.
evalf(CylinderU(0,limit(CylinderU(0,x),x=0)))
evalf(CylinderU(0,limit(CylinderU(0,x),x=0)))

Finally, when I run this command:
> evalf(CylinderU(0,CylinderU(0,0)));
0.5456799403
the result is 0.5456799403 which is also correct.
evalf(CylinderU(0,CylinderU(0,0)))
evalf(CylinderU(0,CylinderU(0,0)))

My expectation is that all three commands must return the same result, thus I consider this a bug.
I also run the following command in WolframAlpha
> limit ParabolicCylinderU(0,ParabolicCylinderU(0,x)) as x->0.0
and obtained the correct result 0.54568, confirming that in Maple this is evaluated incorrectly.

Would appreciate if anybody can confirm that this is a bug.

How such Maple bug should be reported?

Is this a valid behvior by int?   

int(A,x,method=_RETURNVERBOSE) hangs.

But  int(simplify(A),x,method=_RETURNVERBOSE) returns in few seconds with "default" result same as int(A,x)

Should this have happen? I try to avoid calling simplify unless neccessary because it can add csgn's and signums and so on to the result. 

But the question is: Should one really need to simplify the integrand to get the result in this example? Does this mean one should call simplify on the integrand to avoid the hang that can show up? 

This only happens when using method=_RETURNVERBOSE 

Just trying to find out if this is normal behavior and can be expected sometimes.

25844

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

restart;

25844

A:=exp(-1/2*cos(2*x))*exp(-sin(x)^2);
int(A,x);

exp(-(1/2)*cos(2*x))*exp(-sin(x)^2)

exp(1/2)*exp(-1)*x

int(A,x,method=_RETURNVERBOSE);  #hangs

int(simplify(A),x,method=_RETURNVERBOSE)

["default" = x*exp(-1/2), "risch" = x*exp(-1/2), "orering" = x*exp(-sin(x)^2-(1/2)*cos(2*x)), FAILS = ("gosper", "lookup", "derivativedivides", "norman", "trager", "meijerg", "elliptic", "pseudoelliptic", "parallelrisch", "parts")]

 

 

Download why_int_hang_unless_simplify_june_15_2024.mw

How do you substitute into a contravariant index of a tensor say

T[~mu, nu]     ?

Nothing seems to work, I tried to subs(~mu=~1,T[~mu, nu]), subs(mu=1,T[~mu, nu]), and all permutations.

Substituting values into the covariant index works fine but not contravariant.

Surely it must be possible ?

When executing the attached work sheet, the output

changes to

Why is that (local seetings maybe?) and how to reproduce the former, more compact output?

Copy-pasted from the wonderful:

Advanced Engineering Mathematics

Dr. Robert J. Lopez

Emeritus Professor of Mathematics

Maple Fellow

© Maplesoft, a division of Waterloo Maple Inc., 2023

This is obtained in Maple by writing the differential equation

 

q := diff(x(t),t) = k*(40 - 16/18*x(t))*(8 - 2/18*x(t));

diff(x(t), t) = k*(40-(8/9)*x(t))*(8-(1/9)*x(t))

(1)

 

and solving via the syntax

 

X := simplify(rhs(dsolve({q,x(0)=0},x(t))));

(-360+360*exp((8/3)*t*k))/(8*exp((8/3)*t*k)-5)

(2)

 

The differential equation is actually separable, and can be solved with the techniques of elementary calculus discussed in Section 3.1.

 

If an observation provides the data that at time t = 1 there were 6 grams of water, then the constant of proportionality k can be computed.  In Maple, the data point gives the equation

 

eq := eval(X, t=1) = 6;

(-360+360*exp((8/3)*k))/(8*exp((8/3)*k)-5) = 6

(3)

 

whose solution is

 

K := solve(eq,k);

(3/8)*ln(55/52)

(4)
 

 

Download Output_formated_with_rational_factor_.mw

Hi everyone...

I want to know how can I convert python code & c+ code into maple, is there any command or algorithm for these converts? 

Tnx...

restart;
with(combinat);
F := unapply(rsolve({F(1) = 1, F(2) = 1, F(n + 1) = F(n) + F(n - 1)}, F(n)), n);
combine(expand(F(n + 1)*F(n + 2) - F(n)*F(n + 3)));
F := n -> fibonacci(n);
combine(expand(F(n + 1)^2 - F(n)*F(n + 3) + (-1)^n));
is(F(n + 1)^2 = F(n)*F(n + 2) + (-1)^n);#should be true
G := n -> arctan(1/F(n));
is(G(4) = G(5) + G(6));
is(G(4) = G(5) + G(6));
is(G(2*n) = G(2*n + 1) + G(2*n + 2));#should be true
How to establish these formulas ? Thank you.

odetest should be made more robust.

Here is an example where the same exact solution and same exact IC, but when solution is just writtent in a  little different form, odetest no longer verifies it.

Do you consider this a bug? How is the user supposed to know their solution is correct or not now, since it depends on how it is written? What can a user then do to help odetest in this case verify the solution?


 

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

ode:=diff(y(x), x)*x^2 + cos(2*y(x)) = 1;
ic:=y(infinity)=10/3*Pi;
e1:=2/x+1/3*sqrt(3);
SOL1:=y(x)=arccot(e1) + Pi*3;
odetest(SOL1,[ode,ic]);

(diff(y(x), x))*x^2+cos(2*y(x)) = 1

y(infinity) = (10/3)*Pi

2/x+(1/3)*3^(1/2)

y(x) = arccot(2/x+(1/3)*3^(1/2))+3*Pi

[0, 0]

#now we rewrite the solution a little different. But same solution
e2:=simplify(e1);

(1/3)*(3^(1/2)*x+6)/x

#Now maple no longer verifies the solution

SOL2:=y(x)=arccot(e2) + Pi*3;
odetest(SOL2,[ode,ic])

y(x) = arccot((1/3)*(3^(1/2)*x+6)/x)+3*Pi

[0, -(1/6)*Pi]

 


 

Download same_solution_not_verified_june_13_2024.mw

How can I get Prof. Wilhelm Werner's  FourierSeries  package? (See also "Fourier and Other Orthogonal Function Expansions in Maple" by Dr. Robert Lopez):

How to get logarithm expression using Maple command?

For example, enter log[2](x^2-3x+5)+x^3-1-log[3](x-1)

Output [x^2-3x+5,x-1]

Thank you very much for your help.

Hallo every body 

How to add vector fields to the figure of this example of a three-dimensional differential system.

in maple 18

Porgram_of_corollary_1_in_Maple.mw

NULL

restart

X[j] := x^3*a[j, 0]+x^2*y*a[j, 1]+x^2*z*a[j, 2]+x*y^2*a[j, 3]+x*y*z*a[j, 4]+x*z^2*a[j, 5]+y^3*a[j, 6]+y^2*z*a[j, 7]+y*z^2*a[j, 8]+z^3*a[j, 9]

x^3*a[j, 0]+x^2*y*a[j, 1]+x^2*z*a[j, 2]+x*y^2*a[j, 3]+x*y*z*a[j, 4]+x*z^2*a[j, 5]+y^3*a[j, 6]+y^2*z*a[j, 7]+y*z^2*a[j, 8]+z^3*a[j, 9]

(1)

s := sum(epsilon^j*X[j], j = 0 .. 2)

x^3*a[0, 0]+x^2*y*a[0, 1]+x^2*z*a[0, 2]+x*y^2*a[0, 3]+x*y*z*a[0, 4]+x*z^2*a[0, 5]+y^3*a[0, 6]+y^2*z*a[0, 7]+y*z^2*a[0, 8]+z^3*a[0, 9]+epsilon*(x^3*a[1, 0]+x^2*y*a[1, 1]+x^2*z*a[1, 2]+x*y^2*a[1, 3]+x*y*z*a[1, 4]+x*z^2*a[1, 5]+y^3*a[1, 6]+y^2*z*a[1, 7]+y*z^2*a[1, 8]+z^3*a[1, 9])+epsilon^2*(x^3*a[2, 0]+x^2*y*a[2, 1]+x^2*z*a[2, 2]+x*y^2*a[2, 3]+x*y*z*a[2, 4]+x*z^2*a[2, 5]+y^3*a[2, 6]+y^2*z*a[2, 7]+y*z^2*a[2, 8]+z^3*a[2, 9])

(2)

s1 := subs(a = b, s)

x^3*b[0, 0]+x^2*y*b[0, 1]+x^2*z*b[0, 2]+x*y^2*b[0, 3]+x*y*z*b[0, 4]+x*z^2*b[0, 5]+y^3*b[0, 6]+y^2*z*b[0, 7]+y*z^2*b[0, 8]+z^3*b[0, 9]+epsilon*(x^3*b[1, 0]+x^2*y*b[1, 1]+x^2*z*b[1, 2]+x*y^2*b[1, 3]+x*y*z*b[1, 4]+x*z^2*b[1, 5]+y^3*b[1, 6]+y^2*z*b[1, 7]+y*z^2*b[1, 8]+z^3*b[1, 9])+epsilon^2*(x^3*b[2, 0]+x^2*y*b[2, 1]+x^2*z*b[2, 2]+x*y^2*b[2, 3]+x*y*z*b[2, 4]+x*z^2*b[2, 5]+y^3*b[2, 6]+y^2*z*b[2, 7]+y*z^2*b[2, 8]+z^3*b[2, 9])

(3)

s2 := subs(a = c, s)

x^3*c[0, 0]+x^2*y*c[0, 1]+x^2*z*c[0, 2]+x*y^2*c[0, 3]+x*y*z*c[0, 4]+x*z^2*c[0, 5]+y^3*c[0, 6]+y^2*z*c[0, 7]+y*z^2*c[0, 8]+z^3*c[0, 9]+epsilon*(x^3*c[1, 0]+x^2*y*c[1, 1]+x^2*z*c[1, 2]+x*y^2*c[1, 3]+x*y*z*c[1, 4]+x*z^2*c[1, 5]+y^3*c[1, 6]+y^2*z*c[1, 7]+y*z^2*c[1, 8]+z^3*c[1, 9])+epsilon^2*(x^3*c[2, 0]+x^2*y*c[2, 1]+x^2*z*c[2, 2]+x*y^2*c[2, 3]+x*y*z*c[2, 4]+x*z^2*c[2, 5]+y^3*c[2, 6]+y^2*z*c[2, 7]+y*z^2*c[2, 8]+z^3*c[2, 9])

(4)

Considérons le système suivant:

a[1] := 0; c[1] := 0

a[0, 9] := 0; c[0, 8] := 0; b[0, 7] := 0; a[0, 4] := 0; a[0, 7] := 0; c[0, 3] := 0; c[0, 0] := 0; c[0, 5] := 0; b[0, 4] := 0; a[0, 2] := 0; c[0, 6] := 0; c[0, 1] := 0; c[0, 7] := 0; a[0, 8] := 0; b[0, 5] := 0

b0 := 5; a[4] := 0; c[4] := 0; c[2, 9] := 0; c[2, 2] := 0; c[2, 7] := 0; a[2, 5] := 0; b[2, 8] := 0; a[2, 0] := 0; b[2, 6] := 0; b[2, 1] := 0; a[2, 3] := 0; b[0, 9] := 0

b[1] := 0; b[2] := 0; b[3] := 0; b[4] := 0; a[1, 2] := 0; a[1, 1] := 0; a[1, 4] := 0; a[1, 6] := 0; a[1, 7] := 0; a[1, 8] := 0; a[1, 9] := 0; a[2, 9] := 0; a[2, 8] := 0; a[2, 7] := 0; a[2, 6] := 0; a[2, 4] := 0; a[2, 2] := 0; a[2, 1] := 0; b[1, 0] := 0; b[1, 2] := 0; b[1, 3] := 0; b[1, 4] := 0; b[1, 5] := 0; b[1, 7] := 0; b[1, 9] := 0; b[2, 0] := 0; b[2, 2] := 0; b[2, 3] := 0; b[2, 4] := 0; b[2, 5] := 0; b[2, 7] := 0; b[2, 9] := 0; c[1, 0] := 0; c[1, 1] := 0; c[1, 3] := 0; c[1, 4] := 0; c[1, 5] := 0; c[1, 6] := 0; c[1, 8] := 0; c[2, 0] := 0; c[2, 1] := 0; c[2, 3] := 0; c[2, 4] := 0; c[2, 5] := 0; c[2, 6] := 0; c[2, 8] := 0; b[0, 2] := 0; c[1, 7] := 0

a[1, 0] := 0; a[1, 3] := 0; a[1, 5] := 0; b[1, 1] := 0; b[1, 6] := 0; b[1, 8] := 0; c[1, 2] := 0; c[1, 9] := 0; a[3] := 0; c[3] := 0; a[2] := 1/2; c[2] := 3/2; a[0, 0] := -1/2; a[0, 3] := 5/4; a[0, 1] := 0; a[0, 5] := 0; a[0, 6] := 0; b[0, 6] := -1; b[0, 1] := 3/2; b[0, 0] := 0; b[0, 3] := 0; b[0, 8] := 0; c[0, 2] := 0; c[0, 4] := 0; c[0, 9] := -1/3

eq1 := (epsilon^4*a[4]+epsilon^3*a[3]+epsilon^2*a[2]+epsilon*a[1])*x-(epsilon^4*b[4]+epsilon^3*b[3]+epsilon^2*b[2]+epsilon*b[1]+b0)*y+s

(1/2)*epsilon^2*x-5*y-(1/2)*x^3+(5/4)*x*y^2

(5)

eq2 := (epsilon^4*b[4]+epsilon^3*b[3]+epsilon^2*b[2]+epsilon*b[1]+b0)*x+(epsilon^4*a[4]+epsilon^3*a[3]+epsilon^2*a[2]+epsilon*a[1])*y+s1

5*x+(1/2)*epsilon^2*y+(3/2)*x^2*y-y^3

(6)

eq3 := (epsilon^4*c[4]+epsilon^3*c[3]+epsilon^2*c[2]+epsilon*c[1])*z+s2

(3/2)*epsilon^2*z-(1/3)*z^3

(7)

Faisons le changement (x,y,z)=(εX,εY,εZ)

 

x := epsilon*X; y := epsilon*Y; z := epsilon*Z

epsilon*X

 

epsilon*Y

 

epsilon*Z

(8)

Xpoint := collect(eq1/epsilon, epsilon)

((1/2)*X-(1/2)*X^3+(5/4)*X*Y^2)*epsilon^2-5*Y

(9)

Ypoint := collect(eq2/epsilon, epsilon)

((1/2)*Y+(3/2)*X^2*Y-Y^3)*epsilon^2+5*X

(10)

Zpoint := collect(eq3/epsilon, epsilon)

((3/2)*Z-(1/3)*Z^3)*epsilon^2

(11)

Faisons le changement (X, Y, Z) = (`ϱ`*cos(theta), `ϱ`*sin(theta), eta)

 

X := `ϱ`*cos(theta); Y := `ϱ`*sin(theta); Z := eta

`ϱ`*cos(theta)

 

`ϱ`*sin(theta)

 

eta

(12)

`ϱt` := collect(simplify((X*Xpoint+Y*Ypoint)/`ϱ`), epsilon)

-(1/4)*`ϱ`*epsilon^2*(17*`ϱ`^2*cos(theta)^4-19*cos(theta)^2*`ϱ`^2+4*`ϱ`^2-2)

(13)

`θt` := collect(simplify((X*Ypoint-Xpoint*Y)/`ϱ`^2), epsilon)

5+((17/4)*`ϱ`^2*cos(theta)^3*sin(theta)-(9/4)*`ϱ`^2*sin(theta)*cos(theta))*epsilon^2

(14)

`ηt` := collect(Zpoint, epsilon)

((3/2)*eta-(1/3)*eta^3)*epsilon^2

(15)

Utilisons le développpement de taylor

p := series(`ϱt`/`θt`, epsilon, 5)

series(-((1/20)*`ϱ`*(17*`ϱ`^2*cos(theta)^4-19*cos(theta)^2*`ϱ`^2+4*`ϱ`^2-2))*epsilon^2+((1/100)*`ϱ`*(17*`ϱ`^2*cos(theta)^4-19*cos(theta)^2*`ϱ`^2+4*`ϱ`^2-2)*((17/4)*`ϱ`^2*cos(theta)^3*sin(theta)-(9/4)*`ϱ`^2*sin(theta)*cos(theta)))*epsilon^4+O(epsilon^6),epsilon,6)

(16)

q := series(`ηt`/`θt`, epsilon, 5)

series(((3/10)*eta-(1/15)*eta^3)*epsilon^2+((1/5)*(-(3/10)*eta+(1/15)*eta^3)*((17/4)*`ϱ`^2*cos(theta)^3*sin(theta)-(9/4)*`ϱ`^2*sin(theta)*cos(theta)))*epsilon^4+O(epsilon^6),epsilon,6)

(17)

NULL

Averaging d'ordre 1

Les fonctions F11 et F21 sont données comme suit:

NULL

F11 := coeff(p, epsilon)

0

(18)

F21 := coeff(q, epsilon)

0

(19)

NULL

Calculons les fonctions moyennées f11et f12

f11 := (int(F11, theta = 0 .. 2*Pi))/(2*Pi)

0

(20)

f12 := (int(F21, theta = 0 .. 2*Pi))/(2*Pi)

0

(21)

solve({f11 = 0, f12 = 0}, {eta, `ϱ`})

{eta = eta, `ϱ` = `ϱ`}

(22)

NULL

Averaging d'ordre 2

NULL

F12 := simplify(coeff(p, epsilon^2))

-(1/20)*`ϱ`*(17*`ϱ`^2*cos(theta)^4-19*cos(theta)^2*`ϱ`^2+4*`ϱ`^2-2)

(23)

F22 := simplify(coeff(q, epsilon^2))

(3/10)*eta-(1/15)*eta^3

(24)

NULL

Calculons les fonctions moyennées "f21 "et "f22"

f21 := simplify((int(F12, theta = 0 .. 2*Pi))/(2*Pi))

-(1/160)*`ϱ`*(7*`ϱ`^2-16)

(25)

f22 := simplify((int(F22, theta = 0 .. 2*Pi))/(2*Pi))

-(1/30)*eta*(2*eta^2-9)

(26)

solve({f21 = 0, f22 = 0}, {eta, `ϱ`})

{eta = 0, `ϱ` = 0}, {eta = 3*RootOf(2*_Z^2-1), `ϱ` = 0}, {eta = 0, `ϱ` = 4*RootOf(7*_Z^2-1)}, {eta = 3*RootOf(2*_Z^2-1), `ϱ` = 4*RootOf(7*_Z^2-1)}

(27)

allvalues({eta = 0, `ϱ` = 4*RootOf(7*_Z^2-1)})

{eta = 0, `ϱ` = (4/7)*7^(1/2)}, {eta = 0, `ϱ` = -(4/7)*7^(1/2)}

(28)

allvalues({eta = 3*RootOf(2*_Z^2-1), `ϱ` = 4*RootOf(7*_Z^2-1)})

{eta = (3/2)*2^(1/2), `ϱ` = (4/7)*7^(1/2)}, {eta = -(3/2)*2^(1/2), `ϱ` = (4/7)*7^(1/2)}, {eta = (3/2)*2^(1/2), `ϱ` = -(4/7)*7^(1/2)}, {eta = -(3/2)*2^(1/2), `ϱ` = -(4/7)*7^(1/2)}

(29)

NULL

with(VectorCalculus)

M, d := Jacobian([f21, f22], [`ϱ`, eta] = [(4/7)*sqrt(7), 0], 'determinant')

Matrix(%id = 18446744074358842782), -3/50

(30)

factor(d)

-3/50

(31)

M1, d1 := Jacobian([f21, f22], [`ϱ`, eta] = [(4/7)*sqrt(7), (3/2)*sqrt(2)], 'determinant')

Matrix(%id = 18446744074358843142), 3/25

(32)

d1 := factor(d1)

3/25

(33)

M2, d2 := Jacobian([f21, f22], [`ϱ`, eta] = [(4/7)*sqrt(7), -(3/2)*sqrt(2)], 'determinant')

Matrix(%id = 18446744074358843382), 3/25

(34)

factor(d2)

3/25

(35)

restart

with(DEtools):

epsilon := 10^(-2)

1/100

(36)

eq1 := diff(x(t), t) = (1/2)*epsilon^2*x(t)-5*y(t)-(1/2)*x(t)^3+(5/4)*x(t)*y(t)^2

diff(x(t), t) = (1/20000)*x(t)-5*y(t)-(1/2)*x(t)^3+(5/4)*x(t)*y(t)^2

(37)

eq2 := diff(y(t), t) = 5*x(t)+(1/2)*epsilon^2*y(t)+(3/2)*x(t)^2*y(t)-y(t)^3

diff(y(t), t) = 5*x(t)+(1/20000)*y(t)+(3/2)*x(t)^2*y(t)-y(t)^3

(38)

eq3 := diff(z(t), t) = (3/2)*epsilon^2*z(t)-(1/3)*z(t)^3

diff(z(t), t) = (3/20000)*z(t)-(1/3)*z(t)^3

(39)

DEplot3d([eq1, eq2, eq3], [x(t), y(t), z(t)], t = -10 .. 10, [[x(0) = 0.1511857892e-1, y(0) = 0, z(0) = 0], [x(0) = 0.1511857892e-1, y(0) = 0, z(0) = 0.2121320343e-1], [x(0) = 0.1511857892e-1, y(0) = 0, z(0) = -0.2121320343e-1]], linecolor = [blue, red, black], stepsize = 0.1e-1)

 

Download Porgram_of_corollary_1_in_Maple.mw

First 34 35 36 37 38 39 40 Last Page 36 of 2364