3.18 problem 3(b)

Internal problem ID [5421]

Book: Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section: Chapter 1. What is a differential equation. Section 1.4 First Order Linear Equations. Page 15
Problem number: 3(b).
ODE order: 1.
ODE degree: 1.

CAS Maple gives this as type [_Bernoulli]

Solve \begin {gather*} \boxed {x y^{2} y^{\prime }+y^{3}-x \cos \relax (x )=0} \end {gather*}

Solution by Maple

Time used: 0.125 (sec). Leaf size: 175

dsolve(x*y(x)^2*diff(y(x),x)+y(x)^3=x*cos(x),y(x), singsol=all)
 

\begin{align*} y \relax (x ) = \frac {\left (3 \sin \relax (x ) x^{3}+9 \cos \relax (x ) x^{2}-18 \cos \relax (x )-18 x \sin \relax (x )+c_{1}\right )^{\frac {1}{3}}}{x} \\ y \relax (x ) = \frac {-\frac {\left (3 \sin \relax (x ) x^{3}+9 \cos \relax (x ) x^{2}-18 \cos \relax (x )-18 x \sin \relax (x )+c_{1}\right )^{\frac {1}{3}}}{2}-\frac {i \sqrt {3}\, \left (3 \sin \relax (x ) x^{3}+9 \cos \relax (x ) x^{2}-18 \cos \relax (x )-18 x \sin \relax (x )+c_{1}\right )^{\frac {1}{3}}}{2}}{x} \\ y \relax (x ) = \frac {-\frac {\left (3 \sin \relax (x ) x^{3}+9 \cos \relax (x ) x^{2}-18 \cos \relax (x )-18 x \sin \relax (x )+c_{1}\right )^{\frac {1}{3}}}{2}+\frac {i \sqrt {3}\, \left (3 \sin \relax (x ) x^{3}+9 \cos \relax (x ) x^{2}-18 \cos \relax (x )-18 x \sin \relax (x )+c_{1}\right )^{\frac {1}{3}}}{2}}{x} \\ \end{align*}

Solution by Mathematica

Time used: 0.762 (sec). Leaf size: 114

DSolve[x*y[x]^2*y'[x]+y[x]^3==x*Cos[x],y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to \frac {\sqrt [3]{3 x \left (x^2-6\right ) \sin (x)+9 \left (x^2-2\right ) \cos (x)+c_1}}{x} \\ y(x)\to -\frac {\sqrt [3]{-1} \sqrt [3]{3 x \left (x^2-6\right ) \sin (x)+9 \left (x^2-2\right ) \cos (x)+c_1}}{x} \\ y(x)\to \frac {(-1)^{2/3} \sqrt [3]{3 x \left (x^2-6\right ) \sin (x)+9 \left (x^2-2\right ) \cos (x)+c_1}}{x} \\ \end{align*}