I'm trying to solve the following problem:
i) Write the complex Fourier series of the function below in the interval $[0,2\pi)$
$f(x) = \lbrace 1, 0\leq x< h$ and $0, h\leq x < 2\pi \rbrace$
where $h$ is a constant.
ii) Show that it is possible to write the series with functions and real coefficientes:
$Sf(x)=\frac{h}{2\pi} + \frac{1}{\pi}\sum_{n=1}^\infty \frac{1}{n}\{sin[n(h-x)]+sin(nx)\}$
So, my answers:
i) $c_{0}=a_{0}/2=\frac{1}{\pi}\int_{0}^{2\pi} {f(x)dx}=\frac{h}{2\pi}$
$c_{n}=\frac{1}{\pi}\int_{0}^{2\pi} {f(x)exp(-inx)dx}=\frac{-exp(-{inh})}{in\pi}$
$\Rightarrow f(x)=\frac{h}{2\pi}+\frac{i}{\pi}\sum_{n=1}^\infty \frac{1}{n}{exp(in(h-x))}$
ii) So, by using $f(x)$ from (i)
$Re(\frac{i}{\pi}\sum_{n=1}^\infty \frac{1}{n}{exp(in(h-x))})=
\frac{-1}{\pi}\sum_{n=1}^\infty (1/n)\{sin(nh)cos(-nx)-sin(nx)cos(hn)\}$
What I did above was: $exp(in(h-x))=cos(n(h-x))+isin(n(h-x))$
Multipling it by $i \Rightarrow icos(n(h-x)-sin(n(h-x))$ and the real part of it is $-sin(n(h-x))$.
I don't really understand how to find the partial sum or what I'm doing wrong here. Any advice?
Sorry for posting an image with portuguese text, but I don't think this will be a problem to understand the solution. There is just a minus signal somewhere that I have to change.