0

Im suposed to find the fouries coeffisient from the expression:

$$f(x) = 5-4cos(2x)-2sin(5x)+5cos(8x)$$

I do understand that a_0 will be 5, but I struggle to find a_n and b_n. I looked at the solutionsheet from my professor, but i dont quite see/ understand the mindset behind finding the coeffisients:

enter image description here

  1. I dont understand how i can see that f(x) has the period 2\pi
  2. I do not undertand how he found a_n and b_n
Lisa
  • 45
  • 6
  • 1
    He found $a_n,b_n$ by carrying out the integrals… – Chris Jul 16 '22 at 18:57
  • okay, so he just plot in f(x) in the integral? but i dont know what he means by saying using the orthogonality property of trigonometric system – Lisa Jul 16 '22 at 19:05
  • @Lisa yes he just integrates $f(x)$ directly to get the coefficients. See my answer below to see how the coefficients are derived. – aleden Jul 16 '22 at 21:19
  • The function $f$ is already in the form of a Fourier series as it is just a sum of sines and cosines. If \begin{align} 5 - 4 \cos 2 x - 2 \sin 5x + 5 \cos 8x &= f(x) \ &= \sum_{n = 0}^{\infty} a_{n} \cos(n x) + b_{n} \sin(n x) \ &= a_{0} + a_{1} \cos x + b_{1} \sin x + a_{2} \cos 2x + b_{2} \sin 2x + \dots \end{align} then to get the coefficients you can just equate the two sides and read them off directly. – Matthew Cassell Jul 16 '22 at 21:31

1 Answers1

1

We recall that the Fourier Series of a function with period $2\pi$ is defined as

$$f(x)=a_0 +\sum_{n=1}^\infty a_n \cos(nx)+\sum_{n=1}^\infty b_n\sin(nx)$$

An amazing property of trigonometric functions is orthogonality which means that

$$ \frac{1}{\pi}\int_{-\pi}^\pi \cos(kx)dx=0$$ $$ \frac{1}{\pi}\int_{-\pi}^\pi \sin(kx)dx=0$$ $$\frac{1}{\pi}\int_{-\pi}^\pi \sin(nx)\cos(kx)dx=\frac{1}{\pi}\int_{-\pi}^\pi \sin(kx)\cos(nx)dx=0$$

If $n\ne k$ $$ \frac{1}{\pi}\int_{-\pi}^\pi \cos(nx)\cos(kx)dx=0$$

$$ \frac{1}{\pi}\int_{-\pi}^\pi \sin(nx)\sin(kx)dx=0$$

and if $n=k$

$$\frac{1}{\pi}\int_{-\pi}^\pi \cos(nx)\cos(nx)dx=1 $$ $$ \frac{1}{\pi}\int_{-\pi}^\pi \sin(nx)\sin(nx)dx=1$$ Where $n,k$ are integers greater than or equal to $0$.

Now let us integrate both sides of the Fourier Series such that

$$\frac{1}{\pi}\int_{-\pi}^\pi f(x)\cos(kx)dx=\frac{1}{\pi}\int_{-\pi}^\pi \left( a_0 +\sum_{n=1}^\infty a_n \cos(nx)+\sum_{n=1}^\infty b_n\sin(nx)\right)\cos(kx)dx=\frac{1}{\pi}\int_{-\pi}^\pi a_0\cos(kx)dx+\sum_{n=1}^\infty a_n\frac{1}{\pi}\int_{-\pi}^\pi \cos(nx)\cos(kx)dx+\sum_{n=1}^\infty b_n\frac{1}{\pi}\int_{-\pi}^\pi \sin(nx)\cos(kx)dx$$

We see from the previous identities that most of the integrals are wiped out leaving only

$$ \frac{1}{\pi} \int_{-\pi}^\pi f(x)\cos(kx)dx=\sum_{n=1}^\infty a_n\frac{1}{\pi}\int_{-\pi}^\pi \cos(nx)\cos(kx)dx$$

For the right hand side, because of orthogonality most of the terms of the series go to zero and the only term left is when $n=k$ so

$$ \frac{1}{\pi}\int_{-\pi}^\pi f(x)\cos(kx)dx=\sum_{n=1}^\infty a_n\frac{1}{\pi}\int_{-\pi}^\pi \cos(nx)\cos(kx)dx=a_k\frac{1}{\pi}\int_{-\pi}^\pi \cos(kx)\cos(kx)dx=a_k$$ So now we have a formula for the coefficients $a_n$. Then integrating both sides of the Fourier Series such

$$ \frac{1}{\pi}\int_{-\pi}^\pi f(x)\sin(kx)dx=\frac{1}{\pi}\int_{-\pi}^\pi \left( a_0 +\sum_{n=1}^\infty a_n \cos(nx)+\sum_{n=1}^\infty b_n\sin(nx)\right)\sin(kx)dx=\sum_{n=1}^\infty b_n\frac{1}{\pi}\int_{-\pi}^\pi \sin(nx)\sin(kx)dx=b_k\frac{1}{\pi}\int_{-\pi}^\pi \sin(kx)\sin(kx)dx=b_k$$

Then finally integrating both sides from $-\pi$ to $\pi$ we get

$$\frac{1}{2\pi} \int_{-\pi}^\pi f(x)dx=\frac{1}{2\pi}\int_{-\pi}^\pi a_0 dx=a_0$$

Hopefully this gives you a sense of where the formulas for the Fourier Coefficients come from and you can make use of them for your problem. Also since $f(x)$ is made up of sines and cosines its period must be some multiple of $2\pi$ but since the only factor between $2$, $5$, and $8$ is $1$ then its period must be $2\pi$.

aleden
  • 4,007