12.6.14 problem 14

Internal problem ID [1693]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Exact equations. Section 2.5 Page 79
Problem number : 14
Date solved : Saturday, March 29, 2025 at 11:33:23 PM
CAS classification : [_exact, [_Abel, `2nd type`, `class B`]]

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

Maple. Time used: 0.006 (sec). Leaf size: 66
ode:=exp(x)*(x^2*y(x)^2+2*x*y(x)^2)+6*x+(2*x^2*y(x)*exp(x)+2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {\left (-1+\sqrt {-3 \,{\mathrm e}^{x} x^{4}-{\mathrm e}^{x} c_1 \,x^{2}+1}\right ) {\mathrm e}^{-x}}{x^{2}} \\ y &= -\frac {\left (1+\sqrt {-3 \,{\mathrm e}^{x} x^{4}-{\mathrm e}^{x} c_1 \,x^{2}+1}\right ) {\mathrm e}^{-x}}{x^{2}} \\ \end{align*}
Mathematica. Time used: 35.727 (sec). Leaf size: 76
ode=(Exp[x]*(x^2*y[x]^2+2*x*y[x]^2)+6*x)+(2*x^2*y[x]*Exp[x]+2)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {e^{-x} \left (1+\sqrt {1+e^x \left (-3 x^4+c_1 x^2\right )}\right )}{x^2} \\ y(x)\to \frac {e^{-x} \left (-1+\sqrt {1+e^x \left (-3 x^4+c_1 x^2\right )}\right )}{x^2} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(6*x + (x**2*y(x)**2 + 2*x*y(x)**2)*exp(x) + (2*x**2*y(x)*exp(x) + 2)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out