Let $n\in\mathbb{N}$ such that $f_n(z)$ is a complex function series which is defined by:
$$f_n(z)=\frac 12\sum_{k=1}^{n}\cos(kiz)$$
For every $f_n(z)$ we will define the integral $I_n$ such that:
$$I_n=\int_\gamma zf_n(z)\ dz$$
When $\gamma(t)=\frac \pi 2(e^{-it}-1)$ such that $\ t\in\left[-\frac \pi 2, \frac \pi 2\right]$.
Prove that for every $n\in\mathbb{N}$, $I_n$ is given by:
$$I_n=\sum_{k=1}^{\lfloor{\frac{n+1}{2}}\rfloor}\frac{1}{(2k-1)^2}$$
When it comes to complex analysis I make efforts to solve the problems alone since I enjoy the challenges, but this one got me. I don't really know how to start.
Thanks!
I figured it out: the given curve is half a circle, and it can be replaced by an easier curve (a segment on the imaginary axis) with the same start and end points because the given integrand is analytic. Replacing the curve and remembering that the order of integrating and summing can be replaced (as $n$ is finite) led me to the answer.