A non-homogeneous second order differential equation

ordinary differential equations

Below is a problem from the book Differential Equations written by K.A. Stroud and Dexter Booth. It can be found on
page 65 of the book. My answer matches the book's answer but I am not sure I did it correctly, especially the last part.
Thanks,
Bob

Problem:
Obtain the general solution of the equation
$$ \frac{d^2y}{dt^2} + 4\frac{dy}{dt} + 5y = 6 \sin t$$
and determine the amplitude and frequency of the steady-state function.
Answer:
Our approach is to find $y_c$ which is the complimentary solution and then find $y_p$ which is the particular
solution. Then our solution will be $y = y_c + y_p$. We have the following characteristic equation:
$$ m^2 + 4m – 5 = 0 $$
We then solve it by applying the quadratic formula.
\begin{align*}
m &= \frac{-4 \pm \sqrt{16-4(1)(5)}}{2(1)} = \frac{-4 \pm \sqrt{16-20}}{2} \\
m &= \frac{-4 \pm \sqrt{-4}}{2} \\
m &= -2 \pm i \\
y_c &= e^{-2t}(C_1 \cos t + C_2 \sin t) \\
\end{align*}

\begin{align*}
y_p &= A \sin t + B \cos t \\
y'_p &= A \cos t – B \sin t \\
y''_p &= -A \sin t – B \cos t \\
\end{align*}

\begin{align*}
-A \sin t – B \cos t + 4( A \cos t – B \sin t ) + 5( A \sin t + B \cos t ) &= 6 \sin t \\
-A \sin t – B \cos t + 4A \cos t – 4B \sin t + 5A \sin t + 5B \cos t &= 6 \sin t \\
4A \sin t – B \cos t + 4A \cos t – 4B \sin t + 5B \cos t &= 6 \sin t \\
\end{align*}

Now we solve for $A$ and $B$.
\begin{align*}
4A – 4B &= 6 \\
-B + 4A + 5B &= 0 \\
4A + 4B &= 0 \\
A &= -B \\
4(-B) – 4B &= B \\
-8B &= 6 \\
B &= -\frac{3}{4} \\
A &= \frac{3}{4} \\
y_c &= \frac{3}{4} \sin t – \frac{3}{4} \cos t \\
\end{align*}

Hence the solution we seek is:
$$ y = e^{-2t}(C_1 \cos x + C_2 \sin x) + \frac{3}{4} \sin t – \frac{3}{4} \cos t $$
Now the problem asks for the amplitude of the steady-state function. Observe that:
$$ \lim_{t \rightarrow \infty} y = \frac{3}{4} \sin t – \frac{3}{4} \cos t$$
Let $y_1 = \frac{3}{4} \sin t – \frac{3}{4} \cos t$.
To find the amplitude, I want to find the minimum and maximum of $y_1$.
\begin{align*}
y'_1 &= \frac{3}{4} \cos t + \frac{3}{4} \sin t = 0 \\
\cos t + \sin t &= 0 \\
\cos t + \sqrt{ 1 – \cos^2{t} } &= 0 \\
\cos t &= – \sqrt{ 1 – \cos^2 t } \\
\cos ^2 t &= 1 – \cos^2 t \\
2 \cos^2 t &= 1 \\
\cos t &= \pm \frac{ \sqrt{2} } {2} \\
% t &= \pm \frac{\pi}{4} \\
% y_1( \frac{\pi}{4} ) &= \frac{3}{4} \sin{ \frac{\pi}{4} } – \frac{3}{4} \cos { \frac{\pi}{4} } \\
% y_1( \frac{\pi}{4} ) &= \frac{3 \sqrt{2}}{4(2)} – \frac{3 \sqrt{2} }{4(2)} \\
% y_1( -\frac{\pi}{4} ) &= \frac{3}{4} \sin{ fixme } – \frac{3}{4} \cos { fixme } \\
\end{align*}

Now we need to consider the following four values for $t$ to find the maximum and minimum of $y$:
$$ \frac{\pi}{4} \, , \, \frac{3\pi}{4} \, , \, \frac{5\pi}{4} \, , \, -\frac{\pi}{4} $$
\begin{align*}
y_1 \left( \frac{\pi}{4} \right) &= \frac{3}{4} \sin{ \frac{\pi}{4} } – \frac{3}{4} \cos { \frac{\pi}{4} } \\
y_1 \left( \frac{\pi}{4} \right) &= \frac{3 \sqrt{2}}{4(2)} – \frac{3 \sqrt{2} }{4(2)} = 0 \\
%
y_1 \left( \frac{3\pi}{4} \right) &= \frac{3}{4} \sin{ \frac{3\pi}{4} } – \frac{3}{4} \cos { \frac{3\pi}{4} } \\
y_1 \left( \frac{3\pi}{4} \right) &= \frac{3 \sqrt{2}}{4(2)} – \frac{-3 \sqrt{2} }{4(2)} \\
y_1 \left( \frac{3\pi}{4} \right) &= \frac{3 \sqrt{2}}{4(2)} + \frac{3 \sqrt{2} }{4(2)} = \frac{3\sqrt{2}}{4 } \\
%
y_1 \left( \frac{5\pi}{4} \right) &= \frac{3}{4} \sin{ \frac{5\pi}{4} } – \frac{3}{4} \cos { \frac{5\pi}{4} } \\
y_1 \left( \frac{5\pi}{4} \right) &= -\frac{3 \sqrt{2}}{4(2)} – \frac{-3 \sqrt{2} }{4(2)} \\
y_1 \left( \frac{5\pi}{4} \right) &= 0 \\
%
y_1 \left( -\frac{\pi}{4} \right) &= \frac{3}{4} \sin{ -\frac{\pi}{4} } – \frac{3}{4} \cos { -\frac{\pi}{4} } \\
y_1 \left( -\frac{\pi}{4} \right) &= \frac{-3 \sqrt{2}}{4(2)} – \frac{3 \sqrt{2} }{4(2)} \\
y_1 \left( -\frac{\pi}{4} \right) &= -\frac{3\sqrt{2}}{4 } \\
\end{align*}

Hence, we have a minimum at $t = -\frac{\pi}{4}$ and a maximum at $t = \frac{3\pi}{4}$. The amplitude is one half of the difference of the function at its maximum and the value of the function at its minimum. In this case the amplitude is:
$$ \frac{ 3\sqrt{2} }{4} $$

Now we need to find the frequency of the function $y_1$. The period of both $\sin$ and $\cos$ is both $ 2\pi $. Our function
is the difference of two functions with a period of $ 2 \pi $. Therefore the period of $y_1$ is
$$ \frac{1}{2 \pi}$$

Best Answer

You're overthinking it

$$ y_\infty (t) = \frac34 (\sin t - \cos t) = \frac{3}{2\sqrt{2}}\left(\frac{1}{\sqrt 2}\sin t - \frac{1}{\sqrt 2}\cos t \right) = \frac{3}{2\sqrt 2}\sin\left(t - \frac{\pi}{4} \right) $$

So the amplitude of the steady-state is $\frac{3}{2\sqrt 2}$. In general, you may use

$$ A\sin t + B\cos t = \sqrt{A^2+B^2}\left(\cos\phi\sin t +\sin\phi\cos t\right) = \sqrt{A^2+B^2}\sin\left(t + \phi\right) $$

where $\cos\phi = \frac{A}{\sqrt{A^2+B^2}}$ and $\sin \phi = \frac{B}{\sqrt{A^2+B^2}}$

The amplitude/frequency is straightforward.