I have the following function that I want to express using trigonometric functions:
$$f(x) = \frac{1}{2}\left(\frac{2i+2}{2i+1}e^{ix} + \frac{-2i+2}{-2i+1}e^{-ix}\right)$$
I have come so far as:
$$f(x) = \frac{1}{2}\left(\frac{2i+2}{2i+1}(\cos{x} + i\sin{x}) + \frac{-2i+2}{-2i+1}(\cos{x} - i\sin{x})\right)$$
But any simplification I do from here on just complicates things. The answer should only contain one sinus and one cosinus. I can see in the original expression that it is almost a cosinus since $\cos{x} = \frac{1}{2}(e^{ix}+e^{-ix})$ but I cannot seem to shake off those boring factors.
Note that $f''(x)=-f(x)$. So your function is indeed a linear combination $a\cos(x)+b\sin(x)$. Now find $a$ and $b$ by evaluating $f(0)$ and $f'(0)$.