# Determine spectrum amplitudes for half-wave rectified sine

I am trying to learn how to solve a bunch of digital signal problems and I have trouble understanding the solutions provided by this book I'm using. Basically, this problem asks me to determine spectrum amplitudes for half-wave rectified sine, as the title mentions. The signal looks like this:

The development in complex (exponential) Fourier series will be given by:

What properties are used to get to this answer? I don't get from where did the came from.

Full solution:

I was missing the red n. From that and using

solved it.

• @Downvoter, care to comment? – Tanatos Daniel Aug 17 '14 at 21:05
• @Downvoter was right, my question was incomplete and looked like I did not do any research effort. Also, I wasn't very specific about my problem. – Tanatos Daniel Aug 21 '14 at 7:53

You have to integrate by parts twice. Leaving out constants you have

$$\int_0^{T/2}\sin(\omega_0t)e^{-jn\omega_0t}dt=-\frac{\cos(\omega_0t)}{\omega_0}e^{-jn\omega_0t}\bigg|_0^{T/2}-jn\int_0^{T/2}\cos(\omega_0t)e^{-jn\omega_0t}dt$$

If you again perform integration by parts on the integral on the right-hand side of the above equation you get the final result:

$$\int_0^{T/2}\sin(\omega_0t)e^{-jn\omega_0t}dt=\frac{1+(-1)^n}{\omega_0}+n^2\int_0^{T/2}\sin(\omega_0t)e^{-jn\omega_0t}dt$$

If $I$ is the integral on the left-hand side you have

$$I=\frac{1+(-1)^n}{\omega_0}+n^2I$$

and finally

$$I=\frac{1+(-1)^n}{\omega_0(1-n^2)}$$

Note that you have to consider the case $n=1$ separately. Also note that you could also compute the coefficients $c_n$ by direct integration using $\sin(\omega_0t)=(e^{j\omega_0t}-e^{-j\omega_0t})/2j$.

• Updated my question with my actual problem. – Tanatos Daniel Aug 21 '14 at 7:53
• @TanatosDaniel: Your 'actual problem' is the same as before: you don't get the correct solution. My answer shows you in a quite detailed way how to arrive at this solution. Now it is up to you to work it out and try to understand it. The only thing you have to do is perform the integration by parts of the integral on the right-hand side of the first equation in my answer. If you just took a bit of time and concentration you should be able to do it. – Matt L. Aug 21 '14 at 8:44
• @TanatosDaniel: If you showed your efforts by explicitly writing out the steps that lead you to your solution, it would probably be relatively easy to find the error. – Matt L. Aug 21 '14 at 8:49
• Yes. That's right. I can't get the right solution and it's frustrating. I wrote all steps now. – Tanatos Daniel Aug 21 '14 at 9:44
• @TanatosDaniel: That's great news! – Matt L. Aug 21 '14 at 12:17