44.6.45 problem 45

Internal problem ID [7189]
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 : Sunday, March 30, 2025 at 11:50:41 AM
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,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.056 (sec). Leaf size: 23
ode=D[y[x],x]+Exp[x]*y[x]==1; 
ic={y[0]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-e^x} \left (\operatorname {ExpIntegralEi}\left (e^x\right )-\operatorname {ExpIntegralEi}(1)+e\right ) \]
Sympy. Time used: 0.894 (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}} \]