6.15 problem 65

6.15.1 Existence and uniqueness analysis
6.15.2 Solving as laplace ode
6.15.3 Maple step by step solution

Internal problem ID [6682]
Internal file name [OUTPUT/5930_Sunday_June_05_2022_04_02_04_PM_51701053/index.tex]

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: 65.
ODE order: 1.
ODE degree: 1.

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

Maple gives the following as the ode type

[[_linear, `class A`]]

\[ \boxed {y^{\prime }+y=\left \{\begin {array}{cc} t & 0\le t <1 \\ 0 & 1\le t \end {array}\right .} \] With initial conditions \begin {align*} [y \left (0\right ) = 0] \end {align*}

6.15.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) &=1\\ q(t) &=\left \{\begin {array}{cc} t & 0\le t <1 \\ 0 & 1\le t \end {array}\right . \end {align*}

Hence the ode is \begin {align*} y^{\prime }+y = \left \{\begin {array}{cc} t & 0\le t <1 \\ 0 & 1\le t \end {array}\right . \end {align*}

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

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

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

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

Converting the above solution to piecewise it becomes \[ y = \left \{\begin {array}{cc} -1+{\mathrm e}^{-t}+t & t <1 \\ 1+{\mathrm e}^{-1} & t =1 \\ -1+{\mathrm e}^{-t}+{\mathrm e}^{1-t}+2 \,{\mathrm e}^{\frac {1}{2}-\frac {t}{2}} \sinh \left (-\frac {1}{2}+\frac {t}{2}\right ) & 1

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \left \{\begin {array}{cc} -1+{\mathrm e}^{-t}+t & t <1 \\ 1+{\mathrm e}^{-1} & t &=1 \\ -1+{\mathrm e}^{-t}+{\mathrm e}^{1-t}+2 \,{\mathrm e}^{\frac {1}{2}-\frac {t}{2}} \sinh \left (-\frac {1}{2}+\frac {t}{2}\right ) & 1

Verification of solutions

\[ y = \left \{\begin {array}{cc} -1+{\mathrm e}^{-t}+t & t <1 \\ 1+{\mathrm e}^{-1} & t =1 \\ -1+{\mathrm e}^{-t}+{\mathrm e}^{1-t}+2 \,{\mathrm e}^{\frac {1}{2}-\frac {t}{2}} \sinh \left (-\frac {1}{2}+\frac {t}{2}\right ) & 1

6.15.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime }+y=\left \{\begin {array}{cc} t & 0\le t <1 \\ 0 & 1\le t \end {array}\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 }=-y+\left \{\begin {array}{cc} t & 0\le t <1 \\ 0 & 1\le t \end {array}\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 }+y=\left \{\begin {array}{cc} t & 0\le t <1 \\ 0 & 1\le t \end {array}\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 }+y\right )=\mu \left (t \right ) \left (\left \{\begin {array}{cc} t & 0\le t <1 \\ 0 & 1\le t \end {array}\right .\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 }+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 )=\mu \left (t \right ) \\ \bullet & {} & \textrm {Solve to find the integrating factor}\hspace {3pt} \\ {} & {} & \mu \left (t \right )={\mathrm e}^{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 ) \left (\left \{\begin {array}{cc} t & 0\le t <1 \\ 0 & 1\le t \end {array}\right .\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 ) \left (\left \{\begin {array}{cc} t & 0\le t <1 \\ 0 & 1\le t \end {array}\right .\right )d t +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y=\frac {\int \mu \left (t \right ) \left (\left \{\begin {array}{cc} t & 0\le t <1 \\ 0 & 1\le t \end {array}\right .\right )d t +c_{1}}{\mu \left (t \right )} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \mu \left (t \right )={\mathrm e}^{t} \\ {} & {} & y=\frac {\int {\mathrm e}^{t} \left (\left \{\begin {array}{cc} t & 0\le t <1 \\ 0 & 1\le t \end {array}\right .\right )d t +c_{1}}{{\mathrm e}^{t}} \\ \bullet & {} & \textrm {Evaluate the integrals on the rhs}\hspace {3pt} \\ {} & {} & y=\frac {\left \{\begin {array}{cc} 0 & t \le 0 \\ \left (t -1\right ) {\mathrm e}^{t}+1 & t \le 1 \\ 1 & 1

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: 3.313 (sec). Leaf size: 51

dsolve([diff(y(t),t)+y(t)=piecewise(0<=t and t<1,t,t>=1,0),y(0) = 0],y(t), singsol=all)
 

\[ y \left (t \right ) = \left \{\begin {array}{cc} -1+{\mathrm e}^{-t}+t & t <1 \\ 1+{\mathrm e}^{-1} & t =1 \\ {\mathrm e}^{-t} & 1

Solution by Mathematica

Time used: 0.07 (sec). Leaf size: 32

DSolve[{y'[t]+y[t]==Piecewise[{{t,0<=t<1},{0,t>=1}}],{y[0]==0}},y[t],t,IncludeSingularSolutions -> True]
 

\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} 0 & t\leq 0 \\ t+e^{-t}-1 & 0