Fourier series expansion

503 Views Asked by At

I know that Fourier series for f(x) is $$f(x)=A_o+\sum_{n=1}^{ \infty} (A_n cos(n\pi x/L)+B_n sin(n\pi x/L) ) $$ where $$A_o=\frac{1}{2L} \int_{-L}^{L} f(x) dx$$ $$A_n=\frac{1}{L} \int_{-L}^{L} f(x) cos(n\pi x/L)dx$$ $$B_n=\frac{1}{L} \int_{-L}^{L} f(x) sin(n\pi x/L)dx$$ But sometimes I found problems solved using integration from 0 to 2L instead of integration from -L to L : $$A_o=\frac{1}{2L} \int_{0}^{2L} f(x) dx$$ $$A_n=\frac{1}{L} \int_{0}^{2L} f(x) cos(n\pi x/L)dx$$ $$B_n=\frac{1}{L} \int_{0}^{2L} f(x) sin(n\pi x/L)dx$$ My question is : when to use integration from -L to L and when to use intergration from 0 to 2L?

For example : the following problem ( in polar coordinates ) Find the temperature u inside a circular disk $$0\leq r\leq a$$ if it is governed by $$\nabla^2u=0$$ i.e. $$u_{rr}+\frac{1}{r} u_r + \frac{1}{r^2}u_{\theta\theta}=0$$ given that $$ u(a,\theta)= f(\theta)=2 \pi \theta - \theta^2$$

I solved this problem and I fot finally that $$f(\theta)=A_o+\sum_{n=1}^{\infty}(a^n A_n cos(n\theta)+a^n B_n sin(n\theta))$$ then if I used $$A_o=\frac{1}{2L} \int_{-L}^{L} f(x) dx$$ I got $$A_o=\frac{\pi^2}{3}$$ But if I used $$A_o=\frac{1}{2L} \int_{0}^{2L} f(x) dx$$ I got $$A_o=\frac{2 \pi^2}{3}$$

where $$L=\pi\ Since\ u \ is \ periodic\ with\ 2\pi \ and \ L \ is \ half \ of \ the\ period.$$

1

There are 1 best solutions below

0
On

Note that, in the example above, you are modelling a function in terms of 'basis' functions $x\mapsto 1, x \mapsto \cos {n \pi x \over L}, x \mapsto \sin {n \pi x \over L}$, so the resulting function must be $2L$ periodic.

If $f$, the function being modelled, is $2L$ periodic, then it clearly does not matter what particular interval you take, as long as it is $2L$ long.

However, you may be interested in modelling a function that is not $2L$ periodic, but over an interval that is $2L$ long. One way is to define a $2L$ periodic $g$ that matches $f$ on the interval of interest (there may be a discontinuity at the end points, but this often doesn't matter in applications) and then, as above, any interval of length $2L$ will do.

However, rather than going through the process of defining such a $g$, we just integrate over the interval of interest, which amounts to the same thing.

So, when the integration is over $[-L,L]$ then we are interested in modelling $f$ on $[-L,L]$, and similarly for $[0,2L]$, mutatis mutandis.

There is another technique which can be used to model $f$ that represents $f$ in terms of $\cos, \sin$. If we are interested in $f$ over the interval $[0,L]$ instead, we can extend $f$ so that it is even on $[-L,L]$ and then the Fourier series will only contain constant and $\cos $ terms (but the modelling is only valid over $[0,L]$, of course). By extending $f$ to be odd on $[-L,L]$ (this may introduce a discontinuity at $x=0$), we can model $f$ on $[0,L]$ in terms of $\sin$ terms.

The point of the latter paragraph is that when we compute the $A_n$ (when $f$ is extended to be even) we compute $A_n=\frac{2}{L} \int_{0}^{L} f(x) \cos{n\pi x \over L}dx $, and similarly for $A_0$, and we know that $B_n = 0$. Again, if we extend $f$ to be odd, we have $B_n=\frac{2}{L} \int_{0}^{L} f(x) \sin{n\pi x \over L}dx $.