64.3.7 problem 8

Internal problem ID [13207]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, section 2.1 (Exact differential equations and integrating factors). Exercises page 37
Problem number : 8
Date solved : Monday, March 31, 2025 at 07:37:46 AM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

\begin{align*} \frac {x}{y^{2}}+x +\left (\frac {x^{2}}{y^{3}}+y\right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.023 (sec). Leaf size: 52
ode:=x/y(x)^2+x+(x^2/y(x)^3+y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \frac {\left (-2 y^{2}-2\right ) \ln \left (y^{2}+1\right )+y^{4}+\left (x^{2}+2 c_1 +1\right ) y^{2}+2 c_1 -1}{2 y^{2}+2} = 0 \]
Mathematica. Time used: 0.272 (sec). Leaf size: 124
ode=(x/y[x]^2+x)+(x^2/y[x]^3+y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {1}{2} x^2 y(x)^3 \exp \left (\int _1^{y(x)}\frac {1-3 K[1]^2}{K[1]^3+K[1]}dK[1]\right )+\frac {1}{2} x^2 y(x) \exp \left (\int _1^{y(x)}\frac {1-3 K[1]^2}{K[1]^3+K[1]}dK[1]\right )+\int _1^{y(x)}\exp \left (\int _1^{K[2]}\frac {1-3 K[1]^2}{K[1]^3+K[1]}dK[1]\right ) K[2]^4dK[2]=c_1,y(x)\right ] \]
Sympy. Time used: 2.625 (sec). Leaf size: 44
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x + x/y(x)**2 + (x**2/y(x)**3 + y(x))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + \frac {x^{2} y^{2}{\left (x \right )}}{2 \left (y^{2}{\left (x \right )} + 1\right )} + \frac {y^{2}{\left (x \right )}}{2} - \log {\left (y^{2}{\left (x \right )} + 1 \right )} - \frac {1}{2 \left (y^{2}{\left (x \right )} + 1\right )} = 0 \]