64.6.24 problem 24

Internal problem ID [13303]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, Miscellaneous Review. Exercises page 60
Problem number : 24
Date solved : Monday, March 31, 2025 at 07:47:43 AM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

\begin{align*} x^{2} y^{\prime }+x y&=\frac {y^{3}}{x} \end{align*}

With initial conditions

\begin{align*} y \left (1\right )&=1 \end{align*}

Maple. Time used: 0.092 (sec). Leaf size: 16
ode:=x^2*diff(y(x),x)+x*y(x) = y(x)^3/x; 
ic:=y(1) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {2 x}{\sqrt {2 x^{4}+2}} \]
Mathematica. Time used: 0.529 (sec). Leaf size: 21
ode=x^2*D[y[x],x]+x*y[x]==y[x]^3/x; 
ic={y[1]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {\sqrt {2} x}{\sqrt {x^4+1}} \]
Sympy. Time used: 0.918 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), x) + x*y(x) - y(x)**3/x,0) 
ics = {y(1): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \sqrt {2} x \sqrt {\frac {1}{x^{4} + 1}} \]