Problem
Consider the following recurrence equation: $$y[n+2]+ \frac{1}{4}y[n] = \cos(n \frac{\pi}{3})$$ $$\text{Where }y[0] = y[1] = 0$$ $$\text{What is }y[n]?$$
My attempt
Using $Z$ transform for left and right side of the recurrence equation we get: $$Z(y[n+2]+ \frac{1}{4}y[n] = \cos(n \frac{\pi}{3}))$$ $$\implies Y(z)(z^2 + \frac{1}{4}) = \frac{z(z-\frac{1}{2})}{(z-\frac{1}{2})^2 + \frac{3}{4}}$$ $$\iff$$ $$Y(z) = \frac{z(z-\frac{1}{2})}{((z-\frac{1}{2})^2 + \frac{3}{4})(z^2 + \frac{1}{4})}$$ And now I have come to the conclusion that there must be another way of solving this, it is practically impossible to manually with a pen and paper solve for $y[n]$. We don't even get a nice function when using the "InverseZTransform" function in Mathematica.
Help with a new perspective on the problem?
Sorry that it took a while for me to answer, but I did manage to solve it. I think I made it a lot trickier than it was.
Posting the answer before asking another question on this site, seems quite fair to the community.
So we have: $$Y(z) = \frac{z(z-\frac{1}{2})}{((z-\frac{1}{2})^2 + \frac{3}{4})(z^2 + \frac{1}{4})}$$ $$\implies$$ $$\frac{Y(z)}{z} = \frac{4z-2}{((z-\frac{1}{2})^2+\frac{3}{4})(4z^2+1)}$$ $$\iff$$ $$\frac{Y(z)}{z} = \frac{4z}{(z^2-z+1)(4z^2+1)}-\frac{2}{(z^2-z+1)(4z^2+1)}$$
$$\text{Partial fraction decomposition on both terms gives}$$ $$\frac{Y(z)}{z} = \frac{1}{13}(8\frac{2z-5}{4z^2+1} -2\frac{2z-7}{((z-\frac{1}{2})^2+\frac{3}{4})})$$ $$\implies$$ $$Y(z) = \frac{1}{13}(8\frac{2z^2-5z}{4z^2+1} -2\frac{2z^2-7z}{((z-\frac{1}{2})^2+\frac{3}{4})})$$
Divide and conquer, working on both the fractional terms in the parenthesis, let the first term be (1), and second (2)
$$\implies$$ $$(1) \implies \frac{8}{13}\frac{2z^2-5z}{4z^2+1} = \frac{8}{26}(\frac{z(z-0)}{(z-0)^2+(\frac{1}{2})^2}-\frac{5}{2}*2\frac{\frac{1}{2}}{(z-0)^2+(\frac{1}{2})^2})$$
Using the same method as above, we divide and conquer on the second part aswell and look for the z-transform on the table
$$(2) \implies -2(2\frac{z^2}{(z-\frac{1}{2})^2+\frac{3}{4}}-7\frac{z}{(z-(\frac{1}{2})^2)+\frac{3}{4}})$$
As of now my motivation to keep entering these in TeX commands is fading, so I'll just go straight to the point. Everything is now laid perfectly, simplified as much as needed, maybe a little bit too much as well. Now just look at the Z-Transform table and see that you'll get:
$$y[n] = \frac{4}{13}((\frac{1}{2})^n(cos[n\frac{\pi}{2}]-5sin[n\frac{\pi}{2}])-\frac{4}{13}(cos[n\frac{\pi}{3}]-2\sqrt{3}sin[n\frac{\pi}{3}])$$ Where we see the transient and stationary bit of the functions, the first term being the transient bit, and the second is the stationary bit of the function.