1) Please can my answers be checked, including my final Fourier series.

2) Is it possible to use Wolframalpha to check my answers? If so, how will I go about doing this?

Deduce the Fourier series for the following period waveform (the waveform is given for 1 period):

$$x(t)=\left\{ \begin{align} & 2\quad\quad\quad\quad,0<=t<=T/2 \\ & -1\quad\quad\quad, T/2<=t<=t \\ \end{align} \right.$$

My Answers:

$$x(t)=\left\{ \begin{align} & 2\quad\quad\quad\quad,0<=t<=1/2 \\ & -1\quad\quad\quad, 1/2<=t<=1 \\ \end{align} \right.$$

Calculated the 3 coefficients:

$$a_0 = 1$$ $$a_n = 0$$ $$b_n = \frac{1}{\pi.n}(2+cos\pi.n -3(-1)^2)$$

The final Fourier Series:

$$x(t)=\frac{1}{2} +\frac{1}{\pi}[(5+cos2\pi)sin(2\pi.t) + \frac{(6+cos6\pi).sin(6\pi.t)}{3} + ...] + \frac{1}{\pi}[\frac{(cos4\pi -1).sin(4\pi.t)}{2} + \frac{(cos8\pi-1).sin(8\pi.t)}{4} +...]$$

  • $\begingroup$ Simplify the constant sines/cosines ! $\endgroup$ – Yves Daoust Jul 10 '16 at 8:46

Except for the constant term (indeed $\frac12$), this is a so-called square waveform, the transform of which is well-know.

See http://mathworld.wolfram.com/FourierSeriesSquareWave.html or https://en.wikipedia.org/wiki/Square_wave.


For convenience, we first deduce the mean value


Then the function is odd, so there will be sine terms only, and by symmetry we can integrate on a half period

$$b_n=2\int_0^{1/2}\frac32\sin(2\pi nt)\,dt=-\left.\frac 3{2\pi n}\cos(2\pi nt)\right|_0^{1/2}=-3\frac{\cos(\pi n)-1}{2\pi n}.$$

Only the terms for odd $n$ are nonzero and


  • $\begingroup$ Hi Yves, i'm a little confused. what is the formula that I will have to use for $$a_0$$ and the other coefficients? I thought $$a_0 = 1$$ $\endgroup$ – joe Jul 10 '16 at 9:25
  • $\begingroup$ @joe: depends on your exact defintion of $a_0$. $\endgroup$ – Yves Daoust Jul 10 '16 at 9:28
  • $\begingroup$ thanks Sir, so in this case what I did is totally incorrect? Or I should use another formula to for for each coefficient? $\endgroup$ – joe Jul 10 '16 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.