How to setup Fourier series for a function?

53 Views Asked by At

I am given a function which is: $$f(x)=x^3+\sin x$$

The interval is: $$(-π,π)$$

Fourier series is defined by:

$$ f(x)=\frac{a_{0}}{2}+\sum \limits_{n=1}^{\infty}(a_{n}\cos(nx)+b_{n}\sin(nx)) $$

I know the basics such as how to find $$a_{n}$$ and $$b_{n}$$, but I don't know how to find $$a_{0}$$ I am not given exact task on what to do so that's why my title is weird. All it is saying is setup Fourier series for this function in a given interval.

1

There are 1 best solutions below

0
On BEST ANSWER

One of the basic principles of Fourier series is that you're projecting the function onto an orthogonal basis. That is, the integral of any term times another term should be zero. So if you have $f(x) = \frac{a_0}2+\sum_{n=1}^{\infty}(a_n\cos(nx)+b_n\sin(nx))$, then $\int \frac{a_0}2 a_n\cos(nx) dx$ and $\int \frac{a_0}2 b_n\sin(nx) dx$ should be $0$ for any $n$. Thus, $\int \frac{a_0}2 \sum_{n=1}^{\infty}(a_n\cos(nx)+b_n\sin(nx)) dx$ will also be zero. So $\int \frac{a_0}2 f(x) dx = \int \frac{a_0}2 \left[\frac{a_0}2 \sum_{n=1}^{\infty}(a_n\cos(nx)+b_n\sin(nx))\right] dx = \int \frac{a_0}2 f(x) dx = \int \frac{a_0}2 \left[\frac{a_0}2\right]dx$. We can factor out a $\frac {a_0}2 $ from both sides, giving $\int f(x) dx = \int \frac{a_0}2dx$. Over the interval $(-\pi, \pi)$, $ \int \frac{a_0}2dx = a_0 \pi$. So $a_o = \frac{ \int f(x) dx }{\pi}$