0

Could someone explain where I am going wrong with the following fourier series calculation please?

I'm trying to compute the $A_{0}$ and $A_{n}$ coefficients for the fourier series: \begin{align} 1+0.3\cos(4\pi x) = A_{0} + \sum_{r=1}^{\infty}A_{r}\cos(r\pi x) \quad 0\le x \le 1 \end{align}

I have extended the interval to $[-1,1]$ (hence $\tau=2$) to make the function periodic and even and then computed $A_{0}$ as follows: \begin{align} A_{0} &= \frac{2}{\tau} \int_{0}^{\tau/2} f(x) dx\\ &= \int_{0}^{1}(1+0.3\cos(4\pi x)) dx\\ &= \left[x-\tfrac{0.3}{4\pi}\sin(4\pi x) \right]_{0}^{1}\\ &= 1 \end{align}

On to $A_{n}$: \begin{align} A_{n} &= \frac{4}{\tau} \int_{0}^{\tau/2}(1+0.3\cos(4\pi x))\cos\left(\frac{2n\pi x}{\tau}\right) dx\\ &= 2 \int_{0}^{1} (1+0.3\cos(4\pi x))\cos(n\pi x) dx\\ &= 2\int_{0}^{1} \cos(n\pi x) dx + 2(0.3)\int_{0}^{1} \cos(4\pi x)\cos(n\pi x) dx\\ &= \frac{2}{n\pi}\left[\sin(n\pi x)\right]_{0}^{1} + 2(0.3)\int_{0}^{1} \cos(4\pi x)\cos(n\pi x) dx\\ &= 2(0.3)\left\{\left[\cos(4\pi x)\frac{\sin(n\pi x)}{n\pi}\right]_{0}^{1} + 4\pi\int_{0}^{1} \frac{\sin(n\pi x)}{n\pi}\sin(4\pi x) \right\}\\ &= 2(0.3)\left\{4\pi\int_{0}^{1} \frac{\sin(n\pi x)}{n\pi}\sin(4\pi x) \right\} \end{align}

I'm now stuck as I'm left with two $\sin$ terms. Could anyone offer assistance please?

Many thanks, John

  • 2
    Do you not see that this function is already developed on its Fourier series so just read the coefficients! –  Mar 18 '14 at 10:41
  • @sami-ben-romdhane Hi Sami, I did see that but it doesn't make sense in my mind. e.g. $A_1\cos(\pi x) + A_2\cos(2\pi x)$ etc. I want to be able to see how it becomes $0.3\cos(4\pi x)$. – John Smith Mar 18 '14 at 10:48
  • @JohnSmith Do you know Taylor series? What is the Taylor series of the infinitely differentiable function $x^3 + 2x + 3$? Did you have to use the formula $a_n = f^{(n)}(a)(x-a)^n/n!$ to calculate it? Now what can you say about the Fourier series of $4\cos(3\pi x) + 8\sin(6 \pi x) $? – snar Mar 18 '14 at 15:57

2 Answers2

1

If you will use a formula List_of_trigonometric_identities for sin(A)*sin(b), formula when you have 2 cases. first case n=4 you can find that integral by using a formula for sin^2(x). Second case n not= 4 you will get for all n zero. You will see that you already have the fourier series.

The infinite sum will become only one term.

user1
  • 172
  • 1
  • 10
  • Apologies, I'm not familiar with an identity which converts a product of sines into an addition of sine terms. What exactly are you referring to? Many thanks. – John Smith Mar 18 '14 at 11:56
  • @JohnSmith I fixed my answer . Hope it helps you find the coefficients $A_n$ – user1 Mar 18 '14 at 15:51
1

Better to attack the integral over the cosines as follows. First, consider the cosine addition formula:

$$\cos{(a + b)} = \cos{a} \cos{b} - \sin{a} \sin{b}$$ $$\cos{(a - b)} = \cos{a} \cos{b} + \sin{a} \sin{b}$$

$$\implies \cos{(a + b)} + \cos{(a - b)} = 2 \cos{a} \cos{b}$$

So...

$$\int_0^1 dx \, \cos{(4 \pi x)} \cos{(n \pi x)} = \frac12 \int_0^1 dx \, \cos{\left (n+4 \right )\pi x} +\frac12 \int_0^1 dx \, \cos{\left (n-4 \right )\pi x} $$

Note that $n \ge 1$. Thus, you may convince yourself that the first integral on the RHS is zero, and the second one is zero except when...

I think you can take it from here.

Ron Gordon
  • 138,521
  • Many thanks Ron. Very clear. Does this then mean the expression $1+0.3\cos(4\pi x)$ cannot be written in terms of an infinite sum? – John Smith Mar 18 '14 at 12:13
  • @JohnSmith: depend on what you mean by infinite sum. Really, the infinite sum is over a function that is zero except for a single value of the index. We call that a delta function, or a sifting function, which really just turns a sum or an integral into a function evaluated at a single point. But all this is a bit more complex than it needs to be. Just know that the integral over the cosines is zero except when $n=\cdots$. – Ron Gordon Mar 18 '14 at 12:37