2.1.45 Problem 45

Solved as second order missing x ode
Maple
Mathematica
Sympy

Internal problem ID [9116]
Book : Second order enumerated odes
Section : section 1
Problem number : 45
Date solved : Sunday, March 30, 2025 at 02:07:32 PM
CAS classification : [[_2nd_order, _missing_x]]

Solved as second order missing x ode

Time used: 6.700 (sec)

Solve

yy2+y=0

This is missing independent variable second order ode. Solved by reduction of order by using substitution which makes the dependent variable y an independent variable. Using

y=p

Then

y=dpdx=dpdydydx=pdpdy

Hence the ode becomes

yp(y)2(ddyp(y))2+p(y)=0

Which is now solved as first order ode for p(y).

Solving for the derivative gives these ODE’s to solve

(1)p=1py(2)p=1py

Now each of the above is solved separately.

Solving Eq. (1)

To solve an ode of the form

(A)M(x,y)+N(x,y)dydx=0

We assume there exists a function ϕ(x,y)=c where c is constant, that satisfies the ode. Taking derivative of ϕ w.r.t. x gives

ddxϕ(x,y)=0

Hence

(B)ϕx+ϕydydx=0

Comparing (A,B) shows that

ϕx=Mϕy=N

But since 2ϕxy=2ϕyx then for the above to be valid, we require that

My=Nx

If the above condition is satisfied, then the original ode is called exact. We still need to determine ϕ(x,y) but at least we know now that we can do that since the condition 2ϕxy=2ϕyx is satisfied. If this condition is not satisfied then this method will not work and we have to now look for an integrating factor to force this condition, which might or might not exist. The first step is to write the ODE in standard form to check for exactness, which is

(1A)M(y,p)dy+N(y,p)dp=0

Therefore

dp=(1py)dy(2A)(1py)dy+dp=0

Comparing (1A) and (2A) shows that

M(y,p)=1pyN(y,p)=1

The next step is to determine if the ODE is is exact or not. The ODE is exact when the following condition is satisfied

Mp=Ny

Using result found above gives

Mp=p(1py)=12ppy

And

Ny=y(1)=0

Since MpNy, then the ODE is not exact. Since the ODE is not exact, we will try to find an integrating factor to make it exact. Let

A=1N(MpNy)=1((y2(py)3/2)(0))=12ppy

Since A depends on p, it can not be used to obtain an integrating factor. We will now try a second method to find an integrating factor. Let

B=1M(NyMp)=py((0)(y2(py)3/2))=12p

Since B does not depend on y, it can be used to obtain an integrating factor. Let the integrating factor be μ. Then

μ=eBdp=e12pdp

The result of integrating gives

μ=eln(p)2=p

M and N are now multiplied by this integrating factor, giving new M and new N which are called M and N so not to confuse them with the original M and N.

M=μM=p(1py)=ppy

And

N=μN=p(1)=p

So now a modified ODE is obtained from the original ODE which will be exact and can be solved using the standard method. The modified ODE is

M+Ndpdy=0(ppy)+(p)dpdy=0

The following equations are now set up to solve for the function ϕ(y,p)

(1)ϕy=M(2)ϕp=N

Integrating (2) w.r.t. p gives

ϕpdp=Ndpϕpdp=pdp(3)ϕ=2p3/23+f(y)

Where f(y) is used for the constant of integration since ϕ is a function of both y and p. Taking derivative of equation (3) w.r.t y gives

(4)ϕy=0+f(y)

But equation (1) says that ϕy=ppy. Therefore equation (4) becomes

(5)ppy=0+f(y)

Solving equation (5) for f(y) gives

f(y)=ppy

Integrating the above w.r.t y gives

f(y)dy=(ppy)dyf(y)=2pyp+c1

Where c1 is constant of integration. Substituting result found above for f(y) into equation (3) gives ϕ

ϕ=2p3/232pyp+c1

But since ϕ itself is a constant function, then let ϕ=c2 where c2 is new constant and combining c1 and c2 constants into the constant c1 gives the solution as

c1=2p3/232pyp

Solving Eq. (2)

To solve an ode of the form

(A)M(x,y)+N(x,y)dydx=0

We assume there exists a function ϕ(x,y)=c where c is constant, that satisfies the ode. Taking derivative of ϕ w.r.t. x gives

ddxϕ(x,y)=0

Hence

(B)ϕx+ϕydydx=0

Comparing (A,B) shows that

ϕx=Mϕy=N

But since 2ϕxy=2ϕyx then for the above to be valid, we require that

My=Nx

If the above condition is satisfied, then the original ode is called exact. We still need to determine ϕ(x,y) but at least we know now that we can do that since the condition 2ϕxy=2ϕyx is satisfied. If this condition is not satisfied then this method will not work and we have to now look for an integrating factor to force this condition, which might or might not exist. The first step is to write the ODE in standard form to check for exactness, which is

(1A)M(y,p)dy+N(y,p)dp=0

Therefore

dp=(1py)dy(2A)(1py)dy+dp=0

Comparing (1A) and (2A) shows that

M(y,p)=1pyN(y,p)=1

The next step is to determine if the ODE is is exact or not. The ODE is exact when the following condition is satisfied

Mp=Ny

Using result found above gives

Mp=p(1py)=12ppy

And

Ny=y(1)=0

Since MpNy, then the ODE is not exact. Since the ODE is not exact, we will try to find an integrating factor to make it exact. Let

A=1N(MpNy)=1((y2(py)3/2)(0))=12ppy

Since A depends on p, it can not be used to obtain an integrating factor. We will now try a second method to find an integrating factor. Let

B=1M(NyMp)=py((0)(y2(py)3/2))=12p

Since B does not depend on y, it can be used to obtain an integrating factor. Let the integrating factor be μ. Then

μ=eBdp=e12pdp

The result of integrating gives

μ=eln(p)2=p

M and N are now multiplied by this integrating factor, giving new M and new N which are called M and N so not to confuse them with the original M and N.

M=μM=p(1py)=ppy

And

N=μN=p(1)=p

So now a modified ODE is obtained from the original ODE which will be exact and can be solved using the standard method. The modified ODE is

M+Ndpdy=0(ppy)+(p)dpdy=0

The following equations are now set up to solve for the function ϕ(y,p)

(1)ϕy=M(2)ϕp=N

Integrating (2) w.r.t. p gives

ϕpdp=Ndpϕpdp=pdp(3)ϕ=2p3/23+f(y)

Where f(y) is used for the constant of integration since ϕ is a function of both y and p. Taking derivative of equation (3) w.r.t y gives

(4)ϕy=0+f(y)

But equation (1) says that ϕy=ppy. Therefore equation (4) becomes

(5)ppy=0+f(y)

Solving equation (5) for f(y) gives

f(y)=ppy

Integrating the above w.r.t y gives

f(y)dy=(ppy)dyf(y)=2pyp+c3

Where c3 is constant of integration. Substituting result found above for f(y) into equation (3) gives ϕ

ϕ=2p3/23+2pyp+c3

But since ϕ itself is a constant function, then let ϕ=c4 where c4 is new constant and combining c3 and c4 constants into the constant c3 gives the solution as

c3=2p3/23+2pyp

For solution (1) found earlier, since p=y then we now have a new first order ode to solve which is

2y3/232yyy=c1

Let p=y the ode becomes

2p3/232ypp=c1

Solving for y from the above results in

(1)y=12p5/2c14p49c12p36p

This has the form

(*)y=xf(p)+g(p)

Where f,g are functions of p=y(x). The above ode is dAlembert ode which is now solved.

Taking derivative of (*) w.r.t. x gives

p=f+(xf+g)dpdx(2)pf=(xf+g)dpdx

Comparing the form y=xf+g to (1A) shows that

f=0g=c1p3/23p39c124

Hence (2) becomes

(2A)p=(p23+c1p2)p(x)

The singular solution is found by setting dpdx=0 in the above which gives

p=0

Solving the above for p results in

p1=0

Substituting these in (1A) and keeping singular solution that verifies the ode gives

y=c124

The general solution is found when dpdx0. From eq. (2A). This results in

(3)p(x)=p(x)p(x)23+c1p(x)2

This ODE is now solved for p(x). No inversion is needed.

Integrating gives

2p2+3c1p6pdp=dxp26+c1p=x+c5

Substituing the above solution for p in (2A) gives

y=c1(RootOf(_Z46c1_Z+6c5+6x)2)3/23RootOf(_Z46c1_Z+6c5+6x)69c124

Will add steps showing solving for IC soon.

The solution

y=c1(RootOf(_Z46c1_Z+6c5+6x)2)3/23RootOf(_Z46c1_Z+6c5+6x)69c124

was found not to satisfy the ode or the IC. Hence it is removed.

Summary of solutions found

y=c124

Maple. Time used: 0.089 (sec). Leaf size: 255
ode:=y(x)*diff(diff(y(x),x),x)^2+diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
y=c1y=0y_a(_a3/2(c13_a))2/3d_axc2=0y_a(_a3/2(c1+3_a))2/3d_axc2=04y_a(_a3/2(c13_a))2/3d_a2i(c2+x)3+2x+2c2(1i3)2=04y_a(_a3/2(c13_a))2/3d_a+2i(c2+x)3+2x+2c2(1i3)2=04y_a(_a3/2(c1+3_a))2/3d_a2i(c2+x)3+2x+2c2(1i3)2=04y_a(_a3/2(c1+3_a))2/3d_a+2i(c2+x)3+2x+2c2(1i3)2=0

Maple trace

Methods for second order ODEs: 
   *** Sublevel 2 *** 
   Methods for second order ODEs: 
   Successful isolation of d^2y/dx^2: 2 solutions were found. Trying to solve e\ 
ach resulting ODE. 
      *** Sublevel 3 *** 
      Methods for second order ODEs: 
      --- Trying classification methods --- 
      trying 2nd order Liouville 
      trying 2nd order WeierstrassP 
      trying 2nd order JacobiSN 
      differential order: 2; trying a linearization to 3rd order 
      trying 2nd order ODE linearizable_by_differentiation 
      trying 2nd order, 2 integrating factors of the form mu(x,y) 
      trying differential order: 2; missing variables 
         -> Computing symmetries using: way = 3 
      -> Calling odsolve with the ODE, diff(_b(_a),_a)*_b(_a)-1/_a*(-_a*_b(_a)) 
^(1/2) = 0, _b(_a), HINT = [[_a, 1/3*_b]] 
         *** Sublevel 4 *** 
         symmetry methods on request 
         1st order, trying reduction of order with given symmetries: 
[_a, 1/3*_b] 
         1st order, trying the canonical coordinates of the invariance group 
            -> Calling odsolve with the ODE, diff(y(x),x) = 1/3*y(x)/x, y(x) 
               *** Sublevel 5 *** 
               Methods for first order ODEs: 
               --- Trying classification methods --- 
               trying a quadrature 
               trying 1st order linear 
               <- 1st order linear successful 
         <- 1st order, canonical coordinates successful 
      <- differential order: 2; canonical coordinates successful 
      <- differential order 2; missing variables successful 
   ------------------- 
   * Tackling next ODE. 
      *** Sublevel 3 *** 
      Methods for second order ODEs: 
      --- Trying classification methods --- 
      trying 2nd order Liouville 
      trying 2nd order WeierstrassP 
      trying 2nd order JacobiSN 
      differential order: 2; trying a linearization to 3rd order 
      trying 2nd order ODE linearizable_by_differentiation 
      trying 2nd order, 2 integrating factors of the form mu(x,y) 
      trying differential order: 2; missing variables 
         -> Computing symmetries using: way = 3 
      -> Calling odsolve with the ODE, diff(_b(_a),_a)*_b(_a)+1/_a*(-_a*_b(_a)) 
^(1/2) = 0, _b(_a), HINT = [[_a, 1/3*_b]] 
         *** Sublevel 4 *** 
         symmetry methods on request 
         1st order, trying reduction of order with given symmetries: 
[_a, 1/3*_b] 
         1st order, trying the canonical coordinates of the invariance group 
         <- 1st order, canonical coordinates successful 
      <- differential order: 2; canonical coordinates successful 
      <- differential order 2; missing variables successful 
-> Calling odsolve with the ODE, diff(y(x),x) = 0, y(x), singsol = none 
   *** Sublevel 2 *** 
   Methods for first order ODEs: 
   --- Trying classification methods --- 
   trying a quadrature 
   trying 1st order linear 
   <- 1st order linear successful
 

Mathematica. Time used: 61.031 (sec). Leaf size: 23861
ode=y[x]*D[y[x],{x,2}]^2+D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Too large to display

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)*Derivative(y(x), (x, 2))**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : solve: Cannot solve y(x)*Derivative(y(x), (x, 2))**2 + Derivative(y(x), x)