Internal problem ID [707]
Internal file name [OUTPUT/707_Sunday_June_05_2022_01_47_25_AM_44410193/index.tex
]
Book: Elementary differential equations and boundary value problems, 10th ed., Boyce and
DiPrima
Section: Chapter 3, Second order linear equations, 3.7 Forced Vibrations. page 217
Problem number: 21.
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, _linear, _nonhomogeneous]]
\[ \boxed {u^{\prime \prime }+\frac {u^{\prime }}{8}+4 u=3 \cos \left (\frac {t}{4}\right )} \] With initial conditions \begin {align*} [u \left (0\right ) = 2, u^{\prime }\left (0\right ) = 0] \end {align*}
This is a linear ODE. In canonical form it is written as \begin {align*} u^{\prime \prime } + p(t)u^{\prime } + q(t) u &= F \end {align*}
Where here \begin {align*} p(t) &={\frac {1}{8}}\\ q(t) &=4\\ F &=3 \cos \left (\frac {t}{4}\right ) \end {align*}
Hence the ode is \begin {align*} u^{\prime \prime }+\frac {u^{\prime }}{8}+4 u = 3 \cos \left (\frac {t}{4}\right ) \end {align*}
The domain of \(p(t)={\frac {1}{8}}\) is \[
\{-\infty
This is second order non-homogeneous ODE. In standard form the ODE is \[ A u''(t) + B u'(t) + C u(t) = f(t) \] Where \(A=1, B={\frac {1}{8}}, C=4, f(t)=3 \cos \left (\frac {t}{4}\right )\).
Let the solution be \[ u = u_h + u_p \] Where \(u_h\) is the solution to the homogeneous ODE \( A u''(t) + B u'(t) + C u(t) = 0\), and \(u_p\) is a
particular solution to the non-homogeneous ODE \(A u''(t) + B u'(t) + C u(t) = f(t)\). \(u_h\) is the solution to \[ u^{\prime \prime }+\frac {u^{\prime }}{8}+4 u = 0 \] This is second
order with constant coefficients homogeneous ODE. In standard form the ODE is \[ A u''(t) + B u'(t) + C u(t) = 0 \]
Where in the above \(A=1, B={\frac {1}{8}}, C=4\). Let the solution be \(u=e^{\lambda t}\). Substituting this into the ODE gives \[ \lambda ^{2} {\mathrm e}^{\lambda t}+\frac {\lambda \,{\mathrm e}^{\lambda t}}{8}+4 \,{\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}+\frac {1}{8} \lambda +4 = 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={\frac {1}{8}}, C=4\) into the above gives
\begin {align*} \lambda _{1,2} &= \frac {-{\frac {1}{8}}}{(2) \left (1\right )} \pm \frac {1}{(2) \left (1\right )} \sqrt {{\frac {1}{8}}^2 - (4) \left (1\right )\left (4\right )}\\ &= -{\frac {1}{16}} \pm \frac {i \sqrt {1023}}{16} \end {align*}
Hence \begin {align*} \lambda _1 &= -{\frac {1}{16}} + \frac {i \sqrt {1023}}{16}\\ \lambda _2 &= -{\frac {1}{16}} - \frac {i \sqrt {1023}}{16} \end {align*}
Which simplifies to \begin{align*}
\lambda _1 &= -\frac {1}{16}+\frac {i \sqrt {1023}}{16} \\
\lambda _2 &= -\frac {1}{16}-\frac {i \sqrt {1023}}{16} \\
\end{align*} Since roots are complex conjugate of each others, then let the roots be \[
\lambda _{1,2} = \alpha \pm i \beta
\]
Where \(\alpha =-{\frac {1}{16}}\) and \(\beta =\frac {\sqrt {1023}}{16}\). Therefore the final solution, when using Euler relation, can be written as \[
u = e^{\alpha t} \left ( c_{1} \cos (\beta t) + c_{2} \sin (\beta t) \right )
\]
Which becomes \[
u = e^{-\frac {t}{16}}\left (c_{1} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )+c_{2} \sin \left (\frac {\sqrt {1023}\, t}{16}\right )\right )
\] Therefore the homogeneous solution \(u_h\) is \[
u_h = {\mathrm e}^{-\frac {t}{16}} \left (c_{1} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )+c_{2} \sin \left (\frac {\sqrt {1023}\, t}{16}\right )\right )
\] The particular solution is
now found using the method of undetermined coefficients. Looking at the RHS of
the ode, which is \[ 3 \cos \left (\frac {t}{4}\right ) \] Shows that the corresponding undetermined set of the basis
functions (UC_set) for the trial solution is \[ \left [\left \{\cos \left (\frac {t}{4}\right ), \sin \left (\frac {t}{4}\right )\right \}\right ] \] While the set of the basis functions for the
homogeneous solution found earlier is \[ \left \{{\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right ), {\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right )\right \} \] Since there is no duplication between the basis
function in the UC_set and the basis functions of the homogeneous solution, the trial
solution is a linear combination of all the basis in the UC_set. \[
u_p = A_{1} \cos \left (\frac {t}{4}\right )+A_{2} \sin \left (\frac {t}{4}\right )
\] The unknowns \(\{A_{1}, A_{2}\}\)
are found by substituting the above trial solution \(u_p\) into the ODE and comparing
coefficients. Substituting the trial solution into the ODE and simplifying gives \[
\frac {63 A_{1} \cos \left (\frac {t}{4}\right )}{16}+\frac {63 A_{2} \sin \left (\frac {t}{4}\right )}{16}-\frac {A_{1} \sin \left (\frac {t}{4}\right )}{32}+\frac {A_{2} \cos \left (\frac {t}{4}\right )}{32} = 3 \cos \left (\frac {t}{4}\right )
\]
Solving for the unknowns by comparing coefficients results in \[ \left [A_{1} = {\frac {12096}{15877}}, A_{2} = {\frac {96}{15877}}\right ] \] Substituting the
above back in the above trial solution \(u_p\), gives the particular solution \[
u_p = \frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877}
\] Therefore
the general solution is \begin{align*}
u &= u_h + u_p \\
&= \left ({\mathrm e}^{-\frac {t}{16}} \left (c_{1} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )+c_{2} \sin \left (\frac {\sqrt {1023}\, t}{16}\right )\right )\right ) + \left (\frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877}\right ) \\
\end{align*} Initial conditions are used to solve for the constants of
integration.
Looking at the above solution \begin {align*} u = {\mathrm e}^{-\frac {t}{16}} \left (c_{1} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )+c_{2} \sin \left (\frac {\sqrt {1023}\, t}{16}\right )\right )+\frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877} \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 \(u = 2\) and \(t = 0\) in the above gives
\begin {align*} 2 = c_{1} +\frac {12096}{15877}\tag {1A} \end {align*}
Taking derivative of the solution gives \begin {align*} u^{\prime } = -\frac {{\mathrm e}^{-\frac {t}{16}} \left (c_{1} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )+c_{2} \sin \left (\frac {\sqrt {1023}\, t}{16}\right )\right )}{16}+{\mathrm e}^{-\frac {t}{16}} \left (-\frac {c_{1} \sqrt {1023}\, \sin \left (\frac {\sqrt {1023}\, t}{16}\right )}{16}+\frac {c_{2} \sqrt {1023}\, \cos \left (\frac {\sqrt {1023}\, t}{16}\right )}{16}\right )-\frac {3024 \sin \left (\frac {t}{4}\right )}{15877}+\frac {24 \cos \left (\frac {t}{4}\right )}{15877} \end {align*}
substituting \(u^{\prime } = 0\) and \(t = 0\) in the above gives \begin {align*} 0 = -\frac {c_{1}}{16}+\frac {\sqrt {1023}\, c_{2}}{16}+\frac {24}{15877}\tag {2A} \end {align*}
Equations {1A,2A} are now solved for \(\{c_{1}, c_{2}\}\). Solving for the constants gives \begin {align*} c_{1}&={\frac {19658}{15877}}\\ c_{2}&=\frac {19274 \sqrt {1023}}{16242171} \end {align*}
Substituting these values back in above solution results in \begin {align*} u = \frac {19658 \,{\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )}{15877}+\frac {19274 \,{\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \sqrt {1023}}{16242171}+\frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877} \end {align*}
Summary
The solution(s) found are the following \begin{align*}
\tag{1} u &= \frac {19658 \,{\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )}{15877}+\frac {19274 \,{\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \sqrt {1023}}{16242171}+\frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877} \\
\end{align*} Verification of solutions
\[
u = \frac {19658 \,{\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )}{15877}+\frac {19274 \,{\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \sqrt {1023}}{16242171}+\frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877}
\] Verified OK. Writing the ode as \begin {align*} u^{\prime \prime }+\frac {u^{\prime }}{8}+4 u &= 0 \tag {1} \\ A u^{\prime \prime } + B u^{\prime } + C u &= 0 \tag {2} \end {align*}
Comparing (1) and (2) shows that \begin {align*} A &= 1 \\ B &= {\frac {1}{8}}\tag {3} \\ C &= 4 \end {align*}
Applying the Liouville transformation on the dependent variable gives \begin {align*} z(t) &= u 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 {-1023}{256}\tag {6} \end {align*}
Comparing the above to (5) shows that \begin {align*} s &= -1023\\ t &= 256 \end {align*}
Therefore eq. (4) becomes \begin {align*} z''(t) &= -\frac {1023 z \left (t \right )}{256} \tag {7} \end {align*}
Equation (7) is now solved. After finding \(z(t)\) then \(u\) is found using the inverse transformation
\begin {align*} u &= 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 = -{\frac {1023}{256}}\) 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 (\frac {\sqrt {1023}\, t}{16}\right ) \] Using the above, the solution for the original ode can
now be found. The first solution to the original ode in \(u\) is found from \begin{align*}
u_1 &= z_1 e^{ \int -\frac {1}{2} \frac {B}{A} \,dt} \\
&= z_1 e^{ -\int \frac {1}{2} \frac {{\frac {1}{8}}}{1} \,dt} \\
&= z_1 e^{-\frac {t}{16}} \\
&= z_1 \left ({\mathrm e}^{-\frac {t}{16}}\right ) \\
\end{align*} Which simplifies to \[
u_1 = {\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )
\]
The second solution \(u_2\) to the original ode is found using reduction of order \[ u_2 = u_1 \int \frac { e^{\int -\frac {B}{A} \,dt}}{u_1^2} \,dt \] Substituting gives \begin{align*}
u_2 &= u_1 \int \frac { e^{\int -\frac {{\frac {1}{8}}}{1} \,dt}}{\left (u_1\right )^2} \,dt \\
&= u_1 \int \frac { e^{-\frac {t}{8}}}{\left (u_1\right )^2} \,dt \\
&= u_1 \left (\frac {16 \sqrt {1023}\, \tan \left (\frac {\sqrt {1023}\, t}{16}\right )}{1023}\right ) \\
\end{align*}
Therefore the solution is
\begin{align*}
u &= c_{1} u_1 + c_{2} u_2 \\
&= c_{1} \left ({\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )\right ) + c_{2} \left ({\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )\left (\frac {16 \sqrt {1023}\, \tan \left (\frac {\sqrt {1023}\, t}{16}\right )}{1023}\right )\right ) \\
\end{align*} This is second order nonhomogeneous ODE. Let the solution be \[
u = u_h + u_p
\] Where \(u_h\) is the solution to
the homogeneous ODE \( A u''(t) + B u'(t) + C u(t) = 0\), and \(u_p\) is a particular solution to the nonhomogeneous ODE \(A u''(t) + B u'(t) + C u(t) = f(t)\). \(u_h\) is the
solution to \[
u^{\prime \prime }+\frac {u^{\prime }}{8}+4 u = 0
\] The homogeneous solution is found using the Kovacic algorithm which results in \[
u_h = c_{1} {\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )+\frac {16 c_{2} {\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \sqrt {1023}}{1023}
\]
The particular solution is now found using the method of undetermined coefficients. Looking
at the RHS of the ode, which is \[ 3 \cos \left (\frac {t}{4}\right ) \] Shows that the corresponding undetermined set of the basis
functions (UC_set) for the trial solution is \[ \left [\left \{\cos \left (\frac {t}{4}\right ), \sin \left (\frac {t}{4}\right )\right \}\right ] \] While the set of the basis functions for the
homogeneous solution found earlier is \[ \left \{{\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right ), \frac {16 \,{\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \sqrt {1023}}{1023}\right \} \] Since there is no duplication between the basis
function in the UC_set and the basis functions of the homogeneous solution, the trial
solution is a linear combination of all the basis in the UC_set. \[
u_p = A_{1} \cos \left (\frac {t}{4}\right )+A_{2} \sin \left (\frac {t}{4}\right )
\] The unknowns \(\{A_{1}, A_{2}\}\)
are found by substituting the above trial solution \(u_p\) into the ODE and comparing
coefficients. Substituting the trial solution into the ODE and simplifying gives \[
\frac {63 A_{1} \cos \left (\frac {t}{4}\right )}{16}+\frac {63 A_{2} \sin \left (\frac {t}{4}\right )}{16}-\frac {A_{1} \sin \left (\frac {t}{4}\right )}{32}+\frac {A_{2} \cos \left (\frac {t}{4}\right )}{32} = 3 \cos \left (\frac {t}{4}\right )
\]
Solving for the unknowns by comparing coefficients results in \[ \left [A_{1} = {\frac {12096}{15877}}, A_{2} = {\frac {96}{15877}}\right ] \] Substituting the
above back in the above trial solution \(u_p\), gives the particular solution \[
u_p = \frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877}
\] Therefore
the general solution is \begin{align*}
u &= u_h + u_p \\
&= \left (c_{1} {\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )+\frac {16 c_{2} {\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \sqrt {1023}}{1023}\right ) + \left (\frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877}\right ) \\
\end{align*} Initial conditions are used to solve for the constants of
integration.
Looking at the above solution \begin {align*} u = c_{1} {\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )+\frac {16 c_{2} {\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \sqrt {1023}}{1023}+\frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877} \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 \(u = 2\) and \(t = 0\) in the above gives
\begin {align*} 2 = c_{1} +\frac {12096}{15877}\tag {1A} \end {align*}
Taking derivative of the solution gives \begin {align*} u^{\prime } = -\frac {c_{1} {\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )}{16}-\frac {c_{1} {\mathrm e}^{-\frac {t}{16}} \sqrt {1023}\, \sin \left (\frac {\sqrt {1023}\, t}{16}\right )}{16}-\frac {c_{2} {\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \sqrt {1023}}{1023}+c_{2} {\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )-\frac {3024 \sin \left (\frac {t}{4}\right )}{15877}+\frac {24 \cos \left (\frac {t}{4}\right )}{15877} \end {align*}
substituting \(u^{\prime } = 0\) and \(t = 0\) in the above gives \begin {align*} 0 = \frac {24}{15877}-\frac {c_{1}}{16}+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}&={\frac {19658}{15877}}\\ c_{2}&={\frac {9637}{127016}} \end {align*}
Substituting these values back in above solution results in \begin {align*} u = \frac {19658 \,{\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )}{15877}+\frac {19274 \,{\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \sqrt {1023}}{16242171}+\frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877} \end {align*}
Summary
The solution(s) found are the following \begin{align*}
\tag{1} u &= \frac {19658 \,{\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )}{15877}+\frac {19274 \,{\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \sqrt {1023}}{16242171}+\frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877} \\
\end{align*} Verification of solutions
\[
u = \frac {19658 \,{\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )}{15877}+\frac {19274 \,{\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \sqrt {1023}}{16242171}+\frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877}
\] Verified OK. \[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [u^{\prime \prime }+\frac {u^{\prime }}{8}+4 u=3 \cos \left (\frac {t}{4}\right ), u \left (0\right )=2, u^{\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 \\ {} & {} & u^{\prime \prime } \\ \bullet & {} & \textrm {Characteristic polynomial of homogeneous ODE}\hspace {3pt} \\ {} & {} & r^{2}+\frac {1}{8} r +4=0 \\ \bullet & {} & \textrm {Use quadratic formula to solve for}\hspace {3pt} r \\ {} & {} & r =\frac {\left (-\frac {1}{8}\right )\pm \left (\sqrt {-\frac {1023}{64}}\right )}{2} \\ \bullet & {} & \textrm {Roots of the characteristic polynomial}\hspace {3pt} \\ {} & {} & r =\left (-\frac {1}{16}-\frac {\mathrm {I} \sqrt {1023}}{16}, -\frac {1}{16}+\frac {\mathrm {I} \sqrt {1023}}{16}\right ) \\ \bullet & {} & \textrm {1st solution of the homogeneous ODE}\hspace {3pt} \\ {} & {} & u_{1}\left (t \right )={\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right ) \\ \bullet & {} & \textrm {2nd solution of the homogeneous ODE}\hspace {3pt} \\ {} & {} & u_{2}\left (t \right )={\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \\ \bullet & {} & \textrm {General solution of the ODE}\hspace {3pt} \\ {} & {} & u=c_{1} u_{1}\left (t \right )+c_{2} u_{2}\left (t \right )+u_{p}\left (t \right ) \\ \bullet & {} & \textrm {Substitute in solutions of the homogeneous ODE}\hspace {3pt} \\ {} & {} & u=c_{1} {\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )+{\mathrm e}^{-\frac {t}{16}} c_{2} \sin \left (\frac {\sqrt {1023}\, t}{16}\right )+u_{p}\left (t \right ) \\ \square & {} & \textrm {Find a particular solution}\hspace {3pt} u_{p}\left (t \right )\hspace {3pt}\textrm {of the ODE}\hspace {3pt} \\ {} & \circ & \textrm {Use variation of parameters to find}\hspace {3pt} u_{p}\hspace {3pt}\textrm {here}\hspace {3pt} f \left (t \right )\hspace {3pt}\textrm {is the forcing function}\hspace {3pt} \\ {} & {} & \left [u_{p}\left (t \right )=-u_{1}\left (t \right ) \left (\int \frac {u_{2}\left (t \right ) f \left (t \right )}{W \left (u_{1}\left (t \right ), u_{2}\left (t \right )\right )}d t \right )+u_{2}\left (t \right ) \left (\int \frac {u_{1}\left (t \right ) f \left (t \right )}{W \left (u_{1}\left (t \right ), u_{2}\left (t \right )\right )}d t \right ), f \left (t \right )=3 \cos \left (\frac {t}{4}\right )\right ] \\ {} & \circ & \textrm {Wronskian of solutions of the homogeneous equation}\hspace {3pt} \\ {} & {} & W \left (u_{1}\left (t \right ), u_{2}\left (t \right )\right )=\left [\begin {array}{cc} {\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right ) & {\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \\ -\frac {{\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )}{16}-\frac {{\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \sqrt {1023}}{16} & -\frac {{\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right )}{16}+\frac {{\mathrm e}^{-\frac {t}{16}} \sqrt {1023}\, \cos \left (\frac {\sqrt {1023}\, t}{16}\right )}{16} \end {array}\right ] \\ {} & \circ & \textrm {Compute Wronskian}\hspace {3pt} \\ {} & {} & W \left (u_{1}\left (t \right ), u_{2}\left (t \right )\right )=\frac {\sqrt {1023}\, {\mathrm e}^{-\frac {t}{8}}}{16} \\ {} & \circ & \textrm {Substitute functions into equation for}\hspace {3pt} u_{p}\left (t \right ) \\ {} & {} & u_{p}\left (t \right )=-\frac {16 \,{\mathrm e}^{-\frac {t}{16}} \sqrt {1023}\, \left (\cos \left (\frac {\sqrt {1023}\, t}{16}\right ) \left (\int \cos \left (\frac {t}{4}\right ) {\mathrm e}^{\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right )d t \right )-\sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \left (\int \cos \left (\frac {t}{4}\right ) {\mathrm e}^{\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )d t \right )\right )}{341} \\ {} & \circ & \textrm {Compute integrals}\hspace {3pt} \\ {} & {} & u_{p}\left (t \right )=\frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877} \\ \bullet & {} & \textrm {Substitute particular solution into general solution to ODE}\hspace {3pt} \\ {} & {} & u=c_{1} {\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )+{\mathrm e}^{-\frac {t}{16}} c_{2} \sin \left (\frac {\sqrt {1023}\, t}{16}\right )+\frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877} \\ \square & {} & \textrm {Check validity of solution}\hspace {3pt} u=c_{1} {\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )+{\mathrm e}^{-\frac {t}{16}} c_{2} \sin \left (\frac {\sqrt {1023}\, t}{16}\right )+\frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877} \\ {} & \circ & \textrm {Use initial condition}\hspace {3pt} u \left (0\right )=2 \\ {} & {} & 2=c_{1} +\frac {12096}{15877} \\ {} & \circ & \textrm {Compute derivative of the solution}\hspace {3pt} \\ {} & {} & u^{\prime }=-\frac {c_{1} {\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )}{16}-\frac {c_{1} {\mathrm e}^{-\frac {t}{16}} \sqrt {1023}\, \sin \left (\frac {\sqrt {1023}\, t}{16}\right )}{16}-\frac {{\mathrm e}^{-\frac {t}{16}} c_{2} \sin \left (\frac {\sqrt {1023}\, t}{16}\right )}{16}+\frac {{\mathrm e}^{-\frac {t}{16}} c_{2} \sqrt {1023}\, \cos \left (\frac {\sqrt {1023}\, t}{16}\right )}{16}-\frac {3024 \sin \left (\frac {t}{4}\right )}{15877}+\frac {24 \cos \left (\frac {t}{4}\right )}{15877} \\ {} & \circ & \textrm {Use the initial condition}\hspace {3pt} u^{\prime }{\raise{-0.36em}{\Big |}}{\mstack {}{_{\left \{t \hiderel {=}0\right \}}}}=0 \\ {} & {} & 0=-\frac {c_{1}}{16}+\frac {\sqrt {1023}\, c_{2}}{16}+\frac {24}{15877} \\ {} & \circ & \textrm {Solve for}\hspace {3pt} c_{1} \hspace {3pt}\textrm {and}\hspace {3pt} c_{2} \\ {} & {} & \left \{c_{1} =\frac {19658}{15877}, c_{2} =\frac {19274 \sqrt {1023}}{16242171}\right \} \\ {} & \circ & \textrm {Substitute constant values into general solution and simplify}\hspace {3pt} \\ {} & {} & u=\frac {19658 \,{\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )}{15877}+\frac {19274 \,{\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \sqrt {1023}}{16242171}+\frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877} \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & u=\frac {19658 \,{\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )}{15877}+\frac {19274 \,{\mathrm e}^{-\frac {t}{16}} \sin \left (\frac {\sqrt {1023}\, t}{16}\right ) \sqrt {1023}}{16242171}+\frac {12096 \cos \left (\frac {t}{4}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877} \end {array} \]
Maple trace
✓ Solution by Maple
Time used: 0.031 (sec). Leaf size: 46
\[
u \left (t \right ) = \frac {19274 \,{\mathrm e}^{-\frac {t}{16}} \sqrt {1023}\, \sin \left (\frac {\sqrt {1023}\, t}{16}\right )}{16242171}+\frac {19658 \,{\mathrm e}^{-\frac {t}{16}} \cos \left (\frac {\sqrt {1023}\, t}{16}\right )}{15877}+\frac {96 \sin \left (\frac {t}{4}\right )}{15877}+\frac {12096 \cos \left (\frac {t}{4}\right )}{15877}
\]
✓ Solution by Mathematica
Time used: 0.039 (sec). Leaf size: 71
\[
u(t)\to \frac {32 \left (1023 \sin \left (\frac {t}{4}\right )-130 \sqrt {1023} e^{-t/16} \sin \left (\frac {\sqrt {1023} t}{16}\right )+128898 \cos \left (\frac {t}{4}\right )-128898 e^{-t/16} \cos \left (\frac {\sqrt {1023} t}{16}\right )\right )}{5414057}
\]
12.1.2 Solving as second order linear constant coeff ode
12.1.3 Solving using Kovacic algorithm
12.1.4 Maple step by step solution
`Methods for second order ODEs:
--- Trying classification methods ---
trying a quadrature
trying high order exact linear fully integrable
trying differential order: 2; linear nonhomogeneous with symmetry [0,1]
trying a double symmetry of the form [xi=0, eta=F(x)]
-> Try solving first the homogeneous part of the ODE
checking if the LODE has constant coefficients
<- constant coefficients successful
<- solving first the homogeneous part of the ODE successful`
dsolve([diff(u(t),t$2)+125/1000*diff(u(t),t)+4*u(t) = 3*cos(t/4),u(0) = 2, D(u)(0) = 0],u(t), singsol=all)
DSolve[{u''[t]+125/1000*u'[t]+4*u[t] ==3*Cos[t/4],{u[0]==0,u'[0]==0}},u[t],t,IncludeSingularSolutions -> True]