64.2.9 problem 6(a)

Internal problem ID [13198]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 1, section 1.3. Exercises page 22
Problem number : 6(a)
Date solved : Monday, March 31, 2025 at 07:36:54 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=x^{2} \sin \left (y\right ) \end{align*}

With initial conditions

\begin{align*} y \left (1\right )&=-2 \end{align*}

Maple. Time used: 0.842 (sec). Leaf size: 83
ode:=diff(y(x),x) = x^2*sin(y(x)); 
ic:=y(1) = -2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \arctan \left (\frac {\sin \left (2\right )}{\cos \left (2\right ) \sinh \left (\frac {x^{3}}{3}-\frac {1}{3}\right )-\cosh \left (\frac {x^{3}}{3}-\frac {1}{3}\right )}, \frac {\left (-\cos \left (2\right )+1\right ) {\mathrm e}^{\frac {2 \left (x -1\right ) \left (x^{2}+x +1\right )}{3}}-\cos \left (2\right )-1}{\left (-1+\cos \left (2\right )\right ) {\mathrm e}^{\frac {2 \left (x -1\right ) \left (x^{2}+x +1\right )}{3}}-\cos \left (2\right )-1}\right ) \]
Mathematica. Time used: 0.42 (sec). Leaf size: 23
ode=D[y[x],x]==x^2*Sin[y[x]]; 
ic={y[1]==-2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\arccos \left (\tanh \left (\text {arctanh}(\cos (2))-\frac {x^3}{3}+\frac {1}{3}\right )\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*sin(y(x)) + Derivative(y(x), x),0) 
ics = {y(1): -2} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out