Internal problem ID [2845]
Internal file name [OUTPUT/2337_Sunday_June_05_2022_02_59_43_AM_1185400/index.tex
]
Book: Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth
edition, 2015
Section: Chapter 10, The Laplace Transform and Some Elementary Applications. Exercises for
10.4. page 689
Problem number: Problem 7.
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 }+y=5 \,{\mathrm e}^{t} \sin \left (t \right )} \] With initial conditions \begin {align*} [y \left (0\right ) = 1] \end {align*}
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) &=5 \,{\mathrm e}^{t} \sin \left (t \right ) \end {align*}
Hence the ode is \begin {align*} y^{\prime }+y = 5 \,{\mathrm e}^{t} \sin \left (t \right ) \end {align*}
The domain of \(p(t)=1\) is \[
\{-\infty
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 {5}{\left (s -1\right )^{2}+1}\tag {1} \end {align*}
Replacing initial condition gives \begin {align*} s Y \left (s \right )-1+Y \left (s \right ) = \frac {5}{\left (s -1\right )^{2}+1} \end {align*}
Solving for \(Y(s)\) gives \begin {align*} Y(s) = \frac {s^{2}-2 s +7}{\left (s^{2}-2 s +2\right ) \left (s +1\right )} \end {align*}
Applying partial fractions decomposition results in \[ Y(s)= \frac {-\frac {1}{2}-i}{s -1-i}+\frac {-\frac {1}{2}+i}{s -1+i}+\frac {2}{s +1} \] The inverse Laplace of each term above
is now found, which gives \begin {align*} \mathcal {L}^{-1}\left (\frac {-\frac {1}{2}-i}{s -1-i}\right ) &= \left (-\frac {1}{2}-i\right ) {\mathrm e}^{\left (1+i\right ) t}\\ \mathcal {L}^{-1}\left (\frac {-\frac {1}{2}+i}{s -1+i}\right ) &= \left (-\frac {1}{2}+i\right ) {\mathrm e}^{\left (1-i\right ) t}\\ \mathcal {L}^{-1}\left (\frac {2}{s +1}\right ) &= 2 \,{\mathrm e}^{-t} \end {align*}
Adding the above results and simplifying gives \[ y=\left (-\cos \left (t \right )+2 \sin \left (t \right )\right ) {\mathrm e}^{t}+2 \,{\mathrm e}^{-t} \]
The solution(s) found are the following \begin{align*}
\tag{1} y &= \left (-\cos \left (t \right )+2 \sin \left (t \right )\right ) {\mathrm e}^{t}+2 \,{\mathrm e}^{-t} \\
\end{align*} Verification of solutions
\[
y = \left (-\cos \left (t \right )+2 \sin \left (t \right )\right ) {\mathrm e}^{t}+2 \,{\mathrm e}^{-t}
\] Verified OK. \[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime }+y=5 \,{\mathrm e}^{t} \sin \left (t \right ), y \left (0\right )=1\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+5 \,{\mathrm e}^{t} \sin \left (t \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=5 \,{\mathrm e}^{t} \sin \left (t \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 )=5 \mu \left (t \right ) {\mathrm e}^{t} \sin \left (t \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 5 \mu \left (t \right ) {\mathrm e}^{t} \sin \left (t \right )d t +c_{1} \\ \bullet & {} & \textrm {Evaluate the integral on the lhs}\hspace {3pt} \\ {} & {} & y \mu \left (t \right )=\int 5 \mu \left (t \right ) {\mathrm e}^{t} \sin \left (t \right )d t +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y=\frac {\int 5 \mu \left (t \right ) {\mathrm e}^{t} \sin \left (t \right )d t +c_{1}}{\mu \left (t \right )} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \mu \left (t \right )={\mathrm e}^{t} \\ {} & {} & y=\frac {\int 5 \left ({\mathrm e}^{t}\right )^{2} \sin \left (t \right )d t +c_{1}}{{\mathrm e}^{t}} \\ \bullet & {} & \textrm {Evaluate the integrals on the rhs}\hspace {3pt} \\ {} & {} & y=\frac {-{\mathrm e}^{2 t} \cos \left (t \right )+2 \,{\mathrm e}^{2 t} \sin \left (t \right )+c_{1}}{{\mathrm e}^{t}} \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & y=c_{1} {\mathrm e}^{-t}-\left (\cos \left (t \right )-2 \sin \left (t \right )\right ) {\mathrm e}^{t} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=1 \\ {} & {} & 1=-1+c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} c_{1} \\ {} & {} & c_{1} =2 \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} c_{1} =2\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & y=\left (-\cos \left (t \right )+2 \sin \left (t \right )\right ) {\mathrm e}^{t}+2 \,{\mathrm e}^{-t} \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & y=\left (-\cos \left (t \right )+2 \sin \left (t \right )\right ) {\mathrm e}^{t}+2 \,{\mathrm e}^{-t} \end {array} \]
Maple trace
✓ Solution by Maple
Time used: 3.125 (sec). Leaf size: 23
\[
y \left (t \right ) = {\mathrm e}^{t} \left (2 \sin \left (t \right )-\cos \left (t \right )\right )+2 \,{\mathrm e}^{-t}
\]
✓ Solution by Mathematica
Time used: 0.073 (sec). Leaf size: 27
\[
y(t)\to 2 e^{-t}+2 e^t \sin (t)-e^t \cos (t)
\]
13.7.2 Solving as laplace ode
13.7.3 Maple step by step solution
`Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
<- 1st order linear successful`
dsolve([diff(y(t),t)+y(t)=5*exp(t)*sin(t),y(0) = 1],y(t), singsol=all)
DSolve[{y'[t]+y[t]==5*Exp[t]*Sin[t],{y[0]==1}},y[t],t,IncludeSingularSolutions -> True]