44.3.23 problem 31

Internal problem ID [7004]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 1. Introduction to differential equations. Review problems at page 34
Problem number : 31
Date solved : Wednesday, March 05, 2025 at 04:02:04 AM
CAS classification : [_separable]

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

Maple. Time used: 0.005 (sec). Leaf size: 59
ode:=x*diff(y(x),x)+y(x) = 1/y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {\left (x^{3}+c_{1} \right )^{{1}/{3}}}{x} \\ y &= -\frac {\left (x^{3}+c_{1} \right )^{{1}/{3}} \left (1+i \sqrt {3}\right )}{2 x} \\ y &= \frac {\left (x^{3}+c_{1} \right )^{{1}/{3}} \left (i \sqrt {3}-1\right )}{2 x} \\ \end{align*}
Mathematica. Time used: 0.271 (sec). Leaf size: 159
ode=x*D[y[x],x]+y[x]==1/y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {\sqrt [3]{x^3+e^{3 c_1}}}{x} \\ y(x)\to -\frac {\sqrt [3]{-1} \sqrt [3]{x^3+e^{3 c_1}}}{x} \\ y(x)\to \frac {(-1)^{2/3} \sqrt [3]{x^3+e^{3 c_1}}}{x} \\ y(x)\to 1 \\ y(x)\to -\sqrt [3]{-1} \\ y(x)\to (-1)^{2/3} \\ y(x)\to \frac {\sqrt [3]{x^3}}{x} \\ y(x)\to -\frac {\sqrt [3]{-1} \sqrt [3]{x^3}}{x} \\ y(x)\to \frac {(-1)^{2/3} \sqrt [3]{x^3}}{x} \\ \end{align*}
Sympy. Time used: 1.691 (sec). Leaf size: 58
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) + y(x) - 1/y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {\left (-1 - \sqrt {3} i\right ) \sqrt [3]{\frac {C_{1}}{x^{3}} + 1}}{2}, \ y{\left (x \right )} = \frac {\left (-1 + \sqrt {3} i\right ) \sqrt [3]{\frac {C_{1}}{x^{3}} + 1}}{2}, \ y{\left (x \right )} = \sqrt [3]{\frac {C_{1}}{x^{3}} + 1}\right ] \]