2.1.87 Problem 86

Solved as second order nonlinear exact ode
Solved as second order integrable as is ode (ABC method)
Maple
Mathematica
Sympy

Internal problem ID [8798]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 86
Date solved : Friday, April 25, 2025 at 05:10:15 PM
CAS classification : [[_2nd_order, _exact, _nonlinear], [_2nd_order, _with_linear_symmetries], [_2nd_order, _reducible, _mu_x_y1], [_2nd_order, _reducible, _mu_y_y1], [_2nd_order, _reducible, _mu_xy]]

Solved as second order nonlinear exact ode

Time used: 35.829 (sec)

Solve

y=1yxyy2

An exact non-linear second order ode has the form

a2(x,y,y)y+a1(x,y,y)y+a0(x,y,y)=0

Where the following conditions are satisfied

a2y=a1ya2x=a0ya1x=a0y

Looking at the the ode given we see that

a2=1a1=xy2a0=1y

Applying the conditions to the above shows this is a nonlinear exact second order ode. Therefore it can be reduced to first order ode given by

a2dy+a1dy+a0dx=c11dy+xy2dy+1ydx=c1

Which results in

yxy=c1

Which is now solved.

In canonical form, the ODE is

y=F(x,y)(1)=c1y+xy

An ode of the form y=M(x,y)N(x,y) is called homogeneous if the functions M(x,y) and N(x,y) are both homogeneous functions and of the same order. Recall that a function f(x,y) is homogeneous of order n if

f(tnx,tny)=tnf(x,y)

In this case, it can be seen that both M=c1y+x and N=y are both homogeneous and of the same order n=1. Therefore this is a homogeneous ode. Since this ode is homogeneous, it is converted to separable ODE using the substitution u=yx, or y=ux. Hence

dydx=dudxx+u

Applying the transformation y=ux to the above ODE in (1) gives

dudxx+u=c1+1ududx=c1+1u(x)u(x)x

Or

u(x)c1+1u(x)u(x)x=0

Or

u(x)u(x)x+u(x)2c1u(x)1=0

Which is now solved as separable in u(x).

The ode

(1)u(x)=u(x)2c1u(x)1u(x)x

is separable as it can be written as

u(x)=u(x)2c1u(x)1u(x)x=f(x)g(u)

Where

f(x)=1xg(u)=c1u+u21u

Integrating gives

1g(u)du=f(x)dxuc1u+u21du=1xdx
ln(u(x)2c1u(x)1)2+c1arctanh(2u(x)+c1c12+4)c12+4=ln(1x)+c2

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

c1u+u21u=0

for u(x) gives

u(x)=c12c12+42u(x)=c12+c12+42

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

ln(u(x)2c1u(x)1)2+c1arctanh(2u(x)+c1c12+4)c12+4=ln(1x)+c2u(x)=c12c12+42u(x)=c12+c12+42

Converting ln(u(x)2c1u(x)1)2+c1arctanh(2u(x)+c1c12+4)c12+4=ln(1x)+c2 back to y gives

ln(c1yx+y2x2x2)2+c1arctanh(c1x2yxc12+4)c12+4=ln(1x)+c2

Converting u(x)=c12c12+42 back to y gives

y=x(c12c12+42)

Converting u(x)=c12+c12+42 back to y gives

y=x(c12+c12+42)

Which simplifies to

ln(c1yx+y2x2x2)2+c1arctanh(c1x2yxc12+4)c12+4=ln(1x)+c2y=(c1+c12+4)x2y=(c1+c12+4)x2

Will add steps showing solving for IC soon.

Summary of solutions found

ln(c1yx+y2x2x2)2+c1arctanh(c1x2yxc12+4)c12+4=ln(1x)+c2y=(c1+c12+4)x2y=(c1+c12+4)x2

Solved as second order integrable as is ode (ABC method)

Time used: 36.862 (sec)

Solve

y=1yxyy2

Writing the ode as

y1y+xyy2=0

Integrating both sides of the ODE w.r.t x gives

(y1y+xyy2)dx=0yxy=c1

Which is now solved for y. In canonical form, the ODE is

y=F(x,y)(1)=c1y+xy

An ode of the form y=M(x,y)N(x,y) is called homogeneous if the functions M(x,y) and N(x,y) are both homogeneous functions and of the same order. Recall that a function f(x,y) is homogeneous of order n if

f(tnx,tny)=tnf(x,y)

In this case, it can be seen that both M=c1y+x and N=y are both homogeneous and of the same order n=1. Therefore this is a homogeneous ode. Since this ode is homogeneous, it is converted to separable ODE using the substitution u=yx, or y=ux. Hence

dydx=dudxx+u

Applying the transformation y=ux to the above ODE in (1) gives

dudxx+u=c1+1ududx=c1+1u(x)u(x)x

Or

u(x)c1+1u(x)u(x)x=0

Or

u(x)u(x)x+u(x)2c1u(x)1=0

Which is now solved as separable in u(x).

The ode

(2)u(x)=u(x)2c1u(x)1u(x)x

is separable as it can be written as

u(x)=u(x)2c1u(x)1u(x)x=f(x)g(u)

Where

f(x)=1xg(u)=c1u+u21u

Integrating gives

1g(u)du=f(x)dxuc1u+u21du=1xdx
ln(u(x)2c1u(x)1)2+c1arctanh(2u(x)+c1c12+4)c12+4=ln(1x)+c2

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

c1u+u21u=0

for u(x) gives

u(x)=c12c12+42u(x)=c12+c12+42

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

ln(u(x)2c1u(x)1)2+c1arctanh(2u(x)+c1c12+4)c12+4=ln(1x)+c2u(x)=c12c12+42u(x)=c12+c12+42

Converting ln(u(x)2c1u(x)1)2+c1arctanh(2u(x)+c1c12+4)c12+4=ln(1x)+c2 back to y gives

ln(c1yx+y2x2x2)2+c1arctanh(c1x2yxc12+4)c12+4=ln(1x)+c2

Converting u(x)=c12c12+42 back to y gives

y=x(c12c12+42)

Converting u(x)=c12+c12+42 back to y gives

y=x(c12+c12+42)

Which simplifies to

ln(c1yx+y2x2x2)2+c1arctanh(c1x2yxc12+4)c12+4=ln(1x)+c2y=(c1+c12+4)x2y=(c1+c12+4)x2

In canonical form, the ODE is

y=F(x,y)(1)=c1y+xy

An ode of the form y=M(x,y)N(x,y) is called homogeneous if the functions M(x,y) and N(x,y) are both homogeneous functions and of the same order. Recall that a function f(x,y) is homogeneous of order n if

f(tnx,tny)=tnf(x,y)

In this case, it can be seen that both M=c1y+x and N=y are both homogeneous and of the same order n=1. Therefore this is a homogeneous ode. Since this ode is homogeneous, it is converted to separable ODE using the substitution u=yx, or y=ux. Hence

dydx=dudxx+u

Applying the transformation y=ux to the above ODE in (1) gives

dudxx+u=c1+1ududx=c1+1u(x)u(x)x

Or

u(x)c1+1u(x)u(x)x=0

Or

u(x)u(x)x+u(x)2c1u(x)1=0

Which is now solved as separable in u(x).

The ode

(3)u(x)=u(x)2c1u(x)1u(x)x

is separable as it can be written as

u(x)=u(x)2c1u(x)1u(x)x=f(x)g(u)

Where

f(x)=1xg(u)=c1u+u21u

Integrating gives

1g(u)du=f(x)dxuc1u+u21du=1xdx
ln(u(x)2c1u(x)1)2+c1arctanh(2u(x)+c1c12+4)c12+4=ln(1x)+c2

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

c1u+u21u=0

for u(x) gives

u(x)=c12c12+42u(x)=c12+c12+42

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

ln(u(x)2c1u(x)1)2+c1arctanh(2u(x)+c1c12+4)c12+4=ln(1x)+c2u(x)=c12c12+42u(x)=c12+c12+42

Converting ln(u(x)2c1u(x)1)2+c1arctanh(2u(x)+c1c12+4)c12+4=ln(1x)+c2 back to y gives

ln(c1yx+y2x2x2)2+c1arctanh(c1x2yxc12+4)c12+4=ln(1x)+c2

Converting u(x)=c12c12+42 back to y gives

y=x(c12c12+42)

Converting u(x)=c12+c12+42 back to y gives

y=x(c12+c12+42)

Which simplifies to

ln(c1yx+y2x2x2)2+c1arctanh(c1x2yxc12+4)c12+4=ln(1x)+c2y=(c1+c12+4)x2y=(c1+c12+4)x2

Will add steps showing solving for IC soon.

Maple. Time used: 0.030 (sec). Leaf size: 56
ode:=diff(diff(y(x),x),x) = 1/y(x)-x/y(x)^2*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
y=RootOf(_Z2eRootOf(x2(4e_Zcosh(c12+4(2c2+_Z+2ln(x))2c1)2+c12+4))1+_Zc1)x

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 
-> trying 2nd order, dynamical_symmetries, fully reducible to Abel through one \ 
integrating factor of the form G(x,y)/(1+H(x,y)*y)^2 
   --- trying a change of variables {x -> y(x), y(x) -> x} and re-entering meth\ 
ods for dynamical symmetries --- 
   -> trying 2nd order, dynamical_symmetries, fully reducible to Abel through o\ 
ne integrating factor of the form G(x,y)/(1+H(x,y)*y)^2 
trying 2nd order, integrating factors of the form mu(x,y)/(y)^n, only the sing\ 
ular cases 
trying symmetries linear in x and y(x) 
trying differential order: 2; exact nonlinear 
-> Calling odsolve with the ODE, diff(_b(_a),_a) = -(_C1*_b(_a)-_a)/_b(_a), _b( 
_a) 
   *** Sublevel 2 *** 
   Methods for first order ODEs: 
   --- Trying classification methods --- 
   trying a quadrature 
   trying 1st order linear 
   trying Bernoulli 
   trying separable 
   trying inverse linear 
   trying homogeneous types: 
   trying homogeneous D 
   <- homogeneous successful 
<- differential order: 2; exact nonlinear successful
 

Mathematica. Time used: 0.2 (sec). Leaf size: 77
ode=D[y[x],{x,2}]==1/y[x]-x/y[x]^2*D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
Solve[12log(y(x)2x2c1y(x)x+1)c1arctan(2y(x)x+c14c12)4c12=log(x)+c2,y(x)]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x)/y(x)**2 + Derivative(y(x), (x, 2)) - 1/y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (-y(x)*Derivative(y(x), (x, 2)) + 1)*y(x)/x cannot be solved by the factorable group method