2.1.1 Problem 1

Solved using first_order_ode_parametric method
Solved using first_order_ode_dAlembert
Maple
Mathematica
Sympy

Internal problem ID [4087]
Book : Applied Differential equations, Newby Curle. Van Nostrand Reinhold. 1972
Section : Examples, page 35
Problem number : 1
Date solved : Friday, April 25, 2025 at 08:58:33 AM
CAS classification : [_quadrature]

Solved using first_order_ode_parametric method

Time used: 0.096 (sec)

Solve

y=y+y22

Let y be a parameter λ. The ode becomes

yλ12λ2=0

Isolating y gives

y=λ+12λ2=λ+12λ2=F(x,λ)

Now we generate an ode in x(λ) using

ddλx(λ)=FλλFx=1+λλ=1+λλ

Which is now solved for x.

Since the ode has the form x=f(λ), then we only need to integrate f(λ).

dx=1+λλdλx=λ+ln(λ)+c1

Now that we found solution x we have two equations with parameter λ. They are

y=λ+12λ2x=λ+ln(λ)+c1

Eliminating λ gives the solution for y. Solving for y(x) gives

y(x)=LambertW(exc1)22+LambertW(exc1)

Which simplifies to

y(x)=LambertW(exc1)(LambertW(exc1)+2)2

Summary of solutions found

y(x)=LambertW(exc1)(LambertW(exc1)+2)2
Solved using first_order_ode_dAlembert

Time used: 0.113 (sec)

Solve

y(x)=ddxy(x)+(ddxy(x))22

Let p=ddxy(x) the ode becomes

y=p+12p2

Solving for y(x) from the above results in

(1)y(x)=p+12p2

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(x)=xf+g to (1A) shows that

f=0g=p+12p2

Hence (2) becomes

(2A)p=(1+p)(ddxp(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(x)=0

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

(3)ddxp(x)=p(x)1+p(x)

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

Integrating gives

1+ppdp=dxp+ln(p)=x+c2

Singular solutions are found by solving

p1+p=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)=0

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

y(x)=eLambertW(ex+c2)+x+c2+e2LambertW(ex+c2)+2x+2c22y(x)=0

Which simplifies to

y(x)=0y(x)=LambertW(ex+c2)(2+LambertW(ex+c2))2

Summary of solutions found

y(x)=0y(x)=LambertW(ex+c2)(2+LambertW(ex+c2))2
Maple. Time used: 0.071 (sec). Leaf size: 106
ode:=y(x) = diff(y(x),x)+1/2*diff(y(x),x)^2; 
dsolve(ode,y(x), singsol=all);
 
y=LambertW(2e1+xc1)(LambertW(2e1+xc1)+2)2y=e2RootOf(_Z2x+2e_Z2+2c1ln(2)+ln(e_Z(e_Z2)2))2eRootOf(_Z2x+2e_Z2+2c1ln(2)+ln(e_Z(e_Z2)2))

Maple trace

Methods for first order ODEs: 
-> Solving 1st order ODE of high degree, 1st attempt 
trying 1st order WeierstrassP solution for high degree ODE 
trying 1st order WeierstrassPPrime solution for high degree ODE 
trying 1st order JacobiSN solution for high degree ODE 
trying 1st order ODE linearizable_by_differentiation 
trying differential order: 1; missing variables 
<- differential order: 1; missing  x  successful
 

Maple step by step

Let’s solvey(x)=ddxy(x)+(ddxy(x))22Highest derivative means the order of the ODE is1ddxy(x)Solve for the highest derivative[ddxy(x)=11+2y(x),ddxy(x)=1+1+2y(x)]Solve the equationddxy(x)=11+2y(x)Separate variablesddxy(x)11+2y(x)=1Integrate both sides with respect toxddxy(x)11+2y(x)dx=1dx+_C1Evaluate integralln(y(x))21+2y(x)ln(1+1+2y(x))2+ln(1+1+2y(x))2=x+_C1Solve the equationddxy(x)=1+1+2y(x)Separate variablesddxy(x)1+1+2y(x)=1Integrate both sides with respect toxddxy(x)1+1+2y(x)dx=1dx+_C1Evaluate integralln(y(x))2+1+2y(x)+ln(1+1+2y(x))2ln(1+1+2y(x))2=x+_C1Set of solutions{ln(y(x))21+2y(x)ln(1+1+2y(x))2+ln(1+1+2y(x))2=x+C1,ln(y(x))2+1+2y(x)+ln(1+1+2y(x))2ln(1+1+2y(x))2=x+C1}
Mathematica. Time used: 15.127 (sec). Leaf size: 66
ode=y[x]==D[y[x],x]+1/2*(D[y[x],x])^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)12W(ex1c1)(2+W(ex1c1))y(x)12W(ex1+c1)(2+W(ex1+c1))y(x)0
Sympy. Time used: 0.639 (sec). Leaf size: 51
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)
 
[x+2y(x)+1log(2y(x)+1+1)=C1, x2y(x)+1log(2y(x)+11)=C1]