52.2.2 problem 2

Internal problem ID [10425]
Book : Second order enumerated odes
Section : section 2
Problem number : 2
Date solved : Tuesday, September 30, 2025 at 07:23:30 PM
CAS classification : [_Liouville, [_2nd_order, _reducible, _mu_xy]]

\begin{align*} y^{\prime \prime }+\sin \left (x \right ) y^{\prime }+y {y^{\prime }}^{2}&=0 \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 35
ode:=diff(diff(y(x),x),x)+sin(x)*diff(y(x),x)+y(x)*diff(y(x),x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -i \operatorname {RootOf}\left (i \sqrt {2}\, c_1 \int {\mathrm e}^{\cos \left (x \right )}d x +i \sqrt {2}\, c_2 -\operatorname {erf}\left (\textit {\_Z} \right ) \sqrt {\pi }\right ) \sqrt {2} \]
Mathematica. Time used: 5.176 (sec). Leaf size: 86
ode=D[y[x],{x,2}]+Sin[x]*D[y[x],x]+y[x]*(D[y[x],x])^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -i \sqrt {2} \text {erf}^{-1}\left (i \sqrt {\frac {2}{\pi }} \left (\int _1^x-\exp \left (-\int _1^{K[3]}\sin (K[1])dK[1]\right ) c_1dK[3]+c_2\right )\right )\\ y(x)&\to -i \sqrt {2} \text {erf}^{-1}\left (i \sqrt {\frac {2}{\pi }} c_2\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)*Derivative(y(x), x)**2 + sin(x)*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE (sqrt(-4*y(x)*Derivative(y(x), (x, 2)) + sin(x)**2) + sin(x))/(2*y(x)) + Derivative(y(x), x) cannot be solved by the factorable group method