Skip to content

Instantly share code, notes, and snippets.

@andy0130tw
Last active April 23, 2016 18:09
Gibbs Phenomenon

Gibbs Phenomenon

By Andy Pan (Qbane), 2016/3/10. (See Gist for revision history.)

This is a test document on MathJax support on various platforms, mainly on printed material.

For large N , the graph of the $N$th partial sum of the Fourier series of f on [ L , L ] overshoots the graph of the function at a jump discontinuity by approx. 9 of the magnitude of the jump.

(a) $N$th Partial Sum

We write out the $N$th partial sum of the Fourier series of f ( x ) and expand its coefficients: $$ \begin{align} S_N(x) &= a_0 + \sum_{n=1}^N \left[ a_n \cos \left(\frac{n\pi x}{L}\right) + b_n \sin \left(\frac{n\pi x}{L}\right) \right] \ &= \frac{1}{2L} \int_{-L}^L f(t) dt \ &+ \frac{1}{L} \sum_{n=1}^N \left[ \int_{-L}^L f(t) \cos\left( \frac{n\pi t}{L} \right) dt \right] \cos\left( \frac{n\pi x}{L} \right) \ &+ \frac{1}{L} \sum_{n=1}^N \left[ \int_{-L}^L f(t) \sin\left( \frac{n\pi t}{L} \right) dt \right] \sin\left( \frac{n\pi x}{L} \right) \ &= \frac{1}{L} \int_{-L}^L f(t) \left{ \frac{1}{2} + \sum_{n=1}^N \cos\left[ \frac{n\pi (t-x)}{L} \right] \right} dt. \end{align} $$

(b) Trigonometric Identity

It can be shown that n = 1 N cos ( n ξ ) = sin [ ( N + 1 2 ) ξ ] 2 sin ( ξ 2 ) 1 2 .

Here is a trick: multiply it by sin ( ξ 2 ) and try to lead to an identity. It can also be simplified by transforming cos x = e i x + e i x 2 and transforming back to sin terms. (It would be tricky if you didn't know RHS, though.)

(c) Approximating (a)

For small x , sin x x , and using (b), (a) can be expressed as S N ( x ) 1 2 L L L f ( t ) sin [ π L ( N + 1 2 ) ( t x ) ] π 2 L ( t x ) d t .

(d) Estimating a Discontinuity

To find out the amount, we use the following function with a jump discontinuity 1 at x = L , $$ f(x) = \begin{cases} 0 & \text{if } -L < x \le x_0, \ 1 & \text{if } x_0 < x < L. \end{cases} $$

Inserting it into S N yields $$ \begin{align} S_N(x) &\approx \frac 1 {2L} \int_{x_0}^L \frac{\sin \left[ \frac \pi L (N + \frac 1 2) (t-x) \right] }{ \frac{\pi}{2L}(t-x) } dt \ &= \frac 1 \pi \int_{(\pi/L)(N + 1/2)(x_0-x)}^{(\pi/L)(N + 1/2)(L-x)} \frac{\sin s}{s} ds. \end{align}$$

(e) Putting N

The integral 0 z sin t t d t is called the sine integral, denoted as Si ( z ) .

Computing S N when N diverges to three cases depending on x , in which we are only interested in the case that x > x 0 , that is ( π / L ) ( N + 1 / 2 ) ( x 0 x ) :

Missing or unrecognized delimiter for \left

$$ \begin{align}
\lim_{N \to \infty} S_N(x) &\approx \frac 1 \pi \int_{(\pi/L)(N + 1/2)(x_0-x)}^\infty \frac{\sin s}{s} ds \\
&= \frac 1 \pi \left{ \lim_{z \to \infty} \text{Si}(z) - \text{Si} \left[ \left(\frac \pi L \right) \left(N + \frac 1 2 \right) \left(x_0-x \right) \right] \right},
\end{align} $$

(f) Evaluating the Sine Integral

Si ( z ) at infinity can be computed as follows, $$ \begin{align} \lim_{z \to \infty} \text{Si}(z) &= \int_0^\infty \frac{\sin t}{t} dt \ &= \int_0^\infty \int_0^\infty e^{-st} \frac{\sin t}{t}ds,dt \ &= \int_0^\infty \int_0^\infty e^{-st} \frac{\sin t}{t}dt,ds \ &= \int_0^\infty \frac{1}{s^2 + 1}ds \ &= \frac \pi 2. \end{align} $$

Si ( z ) is maximized when $\text{Si}'(z^) = 0$, that is $\frac{\sin z^}{z^} = 0$, and the minimal $x^$ satisfying the condition is z = π .

Thus the overshoot is at most $$ \frac 1 \pi \left[\frac \pi 2 - \text{Si}(\pi) \right] = \frac 1 2 - \frac{\text{Si}(\pi)}{\pi} \approx 0.0895, $$

which is approximately 9 .

Written with StackEdit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment