Fourier series Coefficients and Wolfram Alpha

1.3k Views Asked by At

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

2) Is it possible to use Wolfram Alpha 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):

\begin{align} x(t) = \begin{cases} 2 & 0 \leq t \leq \frac{T}{2} \\ -1 & \frac{T}{2} < t \leq T \end{cases} \end{align}

My Answers: \begin{align} x(t) = \begin{cases} 2 & 0 \leq t \leq \frac{1}{2} \\ -1 & \frac{1}{2} < t \leq 1 \end{cases} \end{align}

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} + \cdots] + \frac{1}{\pi}[\frac{(\cos4\pi -1) \, \sin(4\pi \, t)}{2} + \frac{(\cos8\pi - 1) \, \sin(8\pi \, t)}{4} + \cdots]$$

2

There are 2 best solutions below

0
On

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.

3
On

For convenience, we first deduce the mean value

$$a_0=\int_0^{1/2}2\,dt-\int_{1/2}^1dt=\frac12.$$

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

$$b_{2m+1}=\frac3{\pi(2m+1)}.$$