So I have a problem that says "Consider a triangle wave that goes from a minimum value of O volts to a maximum value of V. It has a period T, and is a maximum value at t = 0". And I want to show that $c_n = \frac {a_n}{2} $.
I calculated $a_n = \frac {2V}{\pi^2n^2} ( 1 - (-1)^n)$, which I assume is accurate.
However, solving for $c_n$ I set up the integral as 2 times one leg of the triangle:
$$c_n=2 \frac 1T \int_0^\frac T2 \frac {2V}{T}t e^{\frac {-2\pi int}{T}}\, dt $$
And, after much simplification, I get:
$$c_n = \frac {\cos({\pi n}) (V\pi in - V) -V}{\pi^2 n^2}$$
This appears overwhelmingly far from $\frac {a_n}{2}$, theres even an imaginary part!. Did I make an obvious mistake in my set-up, or is there a way to simplify my expression for $c_n$?