12.6.7 problem 7

Internal problem ID [1686]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Exact equations. Section 2.5 Page 79
Problem number : 7
Date solved : Saturday, March 29, 2025 at 11:31:02 PM
CAS classification : [_exact]

\begin{align*} -2 y^{2} \sin \left (x \right )+3 y^{3}-2 x +\left (4 y \cos \left (x \right )+9 x y^{2}\right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.008 (sec). Leaf size: 636
ode:=-2*y(x)^2*sin(x)+3*y(x)^3-2*x+(4*cos(x)*y(x)+9*x*y(x)^2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} \text {Solution too large to show}\end{align*}

Mathematica. Time used: 37.586 (sec). Leaf size: 469
ode=(-2*y[x]^2*Sin[x]+3*y[x]^3-2*x)+(4*y[x]*Cos[x]+9*x*y[x]^2)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {2^{2/3} \sqrt [3]{243 x^4+243 c_1 x^2+\sqrt {-256 \cos ^6(x)+\left (-16 \cos ^3(x)+243 x^2 \left (x^2+c_1\right )\right ){}^2}-16 \cos ^3(x)}+\frac {8 \sqrt [3]{2} \cos ^2(x)}{\sqrt [3]{243 x^4+243 c_1 x^2+\sqrt {-256 \cos ^6(x)+\left (-16 \cos ^3(x)+243 x^2 \left (x^2+c_1\right )\right ){}^2}-16 \cos ^3(x)}}-4 \cos (x)}{18 x} \\ y(x)\to \frac {i 2^{2/3} \left (\sqrt {3}+i\right ) \sqrt [3]{243 x^4+243 c_1 x^2+\sqrt {-256 \cos ^6(x)+\left (-16 \cos ^3(x)+243 x^2 \left (x^2+c_1\right )\right ){}^2}-16 \cos ^3(x)}-\frac {8 i \sqrt [3]{2} \left (\sqrt {3}-i\right ) \cos ^2(x)}{\sqrt [3]{243 x^4+243 c_1 x^2+\sqrt {-256 \cos ^6(x)+\left (-16 \cos ^3(x)+243 x^2 \left (x^2+c_1\right )\right ){}^2}-16 \cos ^3(x)}}-8 \cos (x)}{36 x} \\ y(x)\to -\frac {2^{2/3} \left (1+i \sqrt {3}\right ) \sqrt [3]{243 x^4+243 c_1 x^2+\sqrt {-256 \cos ^6(x)+\left (-16 \cos ^3(x)+243 x^2 \left (x^2+c_1\right )\right ){}^2}-16 \cos ^3(x)}+\frac {8 \sqrt [3]{2} \left (1-i \sqrt {3}\right ) \cos ^2(x)}{\sqrt [3]{243 x^4+243 c_1 x^2+\sqrt {-256 \cos ^6(x)+\left (-16 \cos ^3(x)+243 x^2 \left (x^2+c_1\right )\right ){}^2}-16 \cos ^3(x)}}+8 \cos (x)}{36 x} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x + (9*x*y(x)**2 + 4*y(x)*cos(x))*Derivative(y(x), x) + 3*y(x)**3 - 2*y(x)**2*sin(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out