I have a question that gives me a periodic function $f(x)$ and asks me to find the complex Fourier series (which I think I have done correctly) and then asks me to obtain from that the regular Fourier series. I assume by 'regular' it just means real. I have no idea how to turn this complex series into a real series. I worked out what the real series should be by using Euler's formulae but that isn't obtaining it using the complex series (like the question asks).
The initial $f(x)$ given is: $$f(x) = \begin{cases} 0 & -\pi < x \leq 0\\ x & 0 < x < \pi \end{cases}$$
The complex Fourier series I found is:
$$f(x) = \frac{\pi}{4} + \sum_{n = -\infty}^{\infty}\frac{1}{2\pi n^2}\left(1-\frac{n\pi}{i} - e^{inx}\right)$$
The 'regular' series I found is:
$$f(x) = \frac{\pi}{4} +\sum_{n=1}^{\infty}\frac{1}{\pi n^2}((-1)^{n}-1)\cos(nx)-\frac{1}{n}(-1)^n\sin(nx)$$
How do I get from the complex Fourier series to the regular series?
(Sorry I couldn't get nice formatting done above)