Fourier Series - Integration

153 Views Asked by At

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

There are 2 best solutions below

2
On BEST ANSWER

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.

2
On

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.