A linear system is defined by the differential equation:
$$ y''(t) + 4y'(t) + 25y(t)= x(t) $$
The transfer function of this system is:
$$ H(f) = \frac{Y(f)}{X(f)}= \frac{1}{(2\pi fj)^{2}+ 4(2\pi fj)+ 25} $$
The question asked to find the output y(t) when the input x(t) is $$ cos(4t + \frac{\pi }{4}) $$
First, I found the Fourier Transform of x(t) which equals:
$$ X(f) =\left [ \frac{1}{2}\delta (f - \frac{2}{\pi}) + \frac{1}{2}\delta (f + \frac{2}{\pi}) \right ]e^{j\frac{\pi^{2}}{2}f} $$
I know that the Inverse Fourier Transform of
$$ G(f)\delta(f - f_{0}) \Leftrightarrow G(f_{0})e^{2 \pi f_{0}jt} $$ $$ G(f)\delta(f + f_{0}) \Leftrightarrow G(-f_{0})e^{-2 \pi f_{0}jt} $$
Therefore my y(t) would be equal to:
$$ y(t) = \frac{1}{2}\left [ \frac{e^{\pi j}}{(4j)^{2} + (16j) + 25} \right ]e^{j4t} + \frac{1}{2}\left [ \frac{e^{-\pi j}}{(-4j)^{2} - (16j) + 25} \right ]e^{-j4t}$$
$$ = \frac{e^{\pi j}}{32j + 18}e^{j4t}+\frac{e^{-\pi j}}{- 32j + 18}e^{-j4t} $$
What do you think about my solution?
Update: I'm still not satisfied with $e^{\pm \pi j}$
$$ \cos(4t + \pi/4) = \frac{e^{j(4t + \pi/4)} + e^{-j(4t + \pi/4)}}{2} = U + U^*\\ \text{ where } U = \frac{e^{j \pi/4}}{2} e^{j 4t}$$ Hence $$ Y = V + V^* \text{ where } V = \frac{e^{j \pi/4}}{2} H(j4)e^{j 4t}$$ by basic properties of Fourier transforms and transfer functions.
Finally, if you want the answer in trigonometric functions then write $H$ in polar form as $$ H(j4) = M e^{j \phi} $$ Then $$ y(t) = M \cos({4t + \pi/4 + \phi}) $$