2.1.29 Problem 30

Solved using first_order_ode_dAlembert
Maple
Mathematica
Sympy

Internal problem ID [8741]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 30
Date solved : Sunday, March 30, 2025 at 01:29:19 PM
CAS classification : [[_homogeneous, `class C`], _rational, _dAlembert]

Solved using first_order_ode_dAlembert

Time used: 0.119 (sec)

Solve

y=xy2+y2

Let p=y the ode becomes

y=xp2+p2

Solving for y from the above results in

(1)y=xp2+p2

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=p2g=p2

Hence (2) becomes

(2A)p2+p=(2xp+2p)p(x)

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

p2+p=0

Solving the above for p results in

p1=0p2=1

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

y=0y=x+1

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

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

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

The ode

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

is separable as it can be written as

p(x)=p(x)12(x+1)=f(x)g(p)

Where

f(x)=1x+1g(p)=p2+12

Integrating gives

1g(p)dp=f(x)dx1p2+12dp=1x+1dx
2ln(p(x)1)=ln(x+1)+c1

Taking the exponential of both sides the solution becomes

1(p(x)1)2=c1(x+1)

We now need to find the singular solutions, these are found by finding for what values g(p) is zero, since we had to divide by this above. Solving g(p)=0 or

p2+12=0

for p(x) gives

p(x)=1

Now we go over each such singular solution and check if it verifies the ode itself and any initial conditions given. If it does not then the singular solution will not be used.

Therefore the solutions found are

1(p(x)1)2=c1(x+1)p(x)=1

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

y=x(c1x+c1+1)2c1x+c1+(c1x+c1+1)2c1x+c1y=x+1

Which simplifies to

y=0y=x+1y=(c1(x+1)+1)2c1

Summary of solutions found

y=0y=x+1y=(c1(x+1)+1)2c1
Maple. Time used: 0.035 (sec). Leaf size: 53
ode:=y(x) = x*diff(y(x),x)^2+diff(y(x),x)^2; 
dsolve(ode,y(x), singsol=all);
 
y=0y=(x+1+(x+1)(1+c1))2x+1y=(x1+(x+1)(1+c1))2x+1

Maple trace

Methods for first order ODEs: 
   *** Sublevel 2 *** 
   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 
   trying dAlembert 
   <- dAlembert successful
 

Maple step by step

Let’s solvey(x)=x(ddxy(x))2+(ddxy(x))2Highest derivative means the order of the ODE is1ddxy(x)Solve for the highest derivative[ddxy(x)=(x+1)y(x)x+1,ddxy(x)=(x+1)y(x)x+1]Solve the equationddxy(x)=(x+1)y(x)x+1Solve the equationddxy(x)=(x+1)y(x)x+1Set of solutions{workingODE,workingODE}
Mathematica. Time used: 0.066 (sec). Leaf size: 57
ode=y[x]==x*(D[y[x],x])^2+(D[y[x],x])^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)xc1x+1+1+c124y(x)x+c1x+1+1+c124y(x)0
Sympy. Time used: 0.921 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*Derivative(y(x), x)**2 + y(x) - Derivative(y(x), x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
y(x)=C124C1x+1+x+1