64.6.17 problem 17

Internal problem ID [13296]
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 : Monday, March 31, 2025 at 07:47:15 AM
CAS classification : [_exact, _Bernoulli]

\begin{align*} {\mathrm e}^{2 x} y^{2}-2 x +{\mathrm e}^{2 x} y 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,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.378 (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]
 
\[ y(x)\to \sqrt {2} e^{-x} \sqrt {x^2+2} \]
Sympy. Time used: 0.672 (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}} \]