4.36 problem Problem 6(a)

4.36.1 Existence and uniqueness analysis
4.36.2 Solving as laplace ode
4.36.3 Maple step by step solution

Internal problem ID [12343]
Internal file name [OUTPUT/10996_Monday_October_02_2023_02_47_46_AM_33879010/index.tex]

Book: APPLIED DIFFERENTIAL EQUATIONS The Primary Course by Vladimir A. Dobrushkin. CRC Press 2015
Section: Chapter 5.6 Laplace transform. Nonhomogeneous equations. Problems page 368
Problem number: Problem 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 {10 Q^{\prime }+100 Q=\operatorname {Heaviside}\left (t -1\right )-\operatorname {Heaviside}\left (-2+t \right )} \] With initial conditions \begin {align*} [Q \left (0\right ) = 0] \end {align*}

4.36.1 Existence and uniqueness analysis

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

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

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

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

4.36.2 Solving as laplace ode

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

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

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

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

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

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

Summary

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

Verification of solutions

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

4.36.3 Maple step by step solution

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

dsolve([10*diff(Q(t),t)+100*Q(t)=Heaviside(t-1)-Heaviside(t-2),Q(0) = 0],Q(t), singsol=all)
 

\[ Q \left (t \right ) = \frac {\operatorname {Heaviside}\left (t -2\right ) {\mathrm e}^{-10 t +20}}{100}-\frac {\operatorname {Heaviside}\left (t -2\right )}{100}-\frac {\operatorname {Heaviside}\left (t -1\right ) {\mathrm e}^{-10 t +10}}{100}+\frac {\operatorname {Heaviside}\left (t -1\right )}{100} \]

Solution by Mathematica

Time used: 0.086 (sec). Leaf size: 50

DSolve[{10*q'[t]+100*q[t]==UnitStep[t-1]-UnitStep[t-2],{q[0]==0}},q[t],t,IncludeSingularSolutions -> True]
 

\[ q(t)\to \begin {array}{cc} \{ & \begin {array}{cc} \frac {1}{100} e^{10-10 t} \left (-1+e^{10}\right ) & t>2 \\ \frac {1}{100} \left (1-e^{10-10 t}\right ) & 1