38.6.45 problem 45

Internal problem ID [8475]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 2. First order differential equations. Section 2.3 Linear equations. Exercises 2.3 at page 63
Problem number : 45
Date solved : Tuesday, September 30, 2025 at 05:37:46 PM
CAS classification : [_linear]

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

With initial conditions

\begin{align*} y \left (0\right )&=1 \\ \end{align*}
Maple. Time used: 0.073 (sec). Leaf size: 24
ode:=diff(y(x),x)+exp(x)*y(x) = 1; 
ic:=[y(0) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \left (-\operatorname {Ei}_{1}\left (-{\mathrm e}^{x}\right )+{\mathrm e}+\operatorname {Ei}_{1}\left (-1\right )\right ) {\mathrm e}^{-{\mathrm e}^{x}} \]
Mathematica. Time used: 0.038 (sec). Leaf size: 28
ode=D[y[x],x]+Exp[x]*y[x]==1; 
ic={y[0]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-e^x} \left (\int _0^xe^{e^{K[1]}}dK[1]+e\right ) \end{align*}
Sympy. Time used: 0.413 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)*exp(x) + Derivative(y(x), x) - 1,0) 
ics = {y(0): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (\operatorname {Ei}{\left (e^{x} \right )} - \operatorname {Ei}{\left (1 \right )} + e\right ) e^{- e^{x}} \]