2.1.23 Problem 23

Solved as second order missing x ode
Maple
Mathematica
Sympy

Internal problem ID [9094]
Book : Second order enumerated odes
Section : section 1
Problem number : 23
Date solved : Sunday, March 30, 2025 at 02:06:52 PM
CAS classification : [[_2nd_order, _missing_x]]

Solved as second order missing x ode

Time used: 1.880 (sec)

Solve

y+y2+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

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

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

In canonical form, the ODE is

p=F(y,p)=p2+yp

This is a Bernoulli ODE.

(1)p=(1)p+(y)1p

The standard Bernoulli ODE has the form

(2)p=f0(y)p+f1(y)pn

Comparing this to (1) shows that

f0=1f1=y

The first step is to divide the above equation by pn which gives

(3)ppn=f0(y)p1n+f1(y)

The next step is use the substitution v=p1n in equation (3) which generates a new ODE in v(y) which will be linear and can be easily solved using an integrating factor. Backsubstitution then gives the solution p(y) which is what we want.

This method is now applied to the ODE at hand. Comparing the ODE (1) With (2) Shows that

f0(y)=1f1(y)=yn=1

Dividing both sides of ODE (1) by pn=1p gives

(4)pp=p2y

Let

v=p1n(5)=p2

Taking derivative of equation (5) w.r.t y gives

(6)v=2pp

Substituting equations (5) and (6) into equation (4) gives

v(y)2=v(y)y(7)v=2v2y

The above now is a linear ODE in v(y) which is now solved.

In canonical form a linear first order is

v(y)+q(y)v(y)=p(y)

Comparing the above to the given ode shows that

q(y)=2p(y)=2y

The integrating factor μ is

μ=eqdy=e2dy=e2y

The ode becomes

ddy(μv)=μpddy(μv)=(μ)(2y)ddy(ve2y)=(e2y)(2y)d(ve2y)=(2ye2y)dy

Integrating gives

ve2y=2ye2ydy=(2y1)e2y2+c1

Dividing throughout by the integrating factor e2y gives the final solution

v(y)=y+12+e2yc1

The substitution v=p1n is now used to convert the above solution back to p which results in

p2=y+12+e2yc1

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

y2=y+12+e2yc1

Let p=y the ode becomes

p2=y+12+e2yc1

Solving for y from the above results in

(1)y=LambertW(2c1e2p21)2p2+12

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=LambertW(2c1e2p21)2p2+12

Hence (2) becomes

(2A)p=(2pLambertW(2c1e2p21)1+LambertW(2c1e2p21)2p)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=LambertW(2c1e1)2+12

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

(3)p(x)=p(x)2p(x)LambertW(2c1e2p(x)21)1+LambertW(2c1e2p(x)21)2p(x)

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

Unable to integrate (or intergal too complicated), and since no initial conditions are given, then the result can be written as

p(x)112LambertW(2c1e2τ21)2dτ=x+c2

Singular solutions are found by solving

12LambertW(2c1e2p21)2=0

for p(x). This is because we had to divide by this in the above step. This gives the following singular solution(s), which also have to satisfy the given ODE.

p(x)=2ln(12c1)2p(x)=2ln(12c1)2

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

y=LambertW(2c1e2RootOf(_Z21+LambertW(2c1e2τ21)dτ+x+c2)21)2RootOf(_Z21+LambertW(2c1e2τ21)dτ+x+c2)2+12y=LambertW(2c1eln(12c1)1)2ln(12c1)2+12y=LambertW(2c1eln(12c1)1)2ln(12c1)2+12

Will add steps showing solving for IC soon.

The solution

y=LambertW(2c1e1)2+12

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

y=LambertW(2c1eln(12c1)1)2ln(12c1)2+12

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

Summary of solutions found

y=LambertW(2c1e2RootOf(_Z21+LambertW(2c1e2τ21)dτ+x+c2)21)2RootOf(_Z21+LambertW(2c1e2τ21)dτ+x+c2)2+12

Maple. Time used: 0.021 (sec). Leaf size: 61
ode:=diff(diff(y(x),x),x)+diff(y(x),x)^2+y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
2y12+4e2_ac14_ad_axc2=02y12+4e2_ac14_ad_axc2=0

Maple trace

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 
   -> Computing symmetries using: way = exp_sym 
-> Calling odsolve with the ODE, diff(_b(_a),_a)*_b(_a)+_b(_a)^2+_a = 0, _b(_a) 
   *** Sublevel 2 *** 
   Methods for first order ODEs: 
   --- Trying classification methods --- 
   trying a quadrature 
   trying 1st order linear 
   trying Bernoulli 
   <- Bernoulli successful 
<- differential order: 2; canonical coordinates successful 
<- differential order 2; missing variables successful
 

Mathematica. Time used: 0.823 (sec). Leaf size: 272
ode=D[y[x],{x,2}]+(D[y[x],x])^2+y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)InverseFunction[1#122e2K[1]c12K[1]+1dK[1]&][x+c2]y(x)InverseFunction[1#122e2K[2]c12K[2]+1dK[2]&][x+c2]y(x)InverseFunction[1#122e2K[1](c1)2K[1]+1dK[1]&][x+c2]y(x)InverseFunction[1#122e2K[1]c12K[1]+1dK[1]&][x+c2]y(x)InverseFunction[1#122e2K[2](c1)2K[2]+1dK[2]&][x+c2]y(x)InverseFunction[1#122e2K[2]c12K[2]+1dK[2]&][x+c2]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) + Derivative(y(x), x)**2 + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -sqrt(-y(x) - Derivative(y(x), (x, 2))) + Derivative(y(x), x) cannot be solved by the factorable group method