58.6.17 problem 17

Internal problem ID [14648]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, Miscellaneous Review. Exercises page 60
Problem number : 17
Date solved : Thursday, October 02, 2025 at 09:45:57 AM
CAS classification : [_exact, _Bernoulli]

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

With initial conditions

\begin{align*} y \left (0\right )&=2 \\ \end{align*}
Maple. Time used: 0.131 (sec). Leaf size: 24
ode:=exp(2*x)*y(x)^2-2*x+exp(2*x)*y(x)*diff(y(x),x) = 0; 
ic:=[y(0) = 2]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = {\mathrm e}^{-2 x} \sqrt {2}\, \sqrt {{\mathrm e}^{2 x} \left (x^{2}+2\right )} \]
Mathematica. Time used: 0.261 (sec). Leaf size: 25
ode=(Exp[2*x]*y[x]^2-2*x)+(Exp[2*x]*y[x])*D[y[x],x]==0; 
ic={y[0]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \sqrt {2} e^{-x} \sqrt {x^2+2} \end{align*}
Sympy. Time used: 0.431 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x + y(x)**2*exp(2*x) + y(x)*exp(2*x)*Derivative(y(x), x),0) 
ics = {y(0): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \sqrt {\left (2 x^{2} + 4\right ) e^{- 2 x}} \]