36.2.25 problem 30

Internal problem ID [6318]
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 : Wednesday, March 05, 2025 at 12:34:41 AM
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 \left (x \right ) &= \frac {\left (-18+216 \,{\mathrm e}^{-6 x} c_{1} +108 x \right )^{{1}/{3}}}{6} \\ y \left (x \right ) &= -\frac {\left (-18+216 \,{\mathrm e}^{-6 x} c_{1} +108 x \right )^{{1}/{3}} \left (1+i \sqrt {3}\right )}{12} \\ y \left (x \right ) &= \frac {\left (-18+216 \,{\mathrm e}^{-6 x} c_{1} +108 x \right )^{{1}/{3}} \left (i \sqrt {3}-1\right )}{12} \\ \end{align*}
Mathematica. Time used: 6.74 (sec). Leaf size: 99
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 -\frac {\sqrt [3]{-\frac {1}{3}} \sqrt [3]{6 x+12 c_1 e^{-6 x}-1}}{2^{2/3}} \\ y(x)\to \frac {\sqrt [3]{2 x+4 c_1 e^{-6 x}-\frac {1}{3}}}{2^{2/3}} \\ y(x)\to \left (-\frac {1}{2}\right )^{2/3} \sqrt [3]{2 x+4 c_1 e^{-6 x}-\frac {1}{3}} \\ \end{align*}
Sympy. Time used: 1.489 (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 ] \]