Internal problem ID [2514]
Internal file name [OUTPUT/2006_Sunday_June_05_2022_02_44_01_AM_63714365/index.tex
]
Book: Mathematical methods for physics and engineering, Riley, Hobson, Bence, second edition,
2002
Section: Chapter 15, Higher order ordinary differential equations. 15.4 Exercises, page
523
Problem number: Problem 15.2(a).
ODE order: 2.
ODE degree: 1.
The type(s) of ODE detected by this program : "kovacic", "second_order_linear_constant_coeff"
Maple gives the following as the ode type
[[_2nd_order, _missing_x]]
\[ \boxed {f^{\prime \prime }+2 f^{\prime }+5 f=0} \] With initial conditions \begin {align*} [f \left (0\right ) = 1, f^{\prime }\left (0\right ) = 0] \end {align*}
This is a linear ODE. In canonical form it is written as \begin {align*} f^{\prime \prime } + p(t)f^{\prime } + q(t) f &= F \end {align*}
Where here \begin {align*} p(t) &=2\\ q(t) &=5\\ F &=0 \end {align*}
Hence the ode is \begin {align*} f^{\prime \prime }+2 f^{\prime }+5 f = 0 \end {align*}
The domain of \(p(t)=2\) is \[
\{-\infty
This is second order with constant coefficients homogeneous ODE. In standard form the
ODE is \[ A f''(t) + B f'(t) + C f(t) = 0 \] Where in the above \(A=1, B=2, C=5\). Let the solution be \(f=e^{\lambda t}\). Substituting this into the ODE gives \[ \lambda ^{2} {\mathrm e}^{\lambda t}+2 \lambda \,{\mathrm e}^{\lambda t}+5 \,{\mathrm e}^{\lambda t} = 0 \tag {1} \]
Since exponential function is never zero, then dividing Eq(2) throughout by \(e^{\lambda t}\) gives \[ \lambda ^{2}+2 \lambda +5 = 0 \tag {2} \]
Equation (2) is the characteristic equation of the ODE. Its roots determine the
general solution form.Using the quadratic formula \[ \lambda _{1,2} = \frac {-B}{2 A} \pm \frac {1}{2 A} \sqrt {B^2 - 4 A C} \] Substituting \(A=1, B=2, C=5\) into the above gives
\begin {align*} \lambda _{1,2} &= \frac {-2}{(2) \left (1\right )} \pm \frac {1}{(2) \left (1\right )} \sqrt {2^2 - (4) \left (1\right )\left (5\right )}\\ &= -1 \pm 2 i \end {align*}
Hence \begin {align*} \lambda _1 &= -1 + 2 i\\ \lambda _2 &= -1 - 2 i \end {align*}
Which simplifies to \begin{align*}
\lambda _1 &= -1+2 i \\
\lambda _2 &= -1-2 i \\
\end{align*} Since roots are complex conjugate of each others, then let the roots
be \[
\lambda _{1,2} = \alpha \pm i \beta
\] Where \(\alpha =-1\) and \(\beta =2\). Therefore the final solution, when using Euler relation, can be
written as \[
f = e^{\alpha t} \left ( c_{1} \cos (\beta t) + c_{2} \sin (\beta t) \right )
\] Which becomes \[
f = e^{-t}\left (c_{1} \cos \left (2 t \right )+c_{2} \sin \left (2 t \right )\right )
\] Initial conditions are used to solve for the constants of
integration.
Looking at the above solution \begin {align*} f = {\mathrm e}^{-t} \left (c_{1} \cos \left (2 t \right )+c_{2} \sin \left (2 t \right )\right ) \tag {1} \end {align*}
Initial conditions are now substituted in the above solution. This will generate the required
equations to solve for the integration constants. substituting \(f = 1\) and \(t = 0\) in the above gives
\begin {align*} 1 = c_{1}\tag {1A} \end {align*}
Taking derivative of the solution gives \begin {align*} f^{\prime } = -{\mathrm e}^{-t} \left (c_{1} \cos \left (2 t \right )+c_{2} \sin \left (2 t \right )\right )+{\mathrm e}^{-t} \left (-2 c_{1} \sin \left (2 t \right )+2 c_{2} \cos \left (2 t \right )\right ) \end {align*}
substituting \(f^{\prime } = 0\) and \(t = 0\) in the above gives \begin {align*} 0 = -c_{1} +2 c_{2}\tag {2A} \end {align*}
Equations {1A,2A} are now solved for \(\{c_{1}, c_{2}\}\). Solving for the constants gives \begin {align*} c_{1}&=1\\ c_{2}&={\frac {1}{2}} \end {align*}
Substituting these values back in above solution results in \begin {align*} f = \frac {{\mathrm e}^{-t} \left (2 \cos \left (2 t \right )+\sin \left (2 t \right )\right )}{2} \end {align*}
Summary
The solution(s) found are the following \begin{align*}
\tag{1} f &= \frac {{\mathrm e}^{-t} \left (2 \cos \left (2 t \right )+\sin \left (2 t \right )\right )}{2} \\
\end{align*} Verification of solutions
\[
f = \frac {{\mathrm e}^{-t} \left (2 \cos \left (2 t \right )+\sin \left (2 t \right )\right )}{2}
\] Verified OK. Writing the ode as \begin {align*} f^{\prime \prime }+2 f^{\prime }+5 f &= 0 \tag {1} \\ A f^{\prime \prime } + B f^{\prime } + C f &= 0 \tag {2} \end {align*}
Comparing (1) and (2) shows that \begin {align*} A &= 1 \\ B &= 2\tag {3} \\ C &= 5 \end {align*}
Applying the Liouville transformation on the dependent variable gives \begin {align*} z(t) &= f e^{\int \frac {B}{2 A} \,dt} \end {align*}
Then (2) becomes \begin {align*} z''(t) = r z(t)\tag {4} \end {align*}
Where \(r\) is given by \begin {align*} r &= \frac {s}{t}\tag {5} \\ &= \frac {2 A B' - 2 B A' + B^2 - 4 A C}{4 A^2} \end {align*}
Substituting the values of \(A,B,C\) from (3) in the above and simplifying gives \begin {align*} r &= \frac {-4}{1}\tag {6} \end {align*}
Comparing the above to (5) shows that \begin {align*} s &= -4\\ t &= 1 \end {align*}
Therefore eq. (4) becomes \begin {align*} z''(t) &= -4 z \left (t \right ) \tag {7} \end {align*}
Equation (7) is now solved. After finding \(z(t)\) then \(f\) is found using the inverse transformation
\begin {align*} f &= z \left (t \right ) e^{-\int \frac {B}{2 A} \,dt} \end {align*}
The first step is to determine the case of Kovacic algorithm this ode belongs to. There are 3
cases depending on the order of poles of \(r\) and the order of \(r\) at \(\infty \). The following table
summarizes these cases. Case Allowed pole order for \(r\) Allowed value for \(\mathcal {O}(\infty )\) 1 \(\left \{ 0,1,2,4,6,8,\cdots \right \} \) \(\left \{ \cdots ,-6,-4,-2,0,2,3,4,5,6,\cdots \right \} \) 2
Need to have at least one pole
that is either order \(2\) or odd order
greater than \(2\). Any other pole order
is allowed as long as the above
condition is satisfied. Hence the
following set of pole orders are all
allowed. \(\{1,2\}\),\(\{1,3\}\),\(\{2\}\),\(\{3\}\),\(\{3,4\}\),\(\{1,2,5\}\). no condition 3 \(\left \{ 1,2\right \} \) \(\left \{ 2,3,4,5,6,7,\cdots \right \} \) The order of \(r\) at \(\infty \) is the degree of \(t\) minus the degree of \(s\). Therefore \begin {align*} O\left (\infty \right ) &= \text {deg}(t) - \text {deg}(s) \\ &= 0 - 0 \\ &= 0 \end {align*}
There are no poles in \(r\). Therefore the set of poles \(\Gamma \) is empty. Since there is no odd order pole
larger than \(2\) and the order at \(\infty \) is \(0\) then the necessary conditions for case one are met.
Therefore \begin {align*} L &= [1] \end {align*}
Since \(r = -4\) is not a function of \(t\), then there is no need run Kovacic algorithm to obtain a solution
for transformed ode \(z''=r z\) as one solution is \[ z_1(t) = \cos \left (2 t \right ) \] Using the above, the solution for the original ode can
now be found. The first solution to the original ode in \(f\) is found from \begin{align*}
f_1 &= z_1 e^{ \int -\frac {1}{2} \frac {B}{A} \,dt} \\
&= z_1 e^{ -\int \frac {1}{2} \frac {2}{1} \,dt} \\
&= z_1 e^{-t} \\
&= z_1 \left ({\mathrm e}^{-t}\right ) \\
\end{align*} Which simplifies to \[
f_1 = {\mathrm e}^{-t} \cos \left (2 t \right )
\]
The second solution \(f_2\) to the original ode is found using reduction of order \[ f_2 = f_1 \int \frac { e^{\int -\frac {B}{A} \,dt}}{f_1^2} \,dt \] Substituting gives \begin{align*}
f_2 &= f_1 \int \frac { e^{\int -\frac {2}{1} \,dt}}{\left (f_1\right )^2} \,dt \\
&= f_1 \int \frac { e^{-2 t}}{\left (f_1\right )^2} \,dt \\
&= f_1 \left (\frac {\tan \left (2 t \right )}{2}\right ) \\
\end{align*}
Therefore the solution is
\begin{align*}
f &= c_{1} f_1 + c_{2} f_2 \\
&= c_{1} \left ({\mathrm e}^{-t} \cos \left (2 t \right )\right ) + c_{2} \left ({\mathrm e}^{-t} \cos \left (2 t \right )\left (\frac {\tan \left (2 t \right )}{2}\right )\right ) \\
\end{align*} Initial conditions are used to solve for the constants of integration.
Looking at the above solution \begin {align*} f = c_{1} {\mathrm e}^{-t} \cos \left (2 t \right )+\frac {c_{2} {\mathrm e}^{-t} \sin \left (2 t \right )}{2} \tag {1} \end {align*}
Initial conditions are now substituted in the above solution. This will generate the required
equations to solve for the integration constants. substituting \(f = 1\) and \(t = 0\) in the above gives
\begin {align*} 1 = c_{1}\tag {1A} \end {align*}
Taking derivative of the solution gives \begin {align*} f^{\prime } = -c_{1} {\mathrm e}^{-t} \cos \left (2 t \right )-2 c_{1} {\mathrm e}^{-t} \sin \left (2 t \right )-\frac {c_{2} {\mathrm e}^{-t} \sin \left (2 t \right )}{2}+c_{2} {\mathrm e}^{-t} \cos \left (2 t \right ) \end {align*}
substituting \(f^{\prime } = 0\) and \(t = 0\) in the above gives \begin {align*} 0 = -c_{1} +c_{2}\tag {2A} \end {align*}
Equations {1A,2A} are now solved for \(\{c_{1}, c_{2}\}\). Solving for the constants gives \begin {align*} c_{1}&=1\\ c_{2}&=1 \end {align*}
Substituting these values back in above solution results in \begin {align*} f = {\mathrm e}^{-t} \cos \left (2 t \right )+\frac {{\mathrm e}^{-t} \sin \left (2 t \right )}{2} \end {align*}
Which simplifies to \[
f = \frac {{\mathrm e}^{-t} \left (2 \cos \left (2 t \right )+\sin \left (2 t \right )\right )}{2}
\] The solution(s) found are the following \begin{align*}
\tag{1} f &= \frac {{\mathrm e}^{-t} \left (2 \cos \left (2 t \right )+\sin \left (2 t \right )\right )}{2} \\
\end{align*} Verification of solutions
\[
f = \frac {{\mathrm e}^{-t} \left (2 \cos \left (2 t \right )+\sin \left (2 t \right )\right )}{2}
\] Verified OK. \[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [f^{\prime \prime }+2 f^{\prime }+5 f=0, f \left (0\right )=1, f^{\prime }{\raise{-0.36em}{\Big |}}{\mstack {}{_{\left \{t \hiderel {=}0\right \}}}}=0\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & f^{\prime \prime } \\ \bullet & {} & \textrm {Characteristic polynomial of ODE}\hspace {3pt} \\ {} & {} & r^{2}+2 r +5=0 \\ \bullet & {} & \textrm {Use quadratic formula to solve for}\hspace {3pt} r \\ {} & {} & r =\frac {\left (-2\right )\pm \left (\sqrt {-16}\right )}{2} \\ \bullet & {} & \textrm {Roots of the characteristic polynomial}\hspace {3pt} \\ {} & {} & r =\left (-1-2 \,\mathrm {I}, -1+2 \,\mathrm {I}\right ) \\ \bullet & {} & \textrm {1st solution of the ODE}\hspace {3pt} \\ {} & {} & f_{1}\left (t \right )={\mathrm e}^{-t} \cos \left (2 t \right ) \\ \bullet & {} & \textrm {2nd solution of the ODE}\hspace {3pt} \\ {} & {} & f_{2}\left (t \right )={\mathrm e}^{-t} \sin \left (2 t \right ) \\ \bullet & {} & \textrm {General solution of the ODE}\hspace {3pt} \\ {} & {} & f=c_{1} f_{1}\left (t \right )+c_{2} f_{2}\left (t \right ) \\ \bullet & {} & \textrm {Substitute in solutions}\hspace {3pt} \\ {} & {} & f=c_{1} {\mathrm e}^{-t} \cos \left (2 t \right )+c_{2} {\mathrm e}^{-t} \sin \left (2 t \right ) \\ \square & {} & \textrm {Check validity of solution}\hspace {3pt} f=c_{1} {\mathrm e}^{-t} \cos \left (2 t \right )+c_{2} {\mathrm e}^{-t} \sin \left (2 t \right ) \\ {} & \circ & \textrm {Use initial condition}\hspace {3pt} f \left (0\right )=1 \\ {} & {} & 1=c_{1} \\ {} & \circ & \textrm {Compute derivative of the solution}\hspace {3pt} \\ {} & {} & f^{\prime }=-c_{1} {\mathrm e}^{-t} \cos \left (2 t \right )-2 c_{1} {\mathrm e}^{-t} \sin \left (2 t \right )-c_{2} {\mathrm e}^{-t} \sin \left (2 t \right )+2 c_{2} {\mathrm e}^{-t} \cos \left (2 t \right ) \\ {} & \circ & \textrm {Use the initial condition}\hspace {3pt} f^{\prime }{\raise{-0.36em}{\Big |}}{\mstack {}{_{\left \{t \hiderel {=}0\right \}}}}=0 \\ {} & {} & 0=-c_{1} +2 c_{2} \\ {} & \circ & \textrm {Solve for}\hspace {3pt} c_{1} \hspace {3pt}\textrm {and}\hspace {3pt} c_{2} \\ {} & {} & \left \{c_{1} =1, c_{2} =\frac {1}{2}\right \} \\ {} & \circ & \textrm {Substitute constant values into general solution and simplify}\hspace {3pt} \\ {} & {} & f=\frac {{\mathrm e}^{-t} \left (2 \cos \left (2 t \right )+\sin \left (2 t \right )\right )}{2} \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & f=\frac {{\mathrm e}^{-t} \left (2 \cos \left (2 t \right )+\sin \left (2 t \right )\right )}{2} \end {array} \]
Maple trace
✓ Solution by Maple
Time used: 0.016 (sec). Leaf size: 21
\[
f \left (t \right ) = \frac {{\mathrm e}^{-t} \left (\sin \left (2 t \right )+2 \cos \left (2 t \right )\right )}{2}
\]
✓ Solution by Mathematica
Time used: 0.021 (sec). Leaf size: 25
\[
f(t)\to \frac {1}{2} e^{-t} (\sin (2 t)+2 \cos (2 t))
\]
2.2.2 Solving as second order linear constant coeff ode
2.2.3 Solving using Kovacic algorithm
2.2.4 Maple step by step solution
`Methods for second order ODEs:
--- Trying classification methods ---
trying a quadrature
checking if the LODE has constant coefficients
<- constant coefficients successful`
dsolve([diff(f(t),t$2)+2*diff(f(t),t)+5*f(t)=0,f(0) = 1, D(f)(0) = 0],f(t), singsol=all)
DSolve[{f''[t]+2*f'[t]+5*f[t]==0,{f[0]==1,f'[0]==0}},f[t],t,IncludeSingularSolutions -> True]