18.3 problem 27.1 (c)

18.3.1 Existence and uniqueness analysis
18.3.2 Solving as laplace ode
18.3.3 Maple step by step solution

Internal problem ID [13850]
Internal file name [OUTPUT/13022_Friday_February_23_2024_06_46_43_AM_93276718/index.tex]

Book: Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section: Chapter 27. Differentiation and the Laplace transform. Additional Exercises. page 496
Problem number: 27.1 (c).
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program : "exact", "linear", "first_order_ode_lie_symmetry_lookup"

Maple gives the following as the ode type

[[_linear, `class A`]]

\[ \boxed {y^{\prime }+3 y=\operatorname {Heaviside}\left (t -4\right )} \] With initial conditions \begin {align*} [y \left (0\right ) = 0] \end {align*}

18.3.1 Existence and uniqueness analysis

This is a linear ODE. In canonical form it is written as \begin {align*} y^{\prime } + p(t)y &= q(t) \end {align*}

Where here \begin {align*} p(t) &=3\\ q(t) &=\operatorname {Heaviside}\left (t -4\right ) \end {align*}

Hence the ode is \begin {align*} y^{\prime }+3 y = \operatorname {Heaviside}\left (t -4\right ) \end {align*}

The domain of \(p(t)=3\) is \[ \{-\infty

18.3.2 Solving as laplace ode

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 )+3 Y \left (s \right ) = \frac {{\mathrm e}^{-4 s}}{s}\tag {1} \end {align*}

Replacing initial condition gives \begin {align*} s Y \left (s \right )+3 Y \left (s \right ) = \frac {{\mathrm e}^{-4 s}}{s} \end {align*}

Solving for \(Y(s)\) gives \begin {align*} Y(s) = \frac {{\mathrm e}^{-4 s}}{s \left (s +3\right )} \end {align*}

Taking the inverse Laplace transform gives \begin {align*} y&= \mathcal {L}^{-1}\left (Y(s)\right )\\ &= \mathcal {L}^{-1}\left (\frac {{\mathrm e}^{-4 s}}{s \left (s +3\right )}\right )\\ &= \frac {\operatorname {Heaviside}\left (t -4\right ) \left (1-{\mathrm e}^{-3 t +12}\right )}{3} \end {align*}

Converting the above solution to piecewise it becomes \[ y = \left \{\begin {array}{cc} 0 & t <4 \\ \frac {1}{3}-\frac {{\mathrm e}^{-3 t +12}}{3} & 4\le t \end {array}\right . \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \left \{\begin {array}{cc} 0 & t <4 \\ \frac {1}{3}-\frac {{\mathrm e}^{-3 t +12}}{3} & 4\le t \end {array}\right . \\ \end{align*}

Verification of solutions

\[ y = \left \{\begin {array}{cc} 0 & t <4 \\ \frac {1}{3}-\frac {{\mathrm e}^{-3 t +12}}{3} & 4\le t \end {array}\right . \] Verified OK.

18.3.3 Maple step by step solution

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

Maple trace

`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
<- 1st order linear successful`
 

Solution by Maple

Time used: 4.937 (sec). Leaf size: 20

dsolve([diff(y(t),t)+3*y(t)=Heaviside(t-4),y(0) = 0],y(t), singsol=all)
 

\[ y \left (t \right ) = -\frac {\operatorname {Heaviside}\left (t -4\right ) \left (-1+{\mathrm e}^{-3 t +12}\right )}{3} \]

Solution by Mathematica

Time used: 0.065 (sec). Leaf size: 27

DSolve[{y'[t]+3*y[t]==UnitStep[t-4],{y[0]==0}},y[t],t,IncludeSingularSolutions -> True]
 

\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} \frac {1}{3}-\frac {1}{3} e^{12-3 t} & t>4 \\ 0 & \text {True} \\ \end {array} \\ \end {array} \]