30.2.25 problem 30

Internal problem ID [7453]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.3, Linear equations. Exercises. page 54
Problem number : 30
Date solved : Tuesday, September 30, 2025 at 04:36:15 PM
CAS classification : [_rational, _Bernoulli]

\begin{align*} y^{\prime }+2 y&=\frac {x}{y^{2}} \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 72
ode:=diff(y(x),x)+2*y(x) = x/y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {\left (-18+216 \,{\mathrm e}^{-6 x} c_1 +108 x \right )^{{1}/{3}}}{6} \\ y &= -\frac {\left (1+i \sqrt {3}\right ) \left (-18+216 \,{\mathrm e}^{-6 x} c_1 +108 x \right )^{{1}/{3}}}{12} \\ y &= \frac {\left (i \sqrt {3}-1\right ) \left (-18+216 \,{\mathrm e}^{-6 x} c_1 +108 x \right )^{{1}/{3}}}{12} \\ \end{align*}
Mathematica. Time used: 0.154 (sec). Leaf size: 117
ode=D[y[x],x]+2*y[x]==x*y[x]^(-2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-2 x} \sqrt [3]{3 \int _1^xe^{6 K[1]} K[1]dK[1]+c_1}\\ y(x)&\to -\sqrt [3]{-1} e^{-2 x} \sqrt [3]{3 \int _1^xe^{6 K[1]} K[1]dK[1]+c_1}\\ y(x)&\to (-1)^{2/3} e^{-2 x} \sqrt [3]{3 \int _1^xe^{6 K[1]} K[1]dK[1]+c_1} \end{align*}
Sympy. Time used: 1.028 (sec). Leaf size: 100
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x/y(x)**2 + 2*y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {\sqrt [3]{18} \sqrt [3]{C_{1} e^{- 6 x} + 6 x - 1}}{6}, \ y{\left (x \right )} = \frac {\left (- \sqrt [3]{18} - 3 \sqrt [3]{2} \sqrt [6]{3} i\right ) \sqrt [3]{C_{1} e^{- 6 x} + 6 x - 1}}{12}, \ y{\left (x \right )} = \frac {\left (- \sqrt [3]{18} + 3 \sqrt [3]{2} \sqrt [6]{3} i\right ) \sqrt [3]{C_{1} e^{- 6 x} + 6 x - 1}}{12}\right ] \]