19.1.25 problem 25

Internal problem ID [4237]
Book : Advanced Mathematica, Book2, Perkin and Perkin, 1992
Section : Chapter 11.3, page 316
Problem number : 25
Date solved : Tuesday, September 30, 2025 at 07:08:08 AM
CAS classification : [_separable]

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

With initial conditions

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