21.2 problem 30.6 (b)

21.2.1 Existence and uniqueness analysis
21.2.2 Solving as laplace ode
21.2.3 Maple step by step solution

Internal problem ID [13884]
Internal file name [OUTPUT/13056_Friday_February_23_2024_06_54_25_AM_56429927/index.tex]

Book: Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section: Chapter 30. Piecewise-defined functions and periodic functions. Additional Exercises. page 553
Problem number: 30.6 (b).
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program : "quadrature"

Maple gives the following as the ode type

[_quadrature]

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

21.2.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) &=0\\ q(t) &=\operatorname {Heaviside}\left (t -3\right ) \end {align*}

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

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

21.2.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 ) = \frac {{\mathrm e}^{-3 s}}{s}\tag {1} \end {align*}

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

Solving for \(Y(s)\) gives \begin {align*} Y(s) = \frac {{\mathrm e}^{-3 s}+4 s}{s^{2}} \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}^{-3 s}+4 s}{s^{2}}\right )\\ &= \operatorname {Heaviside}\left (t -3\right ) \left (t -3\right )+4 \end {align*}

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

Summary

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

Verification of solutions

\[ y = \left \{\begin {array}{cc} 4 & t <3 \\ 1+t & 3\le t \end {array}\right . \] Verified OK.

21.2.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime }=\mathit {Heaviside}\left (t -3\right ), y \left (0\right )=4\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & y^{\prime } \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int y^{\prime }d t =\int \mathit {Heaviside}\left (t -3\right )d t +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & y=t \mathit {Heaviside}\left (t -3\right )-3 \mathit {Heaviside}\left (t -3\right )+c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y=t \mathit {Heaviside}\left (t -3\right )-3 \mathit {Heaviside}\left (t -3\right )+c_{1} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=4 \\ {} & {} & 4=c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} c_{1} \\ {} & {} & c_{1} =4 \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} c_{1} =4\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & y=\mathit {Heaviside}\left (t -3\right ) \left (t -3\right )+4 \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & y=\mathit {Heaviside}\left (t -3\right ) \left (t -3\right )+4 \end {array} \]

Maple trace

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

Solution by Maple

Time used: 3.656 (sec). Leaf size: 14

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

\[ y \left (t \right ) = \operatorname {Heaviside}\left (t -3\right ) \left (t -3\right )+4 \]

Solution by Mathematica

Time used: 0.005 (sec). Leaf size: 15

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

\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} 4 & t\leq 3 \\ t+1 & \text {True} \\ \end {array} \\ \end {array} \]