10.2.11 problem 11

Internal problem ID [1139]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.2. Page 48
Problem number : 11
Date solved : Saturday, March 29, 2025 at 10:41:10 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.124 (sec). Leaf size: 17
ode:=x+y(x)*diff(y(x),x)/exp(x) = 0; 
ic:=y(0) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \sqrt {-1-2 x \,{\mathrm e}^{x}+2 \,{\mathrm e}^{x}} \]
Mathematica. Time used: 1.758 (sec). Leaf size: 19
ode=x+y[x]*D[y[x],x]/Exp[x] == 0; 
ic=y[0]==1; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \sqrt {-2 e^x (x-1)-1} \]
Sympy. Time used: 0.514 (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}} \]