Internal problem ID [11508]
Internal file name [OUTPUT/10491_Thursday_May_18_2023_04_21_00_AM_63822021/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(b).
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 }+x=\sin \left (2 t \right )} \] With initial conditions \begin {align*} [x \left (0\right ) = 0] \end {align*}
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) &=1\\ q(t) &=\sin \left (2 t \right ) \end {align*}
Hence the ode is \begin {align*} x^{\prime }+x = \sin \left (2 t \right ) \end {align*}
The domain of \(p(t)=1\) is \[
\{-\infty
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 )+Y \left (s \right ) = \frac {2}{s^{2}+4}\tag {1} \end {align*}
Replacing initial condition gives \begin {align*} s Y \left (s \right )+Y \left (s \right ) = \frac {2}{s^{2}+4} \end {align*}
Solving for \(Y(s)\) gives \begin {align*} Y(s) = \frac {2}{\left (s^{2}+4\right ) \left (s +1\right )} \end {align*}
Applying partial fractions decomposition results in \[ Y(s)= \frac {-\frac {1}{5}-\frac {i}{10}}{s -2 i}+\frac {-\frac {1}{5}+\frac {i}{10}}{s +2 i}+\frac {2}{5 \left (s +1\right )} \] The inverse Laplace of each term above
is now found, which gives \begin {align*} \mathcal {L}^{-1}\left (\frac {-\frac {1}{5}-\frac {i}{10}}{s -2 i}\right ) &= \left (-\frac {1}{5}-\frac {i}{10}\right ) {\mathrm e}^{2 i t}\\ \mathcal {L}^{-1}\left (\frac {-\frac {1}{5}+\frac {i}{10}}{s +2 i}\right ) &= \left (-\frac {1}{5}+\frac {i}{10}\right ) {\mathrm e}^{-2 i t}\\ \mathcal {L}^{-1}\left (\frac {2}{5 \left (s +1\right )}\right ) &= \frac {2 \,{\mathrm e}^{-t}}{5} \end {align*}
Adding the above results and simplifying gives \[ x=\frac {2 \,{\mathrm e}^{-t}}{5}-\frac {2 \cos \left (2 t \right )}{5}+\frac {\sin \left (2 t \right )}{5} \]
The solution(s) found are the following \begin{align*}
\tag{1} x &= \frac {2 \,{\mathrm e}^{-t}}{5}-\frac {2 \cos \left (2 t \right )}{5}+\frac {\sin \left (2 t \right )}{5} \\
\end{align*} Verification of solutions
\[
x = \frac {2 \,{\mathrm e}^{-t}}{5}-\frac {2 \cos \left (2 t \right )}{5}+\frac {\sin \left (2 t \right )}{5}
\] Verified OK. \[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [x^{\prime }+x=\sin \left (2 t \right ), x \left (0\right )=0\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 }=-x+\sin \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 }+x=\sin \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 }+x\right )=\mu \left (t \right ) \sin \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 }+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 )=\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 (x \mu \left (t \right )\right )\right )d t =\int \mu \left (t \right ) \sin \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 ) \sin \left (2 t \right )d t +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} x \\ {} & {} & x=\frac {\int \mu \left (t \right ) \sin \left (2 t \right )d t +c_{1}}{\mu \left (t \right )} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \mu \left (t \right )={\mathrm e}^{t} \\ {} & {} & x=\frac {\int {\mathrm e}^{t} \sin \left (2 t \right )d t +c_{1}}{{\mathrm e}^{t}} \\ \bullet & {} & \textrm {Evaluate the integrals on the rhs}\hspace {3pt} \\ {} & {} & x=\frac {-\frac {2 \,{\mathrm e}^{t} \cos \left (2 t \right )}{5}+\frac {{\mathrm e}^{t} \sin \left (2 t \right )}{5}+c_{1}}{{\mathrm e}^{t}} \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & x=\frac {\sin \left (2 t \right )}{5}-\frac {2 \cos \left (2 t \right )}{5}+c_{1} {\mathrm e}^{-t} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} x \left (0\right )=0 \\ {} & {} & 0=-\frac {2}{5}+c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} c_{1} \\ {} & {} & c_{1} =\frac {2}{5} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} c_{1} =\frac {2}{5}\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & x=\frac {2 \,{\mathrm e}^{-t}}{5}-\frac {2 \cos \left (2 t \right )}{5}+\frac {\sin \left (2 t \right )}{5} \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & x=\frac {2 \,{\mathrm e}^{-t}}{5}-\frac {2 \cos \left (2 t \right )}{5}+\frac {\sin \left (2 t \right )}{5} \end {array} \]
Maple trace
✓ Solution by Maple
Time used: 4.485 (sec). Leaf size: 23
\[
x \left (t \right ) = \frac {2 \,{\mathrm e}^{-t}}{5}-\frac {2 \cos \left (2 t \right )}{5}+\frac {\sin \left (2 t \right )}{5}
\]
✓ Solution by Mathematica
Time used: 0.15 (sec). Leaf size: 27
\[
x(t)\to \frac {1}{5} \left (2 e^{-t}+\sin (2 t)-2 \cos (2 t)\right )
\]
15.2.2 Solving as laplace ode
15.2.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(x(t),t)+x(t)=sin(2*t),x(0) = 0],x(t), singsol=all)
DSolve[{x'[t]+x[t]==Sin[2*t],{x[0]==0}},x[t],t,IncludeSingularSolutions -> True]