75.12.8 problem 282

Internal problem ID [16803]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 12. Miscellaneous problems. Exercises page 93
Problem number : 282
Date solved : Monday, March 31, 2025 at 03:21:49 PM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 20
ode:=2*x*y(x)*exp(x^2)-x*sin(x)+exp(x^2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\sin \left (x \right )-x \cos \left (x \right )+c_1 \right ) {\mathrm e}^{-x^{2}} \]
Mathematica. Time used: 0.09 (sec). Leaf size: 29
ode=(2*x*y[x]*Exp[x^2]-x*Sin[x])+Exp[x^2]*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-x^2} \left (\int _1^xK[1] \sin (K[1])dK[1]+c_1\right ) \]
Sympy. Time used: 20.499 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*y(x)*exp(x**2) - x*sin(x) + exp(x**2)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} - x \cos {\left (x \right )} + \sin {\left (x \right )}\right ) e^{- x^{2}} \]