2.1.23 Problem 24

Maple
Mathematica
Sympy

Internal problem ID [8735]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 24
Date solved : Sunday, March 30, 2025 at 01:29:11 PM
CAS classification : [_separable]

Solve

y=xy+x2y2

Solving for the derivative gives these ODE’s to solve

(1)y=12+1+4y2x(2)y=121+4y2x

Now each of the above is solved separately.

Solving Eq. (1)

The ode

(1)y=1+1+4y2x

is separable as it can be written as

y=1+1+4y2x=f(x)g(y)

Where

f(x)=1xg(y)=12+1+4y2

Integrating gives

1g(y)dy=f(x)dx112+1+4y2dy=1xdx
1+4y+ln(1+1+4y)=ln(x)+c1

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

12+1+4y2=0

for y gives

y=0

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+4y+ln(1+1+4y)=ln(x)+c1y=0

Solving Eq. (2)

The ode

(2)y=1+1+4y2x

is separable as it can be written as

y=1+1+4y2x=f(x)g(y)

Where

f(x)=1xg(y)=1+4y212

Integrating gives

1g(y)dy=f(x)dx11+4y212dy=1xdx
1+4y+ln(1+1+4y)=ln(x)+c2
Maple. Time used: 0.798 (sec). Leaf size: 97
ode:=y(x) = diff(y(x),x)*x+x^2*diff(y(x),x)^2; 
dsolve(ode,y(x), singsol=all);
 
ln(x)1+4yln(1+4y1)2+ln(1+1+4y)2ln(y)2c1=0ln(x)+1+4y+ln(1+4y1)2ln(1+1+4y)2ln(y)2c1=0

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 
trying dAlembert 
trying simple symmetries for implicit equations 
<- symmetries for implicit equations successful
 

Maple step by step

Let’s solvey(x)=x(ddxy(x))+x2(ddxy(x))2Highest derivative means the order of the ODE is1ddxy(x)Solve for the highest derivative[ddxy(x)=121+4y(x)2x,ddxy(x)=12+1+4y(x)2x]Solve the equationddxy(x)=121+4y(x)2xSeparate variablesddxy(x)121+4y(x)2=1xIntegrate both sides with respect toxddxy(x)121+4y(x)2dx=1xdx+_C1Evaluate integralln(y(x))21+4y(x)ln(1+1+4y(x))2+ln(1+1+4y(x))2=ln(x)+_C1Solve the equationddxy(x)=12+1+4y(x)2xSeparate variablesddxy(x)12+1+4y(x)2=1xIntegrate both sides with respect toxddxy(x)12+1+4y(x)2dx=1xdx+_C1Evaluate integralln(y(x))2+1+4y(x)+ln(1+1+4y(x))2ln(1+1+4y(x))2=ln(x)+_C1Set of solutions{ln(y(x))21+4y(x)ln(1+1+4y(x))2+ln(1+1+4y(x))2=ln(x)+C1,ln(y(x))2+1+4y(x)+ln(1+1+4y(x))2ln(1+1+4y(x))2=ln(x)+C1}
Mathematica. Time used: 19.224 (sec). Leaf size: 72
ode=y[x]==x*D[y[x],x]+x^2*(D[y[x],x])^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)14W(e12c1x)(2+W(e12c1x))y(x)14W(e1+2c1x)(2+W(e1+2c1x))y(x)0
Sympy. Time used: 0.706 (sec). Leaf size: 65
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*Derivative(y(x), x)**2 - x*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
[4y(x)+12+log(x)2log(4y(x)+1+1)2=C1, 4y(x)+12+log(x)2log(4y(x)+11)2=C1]