60.1.344 problem 351

Internal problem ID [10358]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 351
Date solved : Friday, March 14, 2025 at 02:10:54 AM
CAS classification : [`y=_G(x,y')`]

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

Maple. Time used: 0.073 (sec). Leaf size: 55
ode:=diff(y(x),x)*cos(y(x))+x*sin(y(x))*cos(y(x))^2-sin(y(x))^3 = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \arcsin \left (\frac {1}{\sqrt {1-\sqrt {\pi }\, {\mathrm e}^{x^{2}} \operatorname {erf}\left (x \right )-2 \,{\mathrm e}^{x^{2}} c_{1}}}\right ) \\ y &= -\arcsin \left (\frac {1}{\sqrt {1-\sqrt {\pi }\, {\mathrm e}^{x^{2}} \operatorname {erf}\left (x \right )-2 \,{\mathrm e}^{x^{2}} c_{1}}}\right ) \\ \end{align*}
Mathematica. Time used: 7.843 (sec). Leaf size: 66
ode=x*Cos[y[x]]^2*Sin[y[x]] - Sin[y[x]]^3 + Cos[y[x]]*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\cot ^{-1}\left (\sqrt {e^{x^2} \left (-\sqrt {\pi } \text {erf}(x)+4 c_1\right )}\right ) \\ y(x)\to \cot ^{-1}\left (\sqrt {e^{x^2} \left (-\sqrt {\pi } \text {erf}(x)+4 c_1\right )}\right ) \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 32.950 (sec). Leaf size: 269
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*sin(y(x))*cos(y(x))**2 - sin(y(x))**3 + cos(y(x))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - 2 \operatorname {atan}{\left (\sqrt {4 C_{1} e^{x^{2}} - \sqrt {\left (4 C_{1} e^{x^{2}} - 2 \sqrt {\pi } e^{x^{2}} \operatorname {erf}{\left (x \right )} + 1\right )^{2} - 1} - 2 \sqrt {\pi } e^{x^{2}} \operatorname {erf}{\left (x \right )} + 1} \right )}, \ y{\left (x \right )} = 2 \operatorname {atan}{\left (\sqrt {4 C_{1} e^{x^{2}} - \sqrt {\left (4 C_{1} e^{x^{2}} - 2 \sqrt {\pi } e^{x^{2}} \operatorname {erf}{\left (x \right )} + 1\right )^{2} - 1} - 2 \sqrt {\pi } e^{x^{2}} \operatorname {erf}{\left (x \right )} + 1} \right )}, \ y{\left (x \right )} = - 2 \operatorname {atan}{\left (\sqrt {4 C_{1} e^{x^{2}} + \sqrt {\left (4 C_{1} e^{x^{2}} - 2 \sqrt {\pi } e^{x^{2}} \operatorname {erf}{\left (x \right )} + 1\right )^{2} - 1} - 2 \sqrt {\pi } e^{x^{2}} \operatorname {erf}{\left (x \right )} + 1} \right )}, \ y{\left (x \right )} = 2 \operatorname {atan}{\left (\sqrt {4 C_{1} e^{x^{2}} + \sqrt {\left (4 C_{1} e^{x^{2}} - 2 \sqrt {\pi } e^{x^{2}} \operatorname {erf}{\left (x \right )} + 1\right )^{2} - 1} - 2 \sqrt {\pi } e^{x^{2}} \operatorname {erf}{\left (x \right )} + 1} \right )}\right ] \]