58.3.14 problem 15

Internal problem ID [14566]
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 : 15
Date solved : Thursday, October 02, 2025 at 09:42:10 AM
CAS classification : [_exact, _rational, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

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

With initial conditions

\begin{align*} y \left (-1\right )&=2 \\ \end{align*}
Maple. Time used: 0.060 (sec). Leaf size: 21
ode:=(3-y(x))/x^2+(y(x)^2-2*x)/x/y(x)^2*diff(y(x),x) = 0; 
ic:=[y(-1) = 2]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = x +\frac {3}{2}+\frac {\sqrt {4 x^{2}+4 x +9}}{2} \]
Mathematica. Time used: 0.624 (sec). Leaf size: 28
ode=(3-y[x])/x^2+( (y[x]^2-2*x)/(x*y[x]^2) )*D[y[x],x]==0; 
ic={y[-1]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{2} \left (\sqrt {4 x^2+4 x+9}+2 x+3\right ) \end{align*}
Sympy. Time used: 0.835 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-2*x + y(x)**2)*Derivative(y(x), x)/(x*y(x)**2) + (3 - y(x))/x**2,0) 
ics = {y(-1): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x + \frac {\sqrt {4 x^{2} + 4 x + 9}}{2} + \frac {3}{2} \]