60.2.246 problem 822

Internal problem ID [10820]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, Additional non-linear first order
Problem number : 822
Date solved : Sunday, March 30, 2025 at 07:09:04 PM
CAS classification : [[_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]

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

Maple. Time used: 0.003 (sec). Leaf size: 27
ode:=diff(y(x),x) = 1/4*(4*exp(-x^2)-4*x^2*exp(-x^2)+4*y(x)^2-4*x^2*exp(-x^2)*y(x)+x^4*exp(-x^2)^2)*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{2} {\mathrm e}^{-x^{2}}}{2}-\frac {2}{x^{2}-2 c_1} \]
Mathematica. Time used: 0.486 (sec). Leaf size: 50
ode=D[y[x],x] == (x*(4/E^x^2 - (4*x^2)/E^x^2 + x^4/E^(2*x^2) - (4*x^2*y[x])/E^x^2 + 4*y[x]^2))/4; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{2} e^{-x^2} x^2+\frac {1}{-\frac {x^2}{2}+c_1} \\ y(x)\to \frac {1}{2} e^{-x^2} x^2 \\ \end{align*}
Sympy. Time used: 1.563 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*(x**4*exp(-2*x**2) - 4*x**2*y(x)*exp(-x**2) - 4*x**2*exp(-x**2) + 4*y(x)**2 + 4*exp(-x**2))/4 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\left (C_{1} x^{2} + \frac {x^{4}}{2} - 2 e^{x^{2}}\right ) e^{- x^{2}}}{2 C_{1} + x^{2}} \]