15.1 problem 6(a)

15.1.1 Existence and uniqueness analysis
15.1.2 Solving as laplace ode
15.1.3 Maple step by step solution

Internal problem ID [11507]
Internal file name [OUTPUT/10490_Thursday_May_18_2023_04_20_58_AM_59524997/index.tex]

Book: A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section: Chapter 3, Laplace transform. Section 3.2.1 Initial value problems. Exercises page 156
Problem number: 6(a).
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 {x^{\prime }+5 x=\operatorname {Heaviside}\left (-2+t \right )} \] With initial conditions \begin {align*} [x \left (0\right ) = 1] \end {align*}

15.1.1 Existence and uniqueness analysis

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

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

Hence the ode is \begin {align*} x^{\prime }+5 x = \operatorname {Heaviside}\left (-2+t \right ) \end {align*}

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

15.1.2 Solving as laplace ode

Solving using the Laplace transform method. Let \[ \mathcal {L}\left (x\right ) =Y(s) \] Taking the Laplace transform of the ode and using the relations that \begin {align*} \mathcal {L}\left (x^{\prime }\right )&= s Y(s) - x \left (0\right ) \end {align*}

The given ode now becomes an algebraic equation in the Laplace domain \begin {align*} s Y \left (s \right )-x \left (0\right )+5 Y \left (s \right ) = \frac {{\mathrm e}^{-2 s}}{s}\tag {1} \end {align*}

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

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

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

Converting the above solution to piecewise it becomes \[ x = \left \{\begin {array}{cc} {\mathrm e}^{-5 t} & t <2 \\ {\mathrm e}^{-5 t}+\frac {1}{5}-\frac {{\mathrm e}^{-5 t +10}}{5} & 2\le t \end {array}\right . \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} x &= \left \{\begin {array}{cc} {\mathrm e}^{-5 t} & t <2 \\ {\mathrm e}^{-5 t}+\frac {1}{5}-\frac {{\mathrm e}^{-5 t +10}}{5} & 2\le t \end {array}\right . \\ \end{align*}

Verification of solutions

\[ x = \left \{\begin {array}{cc} {\mathrm e}^{-5 t} & t <2 \\ {\mathrm e}^{-5 t}+\frac {1}{5}-\frac {{\mathrm e}^{-5 t +10}}{5} & 2\le t \end {array}\right . \] Verified OK.

15.1.3 Maple step by step solution

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

dsolve([diff(x(t),t)+5*x(t)=Heaviside(t-2),x(0) = 1],x(t), singsol=all)
 

\[ x \left (t \right ) = -\frac {\operatorname {Heaviside}\left (t -2\right ) {\mathrm e}^{-5 t +10}}{5}+\frac {\operatorname {Heaviside}\left (t -2\right )}{5}+{\mathrm e}^{-5 t} \]

Solution by Mathematica

Time used: 0.093 (sec). Leaf size: 37

DSolve[{x'[t]+5*x[t]==UnitStep[t-2],{x[0]==1}},x[t],t,IncludeSingularSolutions -> True]
 

\[ x(t)\to \begin {array}{cc} \{ & \begin {array}{cc} e^{-5 t} & t\leq 2 \\ \frac {1}{5} e^{-5 t} \left (5-e^{10}+e^{5 t}\right ) & \text {True} \\ \end {array} \\ \end {array} \]