6.1 problem 21

6.1.1 Maple step by step solution
6.1.2 Maple trace
6.1.3 Maple dsolve solution
6.1.4 Mathematica DSolve solution

Internal problem ID [7318]
Book : DIFFERENTIAL EQUATIONS with Boundary Value Problems. DENNIS G. ZILL, WARREN S. WRIGHT, MICHAEL R. CULLEN. Brooks/Cole. Boston, MA. 2013. 8th edition.
Section : CHAPTER 7 THE LAPLACE TRANSFORM. 7.3.1 TRANSLATION ON THE s-AXIS. Page 297
Problem number : 21
Date solved : Friday, October 11, 2024 at 08:07:44 AM
CAS classification : [[_linear, `class A`]]

Solve

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

With initial conditions

\begin{align*} y \left (0\right )&=2 \end{align*}

Solving using the Laplace transform method. Let

\[ \mathcal {L}\left (y\right ) =Y(s) \]

Taking the Laplace transform of the ode and using the relations that

\begin{align*} \mathcal {L}\left (y^{\prime }\right )&= s Y(s) - y \left (0\right ) \end{align*}

The given ode now becomes an algebraic equation in the Laplace domain

\begin{align*} s Y \left (s \right )-y \left (0\right )+4 Y \left (s \right ) = \frac {1}{s +4}\tag {1} \end{align*}

Replacing initial condition gives

\begin{align*} s Y \left (s \right )-2+4 Y \left (s \right ) = \frac {1}{s +4} \end{align*}

Solving for \(Y(s)\) gives

\begin{align*} Y(s) = \frac {9+2 s}{\left (s +4\right )^{2}} \end{align*}

Applying partial fractions decomposition results in

\[ Y(s)= \frac {1}{\left (s +4\right )^{2}}+\frac {2}{s +4} \]

The inverse Laplace of each term above is now found, which gives

\begin{align*} \mathcal {L}^{-1}\left (\frac {1}{\left (s +4\right )^{2}}\right ) &= t \,{\mathrm e}^{-4 t}\\ \mathcal {L}^{-1}\left (\frac {2}{s +4}\right ) &= 2 \,{\mathrm e}^{-4 t}\end{align*}

Adding the above results and simplifying gives

\[ y=\left (t +2\right ) {\mathrm e}^{-4 t} \]

(a) Solution plot
\(y = \left (t +2\right ) {\mathrm e}^{-4 t}\)

(b) Slope field plot
\(y^{\prime }+4 y = {\mathrm e}^{-4 t}\)
6.1.1 Maple step by step solution
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [\frac {d}{d t}y \left (t \right )+4 y \left (t \right )={\mathrm e}^{-4 t}, y \left (0\right )=2\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d t}y \left (t \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d t}y \left (t \right )=-4 y \left (t \right )+{\mathrm e}^{-4 t} \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y \left (t \right )\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE}\hspace {3pt} \\ {} & {} & \frac {d}{d t}y \left (t \right )+4 y \left (t \right )={\mathrm e}^{-4 t} \\ \bullet & {} & \textrm {The ODE is linear; multiply by an integrating factor}\hspace {3pt} \mu \left (t \right ) \\ {} & {} & \mu \left (t \right ) \left (\frac {d}{d t}y \left (t \right )+4 y \left (t \right )\right )=\mu \left (t \right ) {\mathrm e}^{-4 t} \\ \bullet & {} & \textrm {Assume the lhs of the ODE is the total derivative}\hspace {3pt} \frac {d}{d t}\left (y \left (t \right ) \mu \left (t \right )\right ) \\ {} & {} & \mu \left (t \right ) \left (\frac {d}{d t}y \left (t \right )+4 y \left (t \right )\right )=\left (\frac {d}{d t}y \left (t \right )\right ) \mu \left (t \right )+y \left (t \right ) \left (\frac {d}{d t}\mu \left (t \right )\right ) \\ \bullet & {} & \textrm {Isolate}\hspace {3pt} \frac {d}{d t}\mu \left (t \right ) \\ {} & {} & \frac {d}{d t}\mu \left (t \right )=4 \mu \left (t \right ) \\ \bullet & {} & \textrm {Solve to find the integrating factor}\hspace {3pt} \\ {} & {} & \mu \left (t \right )={\mathrm e}^{4 t} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int \left (\frac {d}{d t}\left (y \left (t \right ) \mu \left (t \right )\right )\right )d t =\int \mu \left (t \right ) {\mathrm e}^{-4 t}d t +\mathit {C1} \\ \bullet & {} & \textrm {Evaluate the integral on the lhs}\hspace {3pt} \\ {} & {} & y \left (t \right ) \mu \left (t \right )=\int \mu \left (t \right ) {\mathrm e}^{-4 t}d t +\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \left (t \right ) \\ {} & {} & y \left (t \right )=\frac {\int \mu \left (t \right ) {\mathrm e}^{-4 t}d t +\mathit {C1}}{\mu \left (t \right )} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \mu \left (t \right )={\mathrm e}^{4 t} \\ {} & {} & y \left (t \right )=\frac {\int {\mathrm e}^{4 t} {\mathrm e}^{-4 t}d t +\mathit {C1}}{{\mathrm e}^{4 t}} \\ \bullet & {} & \textrm {Evaluate the integrals on the rhs}\hspace {3pt} \\ {} & {} & y \left (t \right )=\frac {t +\mathit {C1}}{{\mathrm e}^{4 t}} \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & y \left (t \right )={\mathrm e}^{-4 t} \left (t +\mathit {C1} \right ) \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=2 \\ {} & {} & 2=\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} \textit {\_C1} \\ {} & {} & \mathit {C1} =2 \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \textit {\_C1} =2\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & y \left (t \right )={\mathrm e}^{-4 t} \left (t +2\right ) \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & y \left (t \right )={\mathrm e}^{-4 t} \left (t +2\right ) \end {array} \]

6.1.2 Maple trace
`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
<- 1st order linear successful`
 
6.1.3 Maple dsolve solution

Solving time : 0.102 (sec)
Leaf size : 12

dsolve([diff(y(t),t)+4*y(t) = exp(-4*t), 
        op([y(0) = 2])], 
        y(t),method=laplace)
 
\[ y = \left (t +2\right ) {\mathrm e}^{-4 t} \]
6.1.4 Mathematica DSolve solution

Solving time : 0.053 (sec)
Leaf size : 14

DSolve[{D[y[t],t]+4*y[t]==Exp[-4*t],{y[0]==2}}, 
       y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to e^{-4 t} (t+2) \]