Calculating $a_0$ in Fourier Series

1.5k Views Asked by At

enter image description here

I am using this YouTube video to learn Fourier Series. The question can be clearly seen in the picture. The instructor calculates $a_0$ as the area under the triangle which is fine. Nothing wrong with it, I get it.

However, I was trying to calculate is as a sum of integration as:
$$ a_0 = \frac{1}{2\pi}[\int_{-\pi}^{0}f(x)dx + \int_{0}^{\pi}f(x)dx] $$

However, I am unable to get the right answer. I get my answer as $\frac{1}{4}$

Can someone please tell me what is going wrong?

2

There are 2 best solutions below

2
On BEST ANSWER

The first integral is zero (which follows from the definition of $f$). The second integral is $x^2/2$ (again using the definition of $f$) evaluated at $\pi$, so $\ldots$

4
On

$$a_0 = 0 + \frac{1}{2 \pi} \int_0^{\pi} dx \, x = \frac{1}{2 \pi} \frac12 \pi^2 = \frac{\pi}{4}$$