This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
vpde_lecture20 [2020/03/19 15:49] trinh [Fourier series for even and odd- extensions] |
vpde_lecture20 [2020/03/19 15:59] trinh [Fourier series for even and odd- extensions] |
||
---|---|---|---|
Line 42: | Line 42: | ||
=== Odd- and even extensions of $f(x) = x^2$ === | === Odd- and even extensions of $f(x) = x^2$ === | ||
- | We'll draw the odd and even periodic extension of $f(x) = x^2$ originally defined on $[0, \pi]$, and then extended in an even or odd manner to $[-\pi, pi]$. | + | We'll draw the odd and even periodic extension of $f(x) = x^2$ originally defined on $[0, \pi]$, and then extended in an even or odd manner to $[-\pi, |
+ | $$ | ||
+ | f_e(x) = \begin{cases} | ||
+ | x^2 & x\in[0, \pi] \\ | ||
+ | x^2 & x\in[-\pi, 0] | ||
+ | \end{cases} | ||
+ | $$ | ||
+ | is the even extension, while | ||
+ | $$ | ||
+ | f_o(x) = \begin{cases} | ||
+ | x^2 & x\in[0, \pi] \\ | ||
+ | -x^2 & x\in[-\pi, 0] | ||
+ | \end{cases} | ||
+ | $$ | ||
+ | is the odd extension. | ||
+ | |||
+ | Once you have drawn (or derived) the extension, then it becomes a simple matter to calculate the Fourier series. For example, since $f_e(x)$ is an even function then only cosines are present, and | ||
+ | $$ | ||
+ | f_e(x) \sim \frac{a_0}{2} + \sum_{n=1}^\infty a_n \cos(nx), | ||
+ | $$ | ||
+ | where | ||
+ | $$ | ||
+ | a_n = \frac{2}{\pi} \int_0^\pi x^2 \cos(nx) \, \mathrm{d}x. | ||
+ | $$ | ||
+ | Above, we have used the even property to double up the integral over the positive $x$ values. Similarly, the Fourier series for the odd extension is | ||
+ | $$ | ||
+ | f_o(x) \sim \sum_{n=1}^\infty b_n \sin(nx), | ||
+ | $$ | ||
+ | where | ||
+ | $$ | ||
+ | b_n = \frac{2}{\pi} \int_0^\pi x^2 \sin(nx) \, \mathrm{d}x. | ||
+ | $$ |