MaplePrimes Questions

I'm trying to collect all terms involving the expression diff(G(xi), xi)/G(xi) in a symbolic equation using . While it's straightforward to do this by hand, I want to automate it in code — ideally by extracting the coefficient of this entire expression directly. However, when I use collect, Maple treats diff(G(xi), xi) and G(xi) separately, and I can't seem to group terms properly by the full ratio diff(G(xi), xi)/G(xi).

Is there a clean way or built-in Maple function to automatically collect or isolate the coefficient of diff(G(xi), xi)/G(xi) as a whole, without having to manually substitute or restructure the expression?

restart

with(PDEtools)

with(LinearAlgebra)

NULL

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

L := (-6*f^3*g*a[2]+6*f*g^3*a[2]+6*f*g*a[2]^2)*(diff(G(xi), xi))^4/G(xi)^4+(f*g^3*(10*lambda*a[2]+2*a[1])-f^3*g*(10*lambda*a[2]+2*a[1])+12*f*g*a[1]*a[2])*(diff(G(xi), xi))^3/G(xi)^3+(f*g^3*(2*a[2]*lambda^2+3*lambda*a[1]+10*mu*a[2]+2*a[2]*(lambda^2-mu))-4*f*p*a[2]-6*k*l*a[2]-f^3*g*(2*a[2]*lambda^2+3*lambda*a[1]+10*mu*a[2]+2*a[2]*(lambda^2-mu))+6*f*g*(2*a[0]*a[2]+a[1]^2))*(diff(G(xi), xi))^2/G(xi)^2+(f*g^3*(a[1]*(lambda^2-mu)+3*a[1]*mu+6*lambda*a[2]*mu)-4*f*p*a[1]-6*k*l*a[1]-f^3*g*(a[1]*(lambda^2-mu)+3*a[1]*mu+6*lambda*a[2]*mu)+12*f*g*a[0]*a[1])*(diff(G(xi), xi))/G(xi)+f*g^3*(lambda*mu*a[1]+2*mu^2*a[2])-4*f*p*a[0]-6*k*l*a[0]-f^3*g*(lambda*mu*a[1]+2*mu^2*a[2])+6*f*g*a[0]^2 = 0

(-6*f^3*g*a[2]+6*f*g^3*a[2]+6*f*g*a[2]^2)*(diff(G(xi), xi))^4/G(xi)^4+(f*g^3*(10*lambda*a[2]+2*a[1])-f^3*g*(10*lambda*a[2]+2*a[1])+12*f*g*a[1]*a[2])*(diff(G(xi), xi))^3/G(xi)^3+(f*g^3*(3*lambda*a[1]+2*a[2]*lambda^2+10*mu*a[2]+2*a[2]*(lambda^2-mu))-4*f*p*a[2]-6*k*l*a[2]-f^3*g*(3*lambda*a[1]+2*a[2]*lambda^2+10*mu*a[2]+2*a[2]*(lambda^2-mu))+6*f*g*(2*a[0]*a[2]+a[1]^2))*(diff(G(xi), xi))^2/G(xi)^2+(f*g^3*(a[1]*(lambda^2-mu)+3*a[1]*mu+6*a[2]*lambda*mu)-4*f*p*a[1]-6*k*l*a[1]-f^3*g*(a[1]*(lambda^2-mu)+3*a[1]*mu+6*a[2]*lambda*mu)+12*f*g*a[0]*a[1])*(diff(G(xi), xi))/G(xi)+f*g^3*(lambda*mu*a[1]+2*mu^2*a[2])-4*f*p*a[0]-6*k*l*a[0]-f^3*g*(lambda*mu*a[1]+2*mu^2*a[2])+6*f*g*a[0]^2 = 0

(2)

``

(3)

collect(%, {1/(diff(G(xi), xi)), G(xi)})

(-6*f^3*g*a[2]+6*f*g^3*a[2]+6*f*g*a[2]^2)*(diff(G(xi), xi))^4/G(xi)^4+(f*g^3*(10*lambda*a[2]+2*a[1])-f^3*g*(10*lambda*a[2]+2*a[1])+12*f*g*a[1]*a[2])*(diff(G(xi), xi))^3/G(xi)^3+(f*g^3*(3*lambda*a[1]+2*a[2]*lambda^2+10*mu*a[2]+2*a[2]*(lambda^2-mu))-4*f*p*a[2]-6*k*l*a[2]-f^3*g*(3*lambda*a[1]+2*a[2]*lambda^2+10*mu*a[2]+2*a[2]*(lambda^2-mu))+6*f*g*(2*a[0]*a[2]+a[1]^2))*(diff(G(xi), xi))^2/G(xi)^2+(f*g^3*(a[1]*(lambda^2-mu)+3*a[1]*mu+6*a[2]*lambda*mu)-4*f*p*a[1]-6*k*l*a[1]-f^3*g*(a[1]*(lambda^2-mu)+3*a[1]*mu+6*a[2]*lambda*mu)+12*f*g*a[0]*a[1])*(diff(G(xi), xi))/G(xi)+f*g^3*(lambda*mu*a[1]+2*mu^2*a[2])-4*f*p*a[0]-6*k*l*a[0]-f^3*g*(lambda*mu*a[1]+2*mu^2*a[2])+6*f*g*a[0]^2 = 0

(4)

L1 := %

num := numer(lhs(L)); num := expand(num); num_collected := collect(num, [1/(diff(G(xi), xi)), G(xi)]); eqs := [seq(coeff(num_collected, {1/(diff(G(xi), xi)), G(xi)}, i) = 0, i = 0 .. 8)]

[(-6*f^3*g*a[2]+6*f*g^3*a[2]+6*f*g*a[2]^2)*(diff(G(xi), xi))^4+(-10*f^3*g*lambda*a[2]+10*f*g^3*lambda*a[2]-2*f^3*g*a[1]+2*f*g^3*a[1]+12*f*g*a[1]*a[2])*G(xi)*(diff(G(xi), xi))^3+(-4*f^3*g*lambda^2*a[2]+4*f*g^3*lambda^2*a[2]-3*f^3*g*lambda*a[1]-8*f^3*g*mu*a[2]+3*f*g^3*lambda*a[1]+8*f*g^3*mu*a[2]+12*f*g*a[0]*a[2]+6*f*g*a[1]^2-4*f*p*a[2]-6*k*l*a[2])*G(xi)^2*(diff(G(xi), xi))^2+(-f^3*g*lambda^2*a[1]-6*f^3*g*lambda*mu*a[2]+f*g^3*lambda^2*a[1]+6*f*g^3*lambda*mu*a[2]-2*f^3*g*mu*a[1]+2*f*g^3*mu*a[1]+12*f*g*a[0]*a[1]-4*f*p*a[1]-6*k*l*a[1])*G(xi)^3*(diff(G(xi), xi))+(-f^3*g*lambda*mu*a[1]-2*f^3*g*mu^2*a[2]+f*g^3*lambda*mu*a[1]+2*f*g^3*mu^2*a[2]+6*f*g*a[0]^2-4*f*p*a[0]-6*k*l*a[0])*G(xi)^4 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0, 0 = 0]

(5)

Download collect-coe.mw

I am facing an issue with two algorithms: one runs correctly, while the other fails to execute. The only difference is that the second algorithm includes one additional term. I would like to understand what causes the failure in the second case.

 a while i used this without problem but i don't know what is issue now.

ode-not-run.mw

Error,(in solve)cannot solve expressions with sum(f[ij]*(H[j]*gamma[j] - PS[j]*alpha[j]),j =1 .. N) for H[j]
can any one what can I do for this error?

What's with some of the older posts missing images?  Were they deleted by maplesoft to save space on mapleprimes servers?  (Storage is pretty cheap these days)

I actually replaced some images a while ago, maybe a few years back.  However I've come across the post again and the image is gone ... strange.  Maybe there's an AI at work here clearing out images. 

In some cases the images are just the output of Maple code plots.  That's ok to remove, I guess, but in others, people have used screenshots which contain code that have been removed where in some cases after they're removed make the entire thread useless.  It's not often but it occurs. 

Anyways, does mapleprimes sometimes clear out images?  Or is it an inadvertent effect when some maintenance is performed?

For compution this is not important, for latex, I find  n>0 little more clear to read than 0<n 

Is there a way to tell Maple not to reverse terms on each side of the > just for latex purposes?

It seems Maple does this only for   > and not for  <

I know the latex output follows what is displayed on the screen in Maple. And that is what happens also for display. Maple rewrites n>0 as   0<n.   

I tried changing display->Typesetting level from extended to maple standard but this had no effect. 

Is there a trick to make Maple not all the > to  <  ?

Again, I wanted to do this just for the latex output because for computation and for screen display in worksheet, it is not an the issue for me, as I only use Latex output.

It seems Maple like to make everything  based on "<" internally and that is why it reverses it?

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

restart;

latex(n>0,'output'='string'); #why this is reverse on output?

"0<n"

latex(n>m,'output'='string'); #why this is reverse on output?

"m <n"

latex(n<0,'output'='string'); #but this stays the same

"n <0"

latex(n<m,'output'='string'); #but this stays the same

"n <m"

n>0

0 < n

 

 

Download why_reverses_may_1_2025.mw

I’m trying to verify a solution given in the form from  using Maple's odeTest. Even though the paper claims the solution satisfies the ODE, Maple does not simplify the result to zero. Could someone explain why the test fails or suggest the correct way to verify it in Maple?

restart

with(PDEtools)

with(LinearAlgebra)

with(Physics)

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

_local(gamma)

Warning, A new binding for the name `gamma` has been created. The global instance of this name is still accessible using the :- prefix, :-`gamma`.  See ?protect for details.

 

declare(u(x, t)); declare(U(xi)); declare(u(x, y, z, t)); declare(Q(xi)); declare(V(xi))

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

 

U(xi)*`will now be displayed as`*U

 

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

 

Q(xi)*`will now be displayed as`*Q

 

V(xi)*`will now be displayed as`*V

(2)

NULL

ode := diff(G(xi), xi) = G(xi)*sqrt(A+B*G(xi)^2)

diff(G(xi), xi) = G(xi)*(A+B*G(xi)^2)^(1/2)

(3)

S1 := G(xi) = -sqrt(A/B)*csch(sqrt(A)*(xi+xi[0]))

G(xi) = -(A/B)^(1/2)*csch(A^(1/2)*(xi+xi[0]))

(4)

res := simplify(odetest(S1, ode))

(A/B)^(1/2)*csch(A^(1/2)*(xi+xi[0]))*(A^(1/2)*coth(A^(1/2)*(xi+xi[0]))+(A*coth(A^(1/2)*(xi+xi[0]))^2)^(1/2))

(5)

S2 := G(xi) = sqrt(-A/B)*sec(sqrt(-A)*(xi+xi[0]))

G(xi) = (-A/B)^(1/2)*sec((-A)^(1/2)*(xi+xi[0]))

(6)

res := simplify(odetest(S2, ode))

(-A/B)^(1/2)*sec((-A)^(1/2)*(xi+xi[0]))*((-A)^(1/2)*tan((-A)^(1/2)*(xi+xi[0]))-(-A*tan((-A)^(1/2)*(xi+xi[0]))^2)^(1/2))

(7)

S3 := G(xi) = sqrt(-A/B)*sech(sqrt(A)*(xi+xi[0]))

G(xi) = (-A/B)^(1/2)*sech(A^(1/2)*(xi+xi[0]))

(8)

res := simplify(odetest(S3, ode))

(-A^(1/2)*tanh(A^(1/2)*(xi+xi[0]))-(A*tanh(A^(1/2)*(xi+xi[0]))^2)^(1/2))*(-A/B)^(1/2)*sech(A^(1/2)*(xi+xi[0]))

(9)

S4 := G(xi) = sqrt(-A/B)*csc(sqrt(-A)*(xi+xi[0]))

G(xi) = (-A/B)^(1/2)*csc((-A)^(1/2)*(xi+xi[0]))

(10)

res := simplify(odetest(S4, ode))

(-(-A)^(1/2)*cot((-A)^(1/2)*(xi+xi[0]))-(-A*cot((-A)^(1/2)*(xi+xi[0]))^2)^(1/2))*(-A/B)^(1/2)*csc((-A)^(1/2)*(xi+xi[0]))

(11)

S5 := G(xi) = cos(sqrt(-A)*(xi+xi[0]))+sin(sqrt(-A)*(xi+xi[0]))

G(xi) = cos((-A)^(1/2)*(xi+xi[0]))+sin((-A)^(1/2)*(xi+xi[0]))

(12)

res := simplify(odetest(S5, ode))

(cos((-A)^(1/2)*(xi+xi[0]))-sin((-A)^(1/2)*(xi+xi[0])))*(-A)^(1/2)+(B*sin(2*(-A)^(1/2)*(xi+xi[0]))+A+B)^(1/2)*(-cos((-A)^(1/2)*(xi+xi[0]))-sin((-A)^(1/2)*(xi+xi[0])))

(13)

S6 := G(xi) = 1/(sqrt(B)*(xi+xi[0]))

G(xi) = 1/(B^(1/2)*(xi+xi[0]))

(14)

odetest(S6, subs(A = 0, ode))

-csgn(1/(xi+xi[0]))/(B^(1/2)*(xi+xi[0])^2)-1/(B^(1/2)*(xi+xi[0])^2)

(15)

S7 := G(xi) = 1/(sqrt(-B)*(xi+xi[0]))

G(xi) = 1/((-B)^(1/2)*(xi+xi[0]))

(16)

odetest(S7, subs(A = 0, ode))

-(-1/(xi+xi[0])^2)^(1/2)*xi[0]/((-B)^(1/2)*(xi+xi[0])^2)-(-1/(xi+xi[0])^2)^(1/2)*xi/((-B)^(1/2)*(xi+xi[0])^2)-1/((-B)^(1/2)*(xi+xi[0])^2)

(17)

ode2 := diff(G(xi), xi) = A+B*G(xi)^2

diff(G(xi), xi) = A+B*G(xi)^2

(18)

S8 := G(xi) = sgn(A)*sqrt(A/B)*tan(sqrt(A*B)*(xi+xi[0]))

G(xi) = sgn(A)*(A/B)^(1/2)*tan((A*B)^(1/2)*(xi+xi[0]))

(19)

res := simplify(odetest(S8, ode2))

(sgn(A)*(A*B)^(1/2)*(tan((A*B)^(1/2)*xi[0])^2+1)*(tan((A*B)^(1/2)*xi)^2+1)*(A/B)^(1/2)-A*((tan((A*B)^(1/2)*xi)+tan((A*B)^(1/2)*xi[0]))^2*sgn(A)^2+(tan((A*B)^(1/2)*xi[0])*tan((A*B)^(1/2)*xi)-1)^2))/(tan((A*B)^(1/2)*xi[0])*tan((A*B)^(1/2)*xi)-1)^2

(20)

NULL

S9 := G(xi) = -sgn(A)*sqrt(A/B)*cot(sqrt(A*B)*(xi+xi[0]))

G(xi) = -sgn(A)*(A/B)^(1/2)*cot((A*B)^(1/2)*(xi+xi[0]))

(21)

res := simplify(odetest(S9, ode2))

(sgn(A)*(A*B)^(1/2)*(cot((A*B)^(1/2)*xi[0])^2+1)*(cot((A*B)^(1/2)*xi)^2+1)*(A/B)^(1/2)-A*((cot((A*B)^(1/2)*xi[0])*cot((A*B)^(1/2)*xi)-1)^2*sgn(A)^2+(cot((A*B)^(1/2)*xi[0])+cot((A*B)^(1/2)*xi))^2))/(cot((A*B)^(1/2)*xi[0])+cot((A*B)^(1/2)*xi))^2

(22)

NULL

S9 := G(xi) = sgn(A)*sqrt(-A/B)*tanh(sqrt(-A*B)*(xi+xi[0]))

G(xi) = sgn(A)*(-A/B)^(1/2)*tanh((-A*B)^(1/2)*(xi+xi[0]))

(23)

res := simplify(odetest(S9, ode2))

(A*(sgn(A)^2-1)*cosh(2*(-A*B)^(1/2)*(xi+xi[0]))-sgn(A)^2*A+2*sgn(A)*(-A/B)^(1/2)*(-A*B)^(1/2)-A)/(1+cosh(2*(-A*B)^(1/2)*(xi+xi[0])))

(24)

NULL

S10 := G(xi) = sgn(A)*sqrt(-A/B)*coth(sqrt(-A*B)*(xi+xi[0]))

G(xi) = sgn(A)*(-A/B)^(1/2)*coth((-A*B)^(1/2)*(xi+xi[0]))

(25)

odetest(S10, ode2)

(sgn(A)^2*A*cosh(2*(-A*B)^(1/2)*(xi+xi[0]))+sgn(A)^2*A-2*sgn(A)*(-A/B)^(1/2)*(-A*B)^(1/2)-A*cosh(2*(-A*B)^(1/2)*(xi+xi[0]))+A)/(-1+cosh(2*(-A*B)^(1/2)*(xi+xi[0])))

(26)

NULL

S11 := G(xi) = -1/(B*(xi+xi[0]))

G(xi) = -1/(B*(xi+xi[0]))

(27)

odetest(S11, subs(A = 0, ode2))

0

(28)

S12 := G(xi) = A*(xi+xi[0])

G(xi) = A*(xi+xi[0])

(29)

odetest(S12, subs(B = 0, ode2))

0

(30)

Download Z1.mw

Why doesn't this ODE return zero when using odetest? Did I do something wrong?

Would you like help checking the equation or debugging the issue?

restart

with(PDEtools)

declare(P(mu))

P(mu)*`will now be displayed as`*P

(1)

assume(A::real, r::real, rho::real, lambda::real)

Psol := P(mu) = 2*A*lambda/((A^2+r)*exp(lambda*rho*mu)+r*exp(-lambda*rho*mu))

P(mu) = 2*A*lambda/((A^2+r)*exp(lambda*rho*mu)+r*exp(-lambda*rho*mu))

(2)

ode := (diff(P(mu), mu))^2-rho^2*P(mu)^2*(1+r*P(mu)^2) = 0

(diff(P(mu), mu))^2-rho^2*P(mu)^2*(1+r*P(mu)^2) = 0

(3)

res := odetest(Psol, ode)

4*A^6*rho^2*lambda^4*exp(6*lambda*rho*mu)/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4+8*r*A^4*rho^2*lambda^4*exp(6*lambda*rho*mu)/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4-24*A^4*lambda^4*rho^2*exp(4*lambda*rho*mu)*r/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4-4*A^6*rho^2*lambda^2*exp(6*lambda*rho*mu)/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4+4*A^2*r^2*rho^2*lambda^4*exp(6*lambda*rho*mu)/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4-8*A^2*lambda^4*rho^2*exp(4*lambda*rho*mu)*r^2/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4+4*A^2*r^2*rho^2*lambda^4*exp(2*lambda*rho*mu)/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4-8*r*A^4*rho^2*lambda^2*exp(6*lambda*rho*mu)/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4-8*A^4*lambda^2*rho^2*exp(4*lambda*rho*mu)*r/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4-4*A^2*r^2*rho^2*lambda^2*exp(6*lambda*rho*mu)/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4-8*A^2*lambda^2*rho^2*exp(4*lambda*rho*mu)*r^2/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4-4*A^2*r^2*rho^2*lambda^2*exp(2*lambda*rho*mu)/(A^2*exp(2*lambda*rho*mu)+exp(2*lambda*rho*mu)*r+r)^4

(4)

simplify(res)

4*lambda^2*exp(2*lambda*rho*mu)*(((-2*lambda^2-2)*r^2+(-6*lambda^2-2)*A^2*r)*exp(2*lambda*rho*mu)+(lambda+1)*((A^2+r)^2*exp(4*lambda*rho*mu)+r^2)*(lambda-1))*A^2*rho^2/((A^2+r)*exp(2*lambda*rho*mu)+r)^4

(5)

P_hyper := P(mu) = 2*A*lambda/((A^2+r)*cosh(rho*mu)+(A^2-r)*sinh(rho*mu))

P(mu) = 2*A*lambda/((A^2+r)*cosh(rho*mu)+(A^2-r)*sinh(rho*mu))

(6)

res_hyper := simplify(odetest(P_hyper, ode), symbolic)

-16*A^4*lambda^2*rho^2*r*(lambda^2+1)/((A^2+r)*cosh(rho*mu)+(A^2-r)*sinh(rho*mu))^4

(7)
 

NULL

Download ode.mw

This happens in Maple 2025, but when I checked Maple 2024.2, same thing happen.

To reproduce, I typed ?coeff in the worksheet. Now the help page for coeff comes up OK. On the right, there are some links below "see also". 

Clicking on the one that says PolynomialTools[CoefficientVector] and now an EMPTY page opens up.

Also, typing ?PolynomialTools in worksheet, opens the help page for Overview of the PolynomialTools Package. Now clicking on CoefficientList link, opens an EMPTY page. Same when clicking on CoefficientVector, an EMPTY page !

Have not checked all the links in the help page, but why are some commands have empty help pages?

 

 

I am interested in having bold notation for vectors and matrices.

Any commands or packages that output expressions this way?

I’m trying to test a specific function as a solution to a nonlinear ODE in Maple. The equation is of the Riccati type, and my candidate solution involves parameters A, B, and C.

I've used assuming to specify the condition (4AC−B2)>0 and (4AC - B^2) <0, but when I use odetest to verify the solution, I still get a nonzero result. Additionally, when I apply the assumption, Maple sometimes introduces a negation sign in the output (e.g., changing sqrt(...) into -sqrt(...)), which wasn't part of the original solution.

restart

with(PDEtools)

with(LinearAlgebra)

with(Physics)

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

E := diff(G(xi), xi) = A+B*G(xi)+C*G(xi)^2

diff(G(xi), xi) = A+B*G(xi)+C*G(xi)^2

(2)

S1 := G(xi) = (sqrt(4*A*C-B^2)*tan((1/2)*sqrt(4*A*C-B^2)*(d[0]+xi))-B)/(2*C)

G(xi) = (1/2)*((4*A*C-B^2)^(1/2)*tan((1/2)*(4*A*C-B^2)^(1/2)*(d[0]+xi))-B)/C

(3)

odetest(S1, E)

0

(4)

S2 := G(xi) = -(sqrt(4*A*C-B^2)*cot((1/2)*sqrt(4*A*C-B^2)*(d[0]+xi))+B)/(2*C)

G(xi) = -(1/2)*((4*A*C-B^2)^(1/2)*cot((1/2)*(4*A*C-B^2)^(1/2)*(d[0]+xi))+B)/C

(5)

odetest(S2, E)

0

(6)

assume(4*A*C-B^2 < 0)

S3 := G(xi) = -(sqrt(4*A*C-B^2)*tanh((1/2)*sqrt(4*A*C-B^2)*(d[0]+xi))+B)/(2*C)

G(xi) = -(1/2)*((4*A*C-B^2)^(1/2)*tanh((1/2)*(4*A*C-B^2)^(1/2)*(d[0]+xi))+B)/C

(7)

odetest(S3, E)

-2*A+(1/2)*B^2/C

(8)

Download A2.mw

i did every thing coreectly but nothing happen not apply where is my mistake?

``

restart

with(PDEtools)

with(LinearAlgebra)

with(Physics)

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

NULL

S := (diff(G(xi), xi))^2-r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2) = 0

(diff(G(xi), xi))^2-r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2) = 0

(2)

SS := diff(G(xi), xi) = sqrt(r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2))

diff(G(xi), xi) = (r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2))^(1/2)

(3)

Se := sqrt(r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2)) = diff(G(xi), xi)

(r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2))^(1/2) = diff(G(xi), xi)

(4)

dub := diff(SS, xi)

diff(diff(G(xi), xi), xi) = (1/2)*(2*r^2*G(xi)*(a+b*G(xi)+l*G(xi)^2)*(diff(G(xi), xi))+r^2*G(xi)^2*(b*(diff(G(xi), xi))+2*l*G(xi)*(diff(G(xi), xi))))/(r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2))^(1/2)

(5)

Dubl2 := simplify(diff(diff(G(xi), xi), xi) = (1/2)*(2*r^2*G(xi)*(a+b*G(xi)+l*G(xi)^2)*(diff(G(xi), xi))+r^2*G(xi)^2*(b*(diff(G(xi), xi))+2*l*G(xi)*(diff(G(xi), xi))))/(r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2))^(1/2))

diff(diff(G(xi), xi), xi) = (1/2)*r^2*G(xi)*(diff(G(xi), xi))*(4*l*G(xi)^2+3*b*G(xi)+2*a)/(r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2))^(1/2)

(6)

subs(SA, Dubl2)

diff((r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2))^(1/2), xi) = (1/2)*r^2*G(xi)*(4*l*G(xi)^2+3*b*G(xi)+2*a)

(7)

subs(Se, Dubl2)

diff(diff(G(xi), xi), xi) = (1/2)*r^2*G(xi)*(diff(G(xi), xi))*(4*l*G(xi)^2+3*b*G(xi)+2*a)/(r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2))^(1/2)

(8)

subs(lhs(Se) = rhs(Se), Dubl2)

diff(diff(G(xi), xi), xi) = (1/2)*r^2*G(xi)*(diff(G(xi), xi))*(4*l*G(xi)^2+3*b*G(xi)+2*a)/(r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2))^(1/2)

(9)
 

NULL

Download subs.mw

Someone please help me with the computation of the right and left eigenvectors. my system of equation is attached below

with(VectorCalculus):

 

interface(imaginaryunit = I)

I

(2)

I

I

(3)

sqrt(-4)

2*I

(4)

NULL

``

Limit(N(t) = N__0*exp(-mu*t)+exp(mu*t)*K/mu, t = infinity)

 

limit(N(t), t = infinity) = limit(N__0*exp(-mu*t)+exp(mu*t)*K/mu, t = infinity)

(5)

 

NULL

#to calculate the  disease free equilibrium,

NULL

E1 := -S*µ__C+`&Lambda;__p`

-S*µ__C+Lambda__p

(6)

NULL

``

(7)

E3 := -S__A*µ__A+`&Lambda;__A`

-S__A*µ__A+Lambda__A

(8)

NULL

``

(9)

NULL

``

(10)

NULL

solve({E1 = 0, E3 = 0}, {S, S__A})

{S = Lambda__p/µ__C, S__A = Lambda__A/µ__A}

(11)

NULL

NULL#to calculate the Endemic Equilibrium state,

Typesetting:-mparsed()

(12)

restart

with(VectorCalculus):

 

interface(imaginaryunit = I)

I

(14)

I

I

(15)

sqrt(-4)

2*I

(16)

``

E1 := `&Lambda;__p`-(`&varphi;`*`&theta;__B`*I__A/N__p+µ__C)*S+`&omega;__B`*I__B

Lambda__p-(varphi*theta__B*I__A/N__p+µ__C)*S+omega__B*I__B

(17)

E2 := `&varphi;`*`&theta;__B`*I__A*S/N__p-`&omega;__B`*I__B-(`&sigma;__B`+µ__C)*I__B

varphi*theta__B*I__A*S/N__p-omega__B*I__B-(sigma__B+µ__C)*I__B

(18)

``

(19)

E3 := `&Lambda;__A`-(µ__A+`&varphi;`*`&alpha;__B`*I__B/N__p)*S__A+`&delta;__A`*I__A

Lambda__A-(µ__A+varphi*alpha__B*I__B/N__p)*S__A+delta__A*I__A

(20)

E4 := `&varphi;`*`&alpha;__B`*I__B*S__A/N__p-(µ__A+`&delta;__A`)*I__A

varphi*alpha__B*I__B*S__A/N__p-(µ__A+delta__A)*I__A

(21)

NULL

``

(22)

NULL

``

(23)

solve({E1 = 0, E2 = 0, E3 = 0, E4 = 0}, {I__A, I__B, S, S__A})

{I__A = 0, I__B = 0, S = Lambda__p/µ__C, S__A = Lambda__A/µ__A}, {I__A = -(N__p^2*µ__A^2*µ__C^2+N__p^2*µ__A^2*µ__C*omega__B+N__p^2*µ__A^2*µ__C*sigma__B+N__p^2*µ__A*µ__C^2*delta__A+N__p^2*µ__A*µ__C*delta__A*omega__B+N__p^2*µ__A*µ__C*delta__A*sigma__B-varphi^2*Lambda__A*Lambda__p*alpha__B*theta__B)/(varphi*µ__A*theta__B*(N__p*µ__A*µ__C+N__p*µ__A*sigma__B+N__p*µ__C*delta__A+N__p*delta__A*sigma__B+varphi*Lambda__p*alpha__B)), I__B = -(N__p^2*µ__A^2*µ__C^2+N__p^2*µ__A^2*µ__C*omega__B+N__p^2*µ__A^2*µ__C*sigma__B+N__p^2*µ__A*µ__C^2*delta__A+N__p^2*µ__A*µ__C*delta__A*omega__B+N__p^2*µ__A*µ__C*delta__A*sigma__B-varphi^2*Lambda__A*Lambda__p*alpha__B*theta__B)/(alpha__B*(N__p*µ__A*µ__C^2+N__p*µ__A*µ__C*omega__B+N__p*µ__A*µ__C*sigma__B+varphi*µ__C*Lambda__A*theta__B+varphi*Lambda__A*sigma__B*theta__B)*varphi), S = (N__p*µ__A*µ__C+N__p*µ__A*sigma__B+N__p*µ__C*delta__A+N__p*delta__A*sigma__B+varphi*Lambda__p*alpha__B)*µ__A*N__p*(µ__C+omega__B+sigma__B)/(alpha__B*varphi*(N__p*µ__A*µ__C^2+N__p*µ__A*µ__C*omega__B+N__p*µ__A*µ__C*sigma__B+varphi*µ__C*Lambda__A*theta__B+varphi*Lambda__A*sigma__B*theta__B)), S__A = N__p*(N__p*µ__A^2*µ__C^2+N__p*µ__A^2*µ__C*omega__B+N__p*µ__A^2*µ__C*sigma__B+N__p*µ__A*µ__C^2*delta__A+N__p*µ__A*µ__C*delta__A*omega__B+N__p*µ__A*µ__C*delta__A*sigma__B+varphi*µ__A*µ__C*Lambda__A*theta__B+varphi*µ__A*Lambda__A*sigma__B*theta__B+varphi*µ__C*Lambda__A*delta__A*theta__B+varphi*Lambda__A*delta__A*sigma__B*theta__B)/(varphi*µ__A*theta__B*(N__p*µ__A*µ__C+N__p*µ__A*sigma__B+N__p*µ__C*delta__A+N__p*delta__A*sigma__B+varphi*Lambda__p*alpha__B))}

(24)

``

J := Jacobian([E1, E2, E3, E4], [S, I__B, S__A, I__A])

Matrix(%id = 18446746854857131062)

(25)

NULL

restart

J := Matrix(4, 4, {(1, 1) = -`&varphi;`*`&theta;__B`*I__A/N__p-µ__C, (1, 2) = `&omega;__B`, (1, 3) = 0, (1, 4) = -`&varphi;`*`&theta;__B`*S/N__p, (2, 1) = `&varphi;`*`&theta;__B`*I__A/N__p, (2, 2) = -`&omega;__B`-`&sigma;__B`-µ__C, (2, 3) = 0, (2, 4) = `&varphi;`*`&theta;__B`*S/N__p, (3, 1) = 0, (3, 2) = -`&varphi;`*`&alpha;__B`*S__A/N__p, (3, 3) = -µ__A-`&varphi;`*`&alpha;__B`*I__B/N__p, (3, 4) = `&delta;__A`, (4, 1) = 0, (4, 2) = `&varphi;`*`&alpha;__B`*S__A/N__p, (4, 3) = `&varphi;`*`&alpha;__B`*I__B/N__p, (4, 4) = -µ__A-`&delta;__A`})

Matrix(%id = 18446746579340105118)

(26)

S := `&Lambda;__p`/µ__C

Lambda__p/µ__C

(27)

S__A := `&Lambda;__A`/µ__A

Lambda__A/µ__A

(28)

I__B := 0

0

(29)

I__A := 0

0

(30)

NULL

0

(31)

J := Matrix(4, 4, {(1, 1) = -`&varphi;`*`&theta;__B`*I__A/N__p-µ__C, (1, 2) = `&omega;__B`, (1, 3) = 0, (1, 4) = -`&varphi;`*`&theta;__B`*S/N__p, (2, 1) = `&varphi;`*`&theta;__B`*I__A/N__p, (2, 2) = -`&omega;__B`-`&sigma;__B`-µ__C, (2, 3) = 0, (2, 4) = `&varphi;`*`&theta;__B`*S/N__p, (3, 1) = 0, (3, 2) = -`&varphi;`*`&alpha;__B`*S__A/N__p, (3, 3) = -µ__A-`&varphi;`*`&alpha;__B`*I__B/N__p, (3, 4) = `&delta;__A`, (4, 1) = 0, (4, 2) = `&varphi;`*`&alpha;__B`*S__A/N__p, (4, 3) = `&varphi;`*`&alpha;__B`*I__B/N__p, (4, 4) = -µ__A-`&delta;__A`})

Matrix(%id = 18446746579340107518)

(32)

J := Matrix(4, 4, {(1, 1) = -µ__C, (1, 2) = `&omega;__B`, (1, 3) = 0, (1, 4) = -`&beta;__1`, (2, 1) = 0, (2, 2) = -`&omega;__B`-`&sigma;__B`-µ__C, (2, 3) = 0, (2, 4) = -`&beta;__1`, (3, 1) = 0, (3, 2) = -`&beta;__2`, (3, 3) = -µ__A, (3, 4) = `&delta;__A`, (4, 1) = 0, (4, 2) = `&beta;__2`, (4, 3) = 0, (4, 4) = -µ__A-`&delta;__A`})

Matrix(%id = 18446746579417403630)

(33)

"simplify( ? )"

Matrix(%id = 18446746579305905318)

(34)

"LinearAlgebra:-Eigenvalues( ? )"

Vector[column](%id = 18446746579445964182)

(35)

"LinearAlgebra:-CharacteristicPolynomial( ?, lambda )"

lambda^4+(2*µ__A+delta__A+omega__B+sigma__B+2*µ__C)*lambda^3+(beta__1*beta__2+µ__A^2+4*µ__A*µ__C+µ__A*delta__A+2*µ__A*omega__B+2*µ__A*sigma__B+µ__C^2+2*µ__C*delta__A+µ__C*omega__B+µ__C*sigma__B+delta__A*omega__B+delta__A*sigma__B)*lambda^2+(beta__1*beta__2*µ__A+beta__1*beta__2*µ__C+2*µ__A^2*µ__C+µ__A^2*omega__B+µ__A^2*sigma__B+2*µ__A*µ__C^2+2*µ__A*µ__C*delta__A+2*µ__A*µ__C*omega__B+2*µ__A*µ__C*sigma__B+µ__A*delta__A*omega__B+µ__A*delta__A*sigma__B+µ__C^2*delta__A+µ__C*delta__A*omega__B+µ__C*delta__A*sigma__B)*lambda+beta__1*beta__2*µ__A*µ__C+µ__A^2*µ__C^2+µ__A^2*µ__C*omega__B+µ__A^2*µ__C*sigma__B+µ__A*µ__C^2*delta__A+µ__A*µ__C*delta__A*omega__B+µ__A*µ__C*delta__A*sigma__B

(36)

NULL

"(->)"

Vector[column](%id = 18446746579340117046)

(37)

# to find the trace we

 

Matrix(7, 7, {(1, 1) = -beta*lambda-v__1-µ, (1, 2) = v__2, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (1, 7) = 0, (2, 1) = v__1, (2, 2) = beta*(w-1)*lambda-µ-v__2-alpha, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (2, 7) = 0, (3, 1) = 0, (3, 2) = alpha, (3, 3) = -µ, (3, 4) = 0, (3, 5) = `&rho;__A`, (3, 6) = `&rho;__F`, (3, 7) = -(-1+k)*`&rho;__Q`, (4, 1) = beta*lambda, (4, 2) = -beta*(w-1)*lambda, (4, 3) = 0, (4, 4) = -q__E-delta-µ, (4, 5) = 0, (4, 6) = 0, (4, 7) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = a*delta, (5, 5) = -`&rho;__A`-q__A-µ, (5, 6) = 0, (5, 7) = k*`&rho;__Q`, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = -delta*(-1+a), (6, 5) = 0, (6, 6) = -`&rho;__F`-q__F-`&delta;__F`-µ, (6, 7) = 0, (7, 1) = 0, (7, 2) = 0, (7, 3) = 0, (7, 4) = q__E, (7, 5) = q__A, (7, 6) = q__F, (7, 7) = -`&rho;__Q`-`&delta;__Q`-µ})

Matrix(%id = 36893490965935089652)

(38)

"(->)"

-beta*lambda-v__1-7*µ+beta*(w-1)*lambda-v__2-alpha-q__E-delta-rho__A-q__A-rho__F-q__F-delta__F-rho__Q-delta__Q

(39)

 

#this shows that trace is negative

 

#to Achieve stability, the value below must be less than zero

 

(-q__E-delta-µ)*(-`&rho;__F`-q__F-`&delta;__F`-µ)*(-k*q__A*`&rho;__Q`+q__A*µ+q__A*`&delta;__Q`+q__A*`&rho;__Q`+µ^2+µ*`&delta;__Q`+µ*`&rho;__A`+µ*`&rho;__Q`+`&delta;__Q`*`&rho;__A`+`&rho;__A`*`&rho;__Q`)*µ < 0

(-q__E-delta-µ)*(-rho__F-q__F-delta__F-µ)*(-k*q__A*rho__Q+q__A*rho__Q+q__A*µ+q__A*delta__Q+rho__A*rho__Q+rho__A*µ+rho__A*delta__Q+rho__Q*µ+µ^2+µ*delta__Q)*µ < 0

(40)

 NULL

M := diff(N(t), t) = Pi-µ*N(t)

diff(N(t), t) = Pi-µ*N(t)

(41)

dsolve({M}, N(t))

{N(t) = Pi/µ+exp(-µ*t)*_C1}

(42)

eval({N(t) = Pi/µ+exp(-µ*t)*_C1}, [t = infinity])

{N(infinity) = Pi/µ+exp(-µ*infinity)*_C1}

(43)

value(%)

{N(infinity) = Pi/µ+exp(-µ*infinity)*_C1}

(44)

Limit(N(t) = Pi/µ+exp(-µ*t)*_C1, t = infinity); value(%)

Limit(N(t) = Pi/µ+exp(-µ*t)*_C1, t = infinity)

 

limit(N(t), t = infinity) = limit(Pi/µ+exp(-µ*t)*_C1, t = infinity)

(45)

 

Subs := diff(S(t), t) = -(beta*lambda+v__1+µ)*S(t)

diff(S(t), t) = -(beta*lambda+v__1+µ)*S(t)

(46)

dsolve({Subs}, S(t))

{S(t) = _C1*exp(-(beta*lambda+v__1+µ)*t)}

(47)
 

``

Download Cotton_DFE_and_Jacobian.mw

I tried solving this ODE, but my result is very different from the expected one. How can I correctly obtain the solution? Also, is there a way to include both the positive and negative signs (±) in the equation so that the final result reflects both possibilities?

restart

with(PDEtools)

with(LinearAlgebra)

with(Physics)

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

_local(gamma)

Warning, A new binding for the name `gamma` has been created. The global instance of this name is still accessible using the :- prefix, :-`gamma`.  See ?protect for details.

 

declare(Omega(x, t)); declare(U(xi)); declare(u(x, y, z, t)); declare(Q(xi)); declare(V(xi))

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

 

U(xi)*`will now be displayed as`*U

 

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

 

Q(xi)*`will now be displayed as`*Q

 

V(xi)*`will now be displayed as`*V

(2)

``

ode := f*g^3*(diff(diff(U(xi), xi), xi))-4*f*p*U(xi)-6*k*l*U(xi)-f^3*g*(diff(diff(U(xi), xi), xi))+6*f*g*U(xi)^2 = 0

f*g^3*(diff(diff(U(xi), xi), xi))-4*f*p*U(xi)-6*k*l*U(xi)-f^3*g*(diff(diff(U(xi), xi), xi))+6*f*g*U(xi)^2 = 0

(3)

S := (diff(G(xi), xi))^2-r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2) = 0

(diff(G(xi), xi))^2-r^2*G(xi)^2*(a+b*G(xi)+l*G(xi)^2) = 0

(4)

S1 := dsolve(S, G(xi))

G(xi) = (1/2)*(-b+(-4*a*l+b^2)^(1/2))/l, G(xi) = -(1/2)*(b+(-4*a*l+b^2)^(1/2))/l, G(xi) = -4*a*exp(c__1*r*a^(1/2))/(exp(xi*r*a^(1/2))*(4*a*l-b^2+2*b*exp(c__1*r*a^(1/2))/exp(xi*r*a^(1/2))-(exp(c__1*r*a^(1/2)))^2/(exp(xi*r*a^(1/2)))^2)), G(xi) = -4*a*exp(xi*r*a^(1/2))/(exp(c__1*r*a^(1/2))*(4*a*l-b^2+2*b*exp(xi*r*a^(1/2))/exp(c__1*r*a^(1/2))-(exp(xi*r*a^(1/2)))^2/(exp(c__1*r*a^(1/2)))^2))

(5)

S2 := S1[3]

G(xi) = -4*a*exp(c__1*r*a^(1/2))/(exp(xi*r*a^(1/2))*(4*a*l-b^2+2*b*exp(c__1*r*a^(1/2))/exp(xi*r*a^(1/2))-(exp(c__1*r*a^(1/2)))^2/(exp(xi*r*a^(1/2)))^2))

(6)

normal(G(xi) = -4*a*exp(c__1*r*a^(1/2))/(exp(xi*r*a^(1/2))*(4*a*l-b^2+2*b*exp(c__1*r*a^(1/2))/exp(xi*r*a^(1/2))-(exp(c__1*r*a^(1/2)))^2/(exp(xi*r*a^(1/2)))^2)), ':-expanded')

G(xi) = 4*a*exp(c__1*r*a^(1/2))*exp(xi*r*a^(1/2))/(-4*a*l*(exp(xi*r*a^(1/2)))^2+b^2*(exp(xi*r*a^(1/2)))^2-2*b*exp(c__1*r*a^(1/2))*exp(xi*r*a^(1/2))+(exp(c__1*r*a^(1/2)))^2)

(7)

simplify(G(xi) = 4*a*exp(c__1*r*a^(1/2))*exp(xi*r*a^(1/2))/(-4*a*l*(exp(xi*r*a^(1/2)))^2+b^2*(exp(xi*r*a^(1/2)))^2-2*b*exp(c__1*r*a^(1/2))*exp(xi*r*a^(1/2))+(exp(c__1*r*a^(1/2)))^2))

G(xi) = -4*a*exp(a^(1/2)*r*(c__1+xi))/(4*a*l*exp(2*xi*r*a^(1/2))-b^2*exp(2*xi*r*a^(1/2))+2*b*exp(a^(1/2)*r*(c__1+xi))-exp(2*c__1*r*a^(1/2)))

(8)

convert(%, trig)

G(xi) = -4*a*(cosh(a^(1/2)*r*(c__1+xi))+sinh(a^(1/2)*r*(c__1+xi)))/(4*a*l*(cosh(2*xi*r*a^(1/2))+sinh(2*xi*r*a^(1/2)))-b^2*(cosh(2*xi*r*a^(1/2))+sinh(2*xi*r*a^(1/2)))+2*b*(cosh(a^(1/2)*r*(c__1+xi))+sinh(a^(1/2)*r*(c__1+xi)))-cosh(2*c__1*r*a^(1/2))-sinh(2*c__1*r*a^(1/2)))

(9)

convert(S1[3], trig)

G(xi) = -4*a*(cosh(c__1*r*a^(1/2))+sinh(c__1*r*a^(1/2)))/((cosh(xi*r*a^(1/2))+sinh(xi*r*a^(1/2)))*(4*a*l-b^2+2*b*(cosh(c__1*r*a^(1/2))+sinh(c__1*r*a^(1/2)))/(cosh(xi*r*a^(1/2))+sinh(xi*r*a^(1/2)))-(cosh(c__1*r*a^(1/2))+sinh(c__1*r*a^(1/2)))^2/(cosh(xi*r*a^(1/2))+sinh(xi*r*a^(1/2)))^2))

(10)

simplify(G(xi) = -4*a*(cosh(c__1*r*a^(1/2))+sinh(c__1*r*a^(1/2)))/((cosh(xi*r*a^(1/2))+sinh(xi*r*a^(1/2)))*(4*a*l-b^2+2*b*(cosh(c__1*r*a^(1/2))+sinh(c__1*r*a^(1/2)))/(cosh(xi*r*a^(1/2))+sinh(xi*r*a^(1/2)))-(cosh(c__1*r*a^(1/2))+sinh(c__1*r*a^(1/2)))^2/(cosh(xi*r*a^(1/2))+sinh(xi*r*a^(1/2)))^2)))

G(xi) = -4*a*(cosh(c__1*r*a^(1/2))+sinh(c__1*r*a^(1/2)))*(cosh(xi*r*a^(1/2))+sinh(xi*r*a^(1/2)))/((4*a*l-b^2)*cosh(xi*r*a^(1/2))^2+((8*a*l-2*b^2)*sinh(xi*r*a^(1/2))+2*b*(cosh(c__1*r*a^(1/2))+sinh(c__1*r*a^(1/2))))*cosh(xi*r*a^(1/2))+(4*a*l-b^2)*sinh(xi*r*a^(1/2))^2+2*b*(cosh(c__1*r*a^(1/2))+sinh(c__1*r*a^(1/2)))*sinh(xi*r*a^(1/2))-(cosh(c__1*r*a^(1/2))+sinh(c__1*r*a^(1/2)))^2)

(11)
   

Download tt.mw

I need to create a slider plot for A10, A11, and A12 by varying the parameters theta, Pu, and a.
I have a syntax ready — could you suggest modifications to make it work correctly and generate the plot?

Additionally, is it possible to compute the values of A13 and A14 by substituting the obtained A10, A11, and A12 values for each combination of theta, Pu, and a from the slider plot?

Sheet attached: Slider_Q.mw

The series to ode using 'series' option (if it exists) should always be series(...), i.e. with big O at end. but sometimes Maple forgets to add this. Here is an example

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1862 and is the same as the version installed in this computer, created 2025, April 25, 10:33 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 15 and is the same as the version installed in this computer, created April 27, 2025, 23:18 hours Eastern Time.`

restart;

ode:=diff(y(x),x)+y(x)=1+x;
IC:=y(0)=0;
sol:=dsolve([ode,IC],y(x),'series')

diff(y(x), x)+y(x) = 1+x

y(0) = 0

y(x) = x

lprint(sol); # notice solution is not series, it should be

y(x) = x

#above solution should be
y(x) = series(x+O(x^6),x,6)

y(x) = series(x+O(x^6),x,6)

#this example below is correct
ode:=diff(y(x),x)+y(x)=1+x;
IC:=y(0)=1;
sol:=dsolve([ode,IC],y(x),'series')

diff(y(x), x)+y(x) = 1+x

y(0) = 1

y(x) = series(1+(1/2)*x^2-(1/6)*x^3+(1/24)*x^4-(1/120)*x^5+O(x^6),x,6)

lprint(sol); #solution is series

y(x) = series(1+1/2*x^2-1/6*x^3+1/24*x^4-1/120*x^5+O(x^6),x,6)

 

 

Download bug_report_dsolve_series_april_28_2025.mw

3 4 5 6 7 8 9 Last Page 5 of 2415