3.18 problem 3(b)

Internal problem ID [6174]

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]

\[ \boxed {x y^{2} y^{\prime }+y^{3}=\cos \left (x \right ) x} \]

Solution by Maple

Time used: 0.063 (sec). Leaf size: 112

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

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

Solution by Mathematica

Time used: 0.513 (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*}