salim-barzani

1640 Reputation

9 Badges

1 years, 74 days

MaplePrimes Activity


These are questions asked by salim-barzani

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

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

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

First 7 8 9 10 11 12 13 Last Page 9 of 35