69.6.37 problem 170

Internal problem ID [18080]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 6. Linear equations of the first order. The Bernoulli equation. Exercises page 54
Problem number : 170
Date solved : Sunday, October 12, 2025 at 05:33:52 AM
CAS classification : [`y=_G(x,y')`]

\begin{align*} y^{\prime }+x \sin \left (2 y\right )&=2 x \,{\mathrm e}^{-x^{2}} \cos \left (y\right )^{2} \end{align*}
Maple. Time used: 0.016 (sec). Leaf size: 19
ode:=diff(y(x),x)+x*sin(2*y(x)) = 2*x*exp(-x^2)*cos(y(x))^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \arctan \left (\left (x^{2}+2 c_1 \right ) {\mathrm e}^{-x^{2}}\right ) \]
Mathematica. Time used: 8.763 (sec). Leaf size: 70
ode=D[y[x],x]+x*Sin[2*y[x]]==2*x*Exp[-x^2]*Cos[y[x]]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \arctan \left (e^{-x^2} \left (x^2+c_1\right )\right )\\ y(x)&\to -\frac {1}{2} \pi e^{x^2} \sqrt {e^{-2 x^2}}\\ y(x)&\to \frac {1}{2} \pi e^{x^2} \sqrt {e^{-2 x^2}} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*sin(2*y(x)) - 2*x*exp(-x**2)*cos(y(x))**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -x*(-exp(x**2)*sin(2*y(x)) + cos(2*y(x)) + 1)*exp(-x**2) + Derivative(y(x), x) cannot be solved by the factorable group method