Recurrence Relation: $a_{n+2}+a_n=5\cos (n\pi/3)-7\sin(n\pi/4)$ Recurrence Relation: $a_{n+2}+a_n=5\cos \left(\frac{n\pi}{3}\right)-7\sin\left(\frac{n\pi}{4}\right)$
Attempt:
The solution of the associated homogeneous relation is
\begin{align}
a_n^{(h)}&=c_1\left(\cos \left(\frac{n\pi}{2}\right)+i\sin \left(\frac{n\pi}{2}\right)\right)+c_2\left(\cos \left(\frac{n\pi}{2}\right)-i\sin \left(\frac{n\pi}{2}\right)\right)\\ &=k_1\cos \left(\frac{n\pi}{2}\right)+k_2\sin \left(\frac{n\pi}{2}\right)
\end{align}
where $k_1=c_1+c_2$ and $k_2=(c_1-c_2)i$
then
\begin{align*}
a_n^{(p)} = A\cos \left( \frac{n\pi}{3} \right)+B\sin \left( \frac{n\pi}{3} \right) +C \cos \left( \frac{n\pi}{4} \right)+D\sin \left( \frac{n\pi}{4} \right)
\end{align*}
is the particular solution. The four constants $A, B, C, D$ can be calculated by substituting $a_n^{(p)}$ in the given non-homogeneous recurrence relation. But I find it difficult to calculate.

Here is our road map:
First we find a particular solution $p_n$, then a complementary solution $f_n$. Set
$a_n = f_n + p_n $, we are done.

It is easy to find a particular solution $p_n$.
For example, set $a_0$ = 0, $a_1$= 1 we get, for n = 2, 3, 4
$p_n$" />
To find the complete solution, we find the complementary function
$f_n$ from the solution of
$x^2$ + 1 = 0.
Its solutions are x= -i or i.
Thus we have $f_n$ = $C_1$ cos nπ/2 + $C_2$sin nπ/2
and $a_n$ = $f_n$ + $p_n$ = $C_1 cos nπ/2 + C_2 sin nπ/2 + p_n$
