Course Test · University: upper level
Fourier analysis and transforms: independent answers
Test Independent answers RatMath answers
Each answer here was worked out by hand, without RatMath, before the RatMath code was written. Where the arithmetic is long, the working says how it was checked.
1. Square wave
Find the Fourier series of the square wave
f = − 1 f = -1 f = − 1 on
( − 1 , 0 ) (-1, 0) ( − 1 , 0 ) ,
f = 1 f = 1 f = 1 on
( 0 , 1 ) (0, 1) ( 0 , 1 ) , period 2, up to
sin 3 π x \sin 3\pi x sin 3 π x .
Answer
f f f is odd, so only sines:
b n = 2 ∫ 0 1 sin n π x d x = 2 ( 1 − ( − 1 ) n ) n π b_n = 2\int_0^1 \sin n\pi x\,dx = \dfrac{2(1 - (-1)^n)}{n\pi} b n = 2 ∫ 0 1 sin nπ x d x = nπ 2 ( 1 − ( − 1 ) n ) , i.e.
4 n π \dfrac{4}{n\pi} nπ 4 for odd
n n n .
f ∼ 4 π ( sin π x + 1 3 sin 3 π x + ⋯ ) f \sim \dfrac4\pi\left(\sin\pi x + \tfrac13\sin3\pi x + \cdots\right) f ∼ π 4 ( sin π x + 3 1 sin 3 π x + ⋯ ) , with
4 π ≈ 1.27324 \tfrac4\pi \approx 1.27324 π 4 ≈ 1.27324 .
2. Sawtooth
Find the Fourier coefficients of
f ( x ) = x f(x) = x f ( x ) = x on
( − 1 , 1 ) (-1, 1) ( − 1 , 1 ) .
Answer
Odd:
b n = 2 ∫ 0 1 x sin n π x d x = 2 ( − 1 ) n + 1 n π b_n = 2\int_0^1 x\sin n\pi x\,dx = \dfrac{2(-1)^{n+1}}{n\pi} b n = 2 ∫ 0 1 x sin nπ x d x = nπ 2 ( − 1 ) n + 1 :
2 π , − 1 π , 2 3 π \tfrac2\pi, -\tfrac1\pi, \tfrac2{3\pi} π 2 , − π 1 , 3 π 2 .
3. Parabola
Find the Fourier series of
f ( x ) = x 2 f(x) = x^2 f ( x ) = x 2 on
( − 1 , 1 ) (-1, 1) ( − 1 , 1 ) up to
cos 2 π x \cos 2\pi x cos 2 π x .
Answer
Even:
a 0 2 = ∫ 0 1 x 2 = 1 3 \tfrac{a_0}2 = \int_0^1 x^2 = \tfrac13 2 a 0 = ∫ 0 1 x 2 = 3 1 ,
a n = 2 ∫ 0 1 x 2 cos n π x d x = 4 ( − 1 ) n n 2 π 2 a_n = 2\int_0^1 x^2\cos n\pi x\,dx = \dfrac{4(-1)^n}{n^2\pi^2} a n = 2 ∫ 0 1 x 2 cos nπ x d x = n 2 π 2 4 ( − 1 ) n :
− 4 π 2 ≈ − 0.405285 -\tfrac4{\pi^2} \approx -0.405285 − π 2 4 ≈ − 0.405285 ,
1 π 2 ≈ 0.101321 \tfrac1{\pi^2} \approx 0.101321 π 2 1 ≈ 0.101321 .
4. Value at a jump
To what does the Fourier series of the square wave converge at
x = 0 x = 0 x = 0 ?
Answer
To the average of the one-sided limits,
− 1 + 1 2 = 0 \tfrac{-1 + 1}{2} = 0 2 − 1 + 1 = 0 (every
sin n π ⋅ 0 = 0 \sin n\pi\cdot0 = 0 sin nπ ⋅ 0 = 0 ).
5. Orthogonality
Compute
∫ − π π sin 2 x sin 3 x d x \int_{-\pi}^{\pi}\sin 2x\sin 3x\,dx ∫ − π π sin 2 x sin 3 x d x and
∫ − π π sin 2 2 x d x \int_{-\pi}^{\pi}\sin^2 2x\,dx ∫ − π π sin 2 2 x d x .
Answer
sin 2 x sin 3 x = 1 2 ( cos x − cos 5 x ) \sin2x\sin3x = \tfrac12(\cos x - \cos5x) sin 2 x sin 3 x = 2 1 ( cos x − cos 5 x ) integrates to 0.
sin 2 2 x = 1 2 ( 1 − cos 4 x ) \sin^2 2x = \tfrac12(1 - \cos4x) sin 2 2 x = 2 1 ( 1 − cos 4 x ) integrates to
π \pi π .
6. Parseval's identity
Use Parseval's identity for
f ( x ) = x f(x) = x f ( x ) = x on
( − 1 , 1 ) (-1, 1) ( − 1 , 1 ) to find
∑ 1 / n 2 \sum 1/n^2 ∑ 1/ n 2 .
Answer
∫ − 1 1 x 2 = 2 3 = ∑ b n 2 = ∑ 4 n 2 π 2 \int_{-1}^1 x^2 = \tfrac23 = \sum b_n^2 = \sum \dfrac{4}{n^2\pi^2} ∫ − 1 1 x 2 = 3 2 = ∑ b n 2 = ∑ n 2 π 2 4 , so
∑ 1 n 2 = π 2 6 \sum \dfrac1{n^2} = \dfrac{\pi^2}6 ∑ n 2 1 = 6 π 2 .
7. Discrete Fourier transform
Compute the DFT
X k = ∑ j x j e − 2 π i j k / 4 X_k = \sum_j x_j e^{-2\pi ijk/4} X k = ∑ j x j e − 2 π ij k /4 of
( 1 , 2 , 3 , 4 ) (1, 2, 3, 4) ( 1 , 2 , 3 , 4 ) .
Answer
X 0 = 10 X_0 = 10 X 0 = 10 ,
X 1 = 1 − 2 i − 3 + 4 i = − 2 + 2 i X_1 = 1 - 2i - 3 + 4i = -2 + 2i X 1 = 1 − 2 i − 3 + 4 i = − 2 + 2 i ,
X 2 = 1 − 2 + 3 − 4 = − 2 X_2 = 1 - 2 + 3 - 4 = -2 X 2 = 1 − 2 + 3 − 4 = − 2 ,
X 3 = − 2 − 2 i X_3 = -2 - 2i X 3 = − 2 − 2 i .
8. DFT of an impulse
Find the DFT of
( 1 , 0 , 0 , 0 ) (1, 0, 0, 0) ( 1 , 0 , 0 , 0 ) .
Answer
Only
j = 0 j = 0 j = 0 contributes:
X k = 1 X_k = 1 X k = 1 for every
k k k , a flat spectrum.
9. Aliasing
A 7 Hz sine is sampled at 10 Hz. What frequency does it appear to have?
Answer
The Nyquist frequency is 5 Hz;
7 7 7 folds to
10 − 7 = 3 10 - 7 = 3 10 − 7 = 3 Hz, and a sine comes back with its sign reversed:
sin ( 2 π ⋅ 7 n / 10 ) = − sin ( 2 π ⋅ 3 n / 10 ) \sin(2\pi\cdot7n/10) = -\sin(2\pi\cdot3n/10) sin ( 2 π ⋅ 7 n /10 ) = − sin ( 2 π ⋅ 3 n /10 ) .
10. Fourier transform
Find
f ^ ( ω ) = ∫ − ∞ ∞ f ( x ) e − i ω x d x \hat f(\omega) = \int_{-\infty}^\infty f(x)e^{-i\omega x}dx f ^ ( ω ) = ∫ − ∞ ∞ f ( x ) e − iω x d x for
f = e − ∣ x ∣ f = e^{-|x|} f = e − ∣ x ∣ and for
f = e − x 2 f = e^{-x^2} f = e − x 2 .
Answer
∫ 0 ∞ e − x ( 1 + i ω ) d x + ∫ 0 ∞ e − x ( 1 − i ω ) d x = 2 1 + ω 2 \int_0^\infty e^{-x(1 + i\omega)}dx + \int_0^\infty e^{-x(1 - i\omega)}dx = \dfrac{2}{1 + \omega^2} ∫ 0 ∞ e − x ( 1 + iω ) d x + ∫ 0 ∞ e − x ( 1 − iω ) d x = 1 + ω 2 2 . The Gaussian:
π e − ω 2 / 4 \sqrt\pi\,e^{-\omega^2/4} π e − ω 2 /4 .
11. Convolution
Compute
( f ∗ f ) ( 1 ) (f * f)(1) ( f ∗ f ) ( 1 ) for
f = e − ∣ x ∣ f = e^{-|x|} f = e − ∣ x ∣ .
Answer
( f ∗ f ) ( x ) = ( 1 + ∣ x ∣ ) e − ∣ x ∣ (f * f)(x) = (1 + |x|)e^{-|x|} ( f ∗ f ) ( x ) = ( 1 + ∣ x ∣ ) e − ∣ x ∣ (or invert
4 ( 1 + ω 2 ) 2 \dfrac{4}{(1 + \omega^2)^2} ( 1 + ω 2 ) 2 4 ):
( f ∗ f ) ( 1 ) = 2 e ≈ 0.735759 (f * f)(1) = \dfrac2e \approx 0.735759 ( f ∗ f ) ( 1 ) = e 2 ≈ 0.735759 .
12. Laplace transform
Find the Laplace transforms of
t 2 t^2 t 2 and
e 2 t sin 3 t e^{2t}\sin 3t e 2 t sin 3 t .
Answer
L { t n } = n ! s n + 1 \mathcal L\{t^n\} = \dfrac{n!}{s^{n+1}} L { t n } = s n + 1 n ! :
2 s 3 \dfrac2{s^3} s 3 2 . Shifting
3 s 2 + 9 \dfrac3{s^2 + 9} s 2 + 9 3 :
3 ( s − 2 ) 2 + 9 \dfrac{3}{(s - 2)^2 + 9} ( s − 2 ) 2 + 9 3 .
13. Inverse Laplace transform
Find
L − 1 { 1 s ( s + 1 ) } \mathcal L^{-1}\left\{\dfrac{1}{s(s + 1)}\right\} L − 1 { s ( s + 1 ) 1 } .
Answer
1 s − 1 s + 1 \dfrac1s - \dfrac1{s + 1} s 1 − s + 1 1 , so
1 − e − t 1 - e^{-t} 1 − e − t .
14. Legendre polynomials
Answer
Rodrigues:
P 3 = 1 48 d 3 d x 3 ( x 2 − 1 ) 3 = 1 2 ( 5 x 3 − 3 x ) P_3 = \tfrac1{48}\dfrac{d^3}{dx^3}(x^2 - 1)^3 = \tfrac12(5x^3 - 3x) P 3 = 48 1 d x 3 d 3 ( x 2 − 1 ) 3 = 2 1 ( 5 x 3 − 3 x ) .
15. Sturm–Liouville eigenvalues
Find the first three eigenvalues of
− y ′ ′ = λ y -y'' = \lambda y − y ′′ = λ y ,
y ( 0 ) = y ( 1 ) = 0 y(0) = y(1) = 0 y ( 0 ) = y ( 1 ) = 0 .
Answer
y = sin n π x y = \sin n\pi x y = sin nπ x ,
λ n = n 2 π 2 \lambda_n = n^2\pi^2 λ n = n 2 π 2 :
9.8696 9.8696 9.8696 ,
39.4784 39.4784 39.4784 ,
88.8264 88.8264 88.8264 .
16. Heat equation
Solve
u t = u x x u_t = u_{xx} u t = u xx on
0 < x < 1 0 < x < 1 0 < x < 1 with
u = 0 u = 0 u = 0 at both ends and
u ( x , 0 ) = sin π x u(x, 0) = \sin\pi x u ( x , 0 ) = sin π x . Find
u ( 1 2 , 1 10 ) u(\tfrac12, \tfrac1{10}) u ( 2 1 , 10 1 ) .
Answer
u = e − π 2 t sin π x u = e^{-\pi^2t}\sin\pi x u = e − π 2 t sin π x ;
u ( 1 2 , 1 10 ) = e − π 2 / 10 ≈ 0.372708 u(\tfrac12, \tfrac1{10}) = e^{-\pi^2/10} \approx 0.372708 u ( 2 1 , 10 1 ) = e − π 2 /10 ≈ 0.372708 .
17. Wave equation
A string of length 1 with
c = 1 c = 1 c = 1 starts at rest in the shape
sin π x \sin\pi x sin π x . Find the displacement at
x = 1 2 x = \tfrac12 x = 2 1 at
t = 1 2 t = \tfrac12 t = 2 1 and
t = 1 3 t = \tfrac13 t = 3 1 .
Answer
u = sin π x cos π t u = \sin\pi x\cos\pi t u = sin π x cos π t :
u ( 1 2 , 1 2 ) = 0 u(\tfrac12, \tfrac12) = 0 u ( 2 1 , 2 1 ) = 0 ,
u ( 1 2 , 1 3 ) = 1 2 u(\tfrac12, \tfrac13) = \tfrac12 u ( 2 1 , 3 1 ) = 2 1 .
18. Laplace's equation on a disc
Solve
Δ u = 0 \Delta u = 0 Δ u = 0 in the unit disc with
u = cos θ u = \cos\theta u = cos θ on the boundary. Find
u u u at
r = 1 2 r = \tfrac12 r = 2 1 ,
θ = 0 \theta = 0 θ = 0 .
Answer
u = r cos θ u = r\cos\theta u = r cos θ (harmonic and right on the circle):
u = 1 2 u = \tfrac12 u = 2 1 .
19. Convolution theorem
Check the convolution theorem
f ∗ g ^ = f ^ g ^ \widehat{f * g} = \hat f\,\hat g f ∗ g = f ^ g ^ for
f = g = e − ∣ x ∣ f = g = e^{-|x|} f = g = e − ∣ x ∣ at
x = 1 x = 1 x = 1 .
Answer
f ^ g ^ = 4 ( 1 + ω 2 ) 2 \hat f\hat g = \dfrac{4}{(1 + \omega^2)^2} f ^ g ^ = ( 1 + ω 2 ) 2 4 , whose inverse transform at 1 is
1 2 π ∫ 4 e i ω ( 1 + ω 2 ) 2 d ω = 2 e − 1 \dfrac{1}{2\pi}\int\dfrac{4e^{i\omega}}{(1 + \omega^2)^2}d\omega = 2e^{-1} 2 π 1 ∫ ( 1 + ω 2 ) 2 4 e iω d ω = 2 e − 1 , the same as the direct convolution.
20. Mean-square convergence
For
f ( x ) = x f(x) = x f ( x ) = x on
( − 1 , 1 ) (-1, 1) ( − 1 , 1 ) , find the mean square error
1 2 ∫ − 1 1 ( f − S 3 ) 2 d x \tfrac12\int_{-1}^1 (f - S_3)^2\,dx 2 1 ∫ − 1 1 ( f − S 3 ) 2 d x of the 3-term Fourier sum
S 3 S_3 S 3 .
Answer
By Bessel's equality,
∫ − 1 1 ( f − S 3 ) 2 = ∫ − 1 1 x 2 − ∑ n ≤ 3 b n 2 = 2 3 − 4 π 2 ( 1 + 1 4 + 1 9 ) = 2 3 − 49 9 π 2 ≈ 0.115029 \int_{-1}^1 (f - S_3)^2 = \int_{-1}^1 x^2 - \sum_{n\le3} b_n^2 = \tfrac23 - \tfrac4{\pi^2}\left(1 + \tfrac14 + \tfrac19\right) = \tfrac23 - \tfrac{49}{9\pi^2} \approx 0.115029 ∫ − 1 1 ( f − S 3 ) 2 = ∫ − 1 1 x 2 − ∑ n ≤ 3 b n 2 = 3 2 − π 2 4 ( 1 + 4 1 + 9 1 ) = 3 2 − 9 π 2 49 ≈ 0.115029 . Half of that is
≈ 0.0575146 \approx 0.0575146 ≈ 0.0575146 .