59.4.4 problem 9.1 (iv)

Internal problem ID [15015]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 9, First order linear equations and the integrating factor. Exercises page 86
Problem number : 9.1 (iv)
Date solved : Thursday, October 02, 2025 at 10:01:08 AM
CAS classification : [_linear]

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

With initial conditions

\begin{align*} y \left (0\right )&={\mathrm e} \\ \end{align*}
Maple. Time used: 0.072 (sec). Leaf size: 23
ode:=diff(y(x),x)+exp(-x)*y(x) = 1; 
ic:=[y(0) = exp(1)]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \left (\operatorname {Ei}_{1}\left ({\mathrm e}^{-x}\right )+1-\operatorname {Ei}_{1}\left (1\right )\right ) {\mathrm e}^{{\mathrm e}^{-x}} \]
Mathematica. Time used: 0.039 (sec). Leaf size: 27
ode=D[y[x],x]+Exp[-x]*y[x]==1; 
ic={y[0]==Exp[1]}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{e^{-x}} \left (-\operatorname {ExpIntegralEi}\left (-e^{-x}\right )+\operatorname {ExpIntegralEi}(-1)+1\right ) \end{align*}
Sympy. Time used: 2.991 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)*exp(-x) + Derivative(y(x), x) - 1,0) 
ics = {y(0): E} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (- \operatorname {Ei}{\left (- e^{- x} \right )} + \operatorname {Ei}{\left (-1 \right )} + 1\right ) e^{e^{- x}} \]