28.1.25 problem 25

Internal problem ID [4331]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 25
Date solved : Sunday, March 30, 2025 at 03:01:43 AM
CAS classification : [_exact]

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

Maple. Time used: 0.009 (sec). Leaf size: 630
ode:=2*x*(3*x+y(x)-y(x)*exp(-x^2))+(x^2+3*y(x)^2+exp(-x^2))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} \text {Solution too large to show}\end{align*}

Mathematica. Time used: 27.567 (sec). Leaf size: 416
ode=(2*x*(3*x+y[x]-y[x]*Exp[-x^2]))+(x^2+3*y[x]^2+Exp[-x^2])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {-6 \sqrt [3]{2} \left (x^2+e^{-x^2}\right )+2^{2/3} \left (-54 x^3+\sqrt {108 \left (x^2+e^{-x^2}\right )^3+729 \left (-2 x^3+c_1\right ){}^2}+27 c_1\right ){}^{2/3}}{6 \sqrt [3]{-54 x^3+\sqrt {108 \left (x^2+e^{-x^2}\right )^3+729 \left (-2 x^3+c_1\right ){}^2}+27 c_1}} \\ y(x)\to \frac {\left (1+i \sqrt {3}\right ) \left (x^2+e^{-x^2}\right )}{2^{2/3} \sqrt [3]{-54 x^3+\sqrt {108 \left (x^2+e^{-x^2}\right )^3+729 \left (-2 x^3+c_1\right ){}^2}+27 c_1}}+\frac {\left (-1+i \sqrt {3}\right ) \sqrt [3]{-54 x^3+\sqrt {108 \left (x^2+e^{-x^2}\right )^3+729 \left (-2 x^3+c_1\right ){}^2}+27 c_1}}{6 \sqrt [3]{2}} \\ y(x)\to \frac {\left (1-i \sqrt {3}\right ) \left (x^2+e^{-x^2}\right )}{2^{2/3} \sqrt [3]{-54 x^3+\sqrt {108 \left (x^2+e^{-x^2}\right )^3+729 \left (-2 x^3+c_1\right ){}^2}+27 c_1}}-\frac {\left (1+i \sqrt {3}\right ) \sqrt [3]{-54 x^3+\sqrt {108 \left (x^2+e^{-x^2}\right )^3+729 \left (-2 x^3+c_1\right ){}^2}+27 c_1}}{6 \sqrt [3]{2}} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*(3*x + y(x) - y(x)*exp(-x**2)) + (x**2 + 3*y(x)**2 + exp(-x**2))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out