64.3.13 problem 14

Internal problem ID [13213]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, section 2.1 (Exact differential equations and integrating factors). Exercises page 37
Problem number : 14
Date solved : Monday, March 31, 2025 at 07:39:26 AM
CAS classification : [_exact, [_Abel, `2nd type`, `class B`]]

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

With initial conditions

\begin{align*} y \left (0\right )&=6 \end{align*}

Maple. Time used: 0.359 (sec). Leaf size: 29
ode:=y(x)*exp(x)+2*exp(x)+y(x)^2+(exp(x)+2*x*y(x))*diff(y(x),x) = 0; 
ic:=y(0) = 6; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {-{\mathrm e}^{x}+\sqrt {{\mathrm e}^{2 x}-8 x \,{\mathrm e}^{x}+32 x}}{2 x} \]
Mathematica. Time used: 31.711 (sec). Leaf size: 37
ode=(y[x]*Exp[x]+2*Exp[x]+y[x]^2)+(Exp[x]+2*x*y[x])*D[y[x],x]==0; 
ic={y[0]==6}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {\sqrt {-8 e^x x+32 x+e^{2 x}}-e^x}{2 x} \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((2*x*y(x) + exp(x))*Derivative(y(x), x) + y(x)**2 + y(x)*exp(x) + 2*exp(x),0) 
ics = {y(0): 6} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (-y(x)**2 - y(x)*exp(x) - 2*exp(x))/(2*x*y(x) + exp(x)) cannot be solved by the factorable group method