70.1.15 problem 15

Internal problem ID [18601]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 2. First order differential equations. Section 2.1 (Separable equations). Problems at page 44
Problem number : 15
Date solved : Thursday, October 02, 2025 at 03:15:46 PM
CAS classification : [_separable]

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

With initial conditions

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