Solutions for Sample Midterm Questions Math 121, Fall 2004

1. Answer the following questions with a brief explanation to justify your answer.

(a) What is the period of the function sin (7x)?

(b) What is the value of

∫_{0}^{700π} sin^{2} (7x) dx?

(c) What is the value of

∫_{0}^{700π} sin (7x) sin (70x) dx?

Solution.

• (a) The (smallest) period is 2π/7, since

sin [7 (x + \frac{2π}{7} )] = sin (7x + 2π)
= sin (7x)

• (b) The range of integration is an integer multiple of the period, since

700π = 7 · 350 · \frac{2π}{7} ,

and the average value of sin^{2} x over a period is 1/2, so

∫_{0}^{700π} sin^{2} (7x) dx = 700π · \frac{1}{2}
= 350π.

• (c) Since sin (7x) and sin (70x) are orthogonal, we have

∫_{0}^{700π} sin (7x) sin (70x) dx = 0.

2. Suppose that f(x) is the 2π-periodic function defined by

f(x) = \{ \begin{matrix}x & for −π < x ≤ 0, \\ 0 & for 0 < x ≤ π. \end{matrix}

Compute the (real) Fourier series expansion of f(x). What does the Fourier series converge to at x = 0, x = π/2, and x = π? Why?

Solution.

• The Fourier series expansion is

f(x) = \frac{1}{2}a_{0} + ∑_{n=1}^{∞} \{a_{n} cos nx + b_{n} sin nx\} ,

where

a_{n} = \frac{1}{π} ∫_{−π}^{π} f(x) cos nx dx n=0,1,2,…,
b_{n} = \frac{1}{π} ∫_{−π}^{π} f(x) sin nx dx n=0,1,2,….

• Computing a_{n}, and using the equations

cos nπ = (−1)^{n}, sin nπ = 0,

we get, for n = 1, 2, 3, …,

a_{n} = \frac{1}{π} ∫_{−π}^{0} x cos nx dx
= \frac{1}{π} [\frac{x sin nx}{n} + \frac{cos nx}{n^{2}}]_{−π}^{0}
= \frac{1}{π} [\frac{1}{n^{2}} − \frac{(−1)^{n}}{n^{2}} ]
= \{ \begin{matrix}0 & for n even, \\ 2/(πn^{2}) & for n odd. \end{matrix}

For n = 0, we get

a_{0} = \frac{1}{π} ∫_{−π}^{0} x dx
= \frac{1}{π} [\frac{1}{2}x^{2}]_{−π}^{0}
= −\frac{π}{2} .

• Computing b_{n} for n = 1, 2, 3, …, we get

b_{n} = \frac{1}{π} ∫_{−π}^{0} x sin nx dx
= \frac{1}{π} [−\frac{x cos nx}{n} + \frac{sin nx}{n^{2}}]_{−π}^{0}
= \frac{1}{π} [\frac{(−1)^{n}π}{n} ]
= \frac{(−1)^{n+1}}{n}
= \{ \begin{matrix}1/n & for n even, \\ −1/n & for n odd. \end{matrix}

• The Fourier series expansion of f(x) is therefore

f(x) = −\frac{π}{4} + \frac{2}{π} (cos x + \frac{1}{3^{2}} cos 3x + \frac{1}{5^{2}} cos 5x + \frac{1}{7^{2}} cos 7x + …) …
+ sin x − \frac{1}{2} sin 2x + \frac{1}{3} sin 3x − \frac{1}{4} sin 4x + …

• (c) The function is piecewise smooth. By Dirichlet’s theorem, the Fourier series converges to the value of the function where is is continuous, and to the average of the left and right limits where it has a jump discontinity. The function f(x) is continuous and equal to 0 at x = 0 and x = π/2, so the Fourier series converges to 0 at both points. The function has a jump discontinuity at x = π, with left limit equal to 0 and right limit equal to −π. Therefore the Fourier series converges to −π/2 at x = π.

3. Suppose that

f(x) = 1 − x^{2} 0 < x < 1.

Let f_{p} be the periodic extension of f (with period 1), f_{e} the even periodic extension of f (with period 2), and f_{o} the odd periodic extension of f (with period 2).

(a) Sketch the graphs of f_{p}, f_{e}, and f_{o} on the interval −3 < x < 3.

(b) Write out the corresponding form of the Fourier series for these functions, together with expressions for their Fourier coefficients. (Just write expressions for the coefficients — don’t evaluate any integrals.)

(c) Which Fourier series converges faster — the one for f_{e} or the one for f_{o}? Explain you answer briefly, but don’t do any explicit computations.

Solution.

• (a) Graphs omitted.

• (b) The Fourier series are

f_{p}(x) = ∑_{n=−∞}^{∞} c_{n}e^{2πinx},  c_{n} = ∫_{0}^{1} (1 − x^{2}) e^{−2πinx} dx,

f_{e}(x) = \frac{1}{2}a_{0} + ∑_{n=1}^{∞} a_{n} cos nπx,  a_{n} = 2 ∫_{0}^{1} (1 − x^{2}) cos nπx dx,

f_{o}(x) = ∑_{n=1}^{∞} b_{n} sin nπx,  b_{n} = 2 ∫_{0}^{1} (1 − x^{2}) sin nπx dx.

• (c) The Fourier series for f_{e} converges faster than the one for f_{o}, since f_{o} has a jump discontinuity whereas f_{e} does not.

4. The function

f(x) = \{ \begin{matrix}0 & for −π < x ≤ 0, \\ sin x & for 0 < x ≤ π. \end{matrix}

Has the Fourier series expansion

f(x) = \frac{1}{π} + \frac{1}{2} sin x − \frac{2}{π} (\frac{cos 2x}{2^{2} − 1} + \frac{cos 4x}{4^{2} − 1} + \frac{cos 6x}{6^{2} − 1} + … + \frac{cos 2nx}{(2n)^{2} − 1} + …)

Apply Parseval’s theorem to this function, and use the result to determine the sum of the infinite series

∑_{n=1}^{∞} \frac{1}{[(2n)^{2} − 1]^{2}} = \frac{1}{3^{2}} + \frac{1}{15^{2}} + \frac{1}{35^{2}} + ….

Solution.

• Parseval’s theorem states that if f(x) is a 2π-periodic function with Fourier cosine and sine coefficients a_{n} and b_{n}, respectively, then

\frac{1}{2π} ∫_{−π}^{π} f(x)^{2} dx = \frac{1}{4}a_{0}^{2} + \frac{1}{2} ∑_{n=−∞}^{∞} \{a_{n}^{2} + b_{n}^{2}\} .

• For the given function f(x), we have

\frac{1}{2π} ∫_{−π}^{π} f(x)^{2} dx = \frac{1}{2π} ∫_{0}^{π} sin^{2} x dx
= \frac{1}{2π} · π · \frac{1}{2}
= \frac{1}{4},

since the average value of sin^{2} x is 1/2. It follows from the Fourier series expansion of f and Parseval’s theorem that

\frac{1}{4} = \frac{1}{4} (\frac{2}{π} )^{2} + \frac{1}{2} (\frac{1}{2})^{2} + \frac{1}{2} (\frac{2}{π} )^{2} ∑_{n=1}^{∞} \frac{1}{[(2n)^{2} − 1]^{2}}

Rearranging and simplifying this equation, we get that

∑_{n=1}^{∞} \frac{1}{[(2n)^{2} − 1]^{2}} = \frac{π^{2}}{16} − \frac{1}{2}.

5. State the orthogonality relation for the functions e^{inx}, where n is an integer.

(a) Use these relations to derive an expression for the Fourier coefficient c_{n} in the complex Fourier expansion of a 2π-periodic function f,

f(x) = ∑_{n=−∞}^{∞} c_{n}e^{inx}.

(b) What can you say about c_{n} if f is an even function?

Solution.

• The orthogonality relations are

\frac{1}{2π} ∫_{0}^{2π} e^{imx}e^{−inx} dx = \{ \begin{matrix}0 & if m ≠ n, \\ 1 & if m = n. \end{matrix}

• (a) We multiply the Fourier series of f,

f(x) = ∑_{m=−∞}^{∞} c_{m}e^{imx},

by e^{−inx} and integrate over a period. (Here, m is a summation variable that runs over all integers, and n is an arbitrary but fixed integer.) Exchanging the order of integration and summation, and using the orthogonality relation, we deduce that

\frac{1}{2π} ∫_{0}^{2π} f(x)e^{−inx} dx = \frac{1}{2π} ∫_{0}^{2π} ( ∑_{m=−∞}^{∞} c_{m}e^{imx}) e^{−inx} dx

= ∑_{m=−∞}^{∞} c_{m} (\frac{1}{2π} ∫_{0}^{2π} e^{imx}e^{−inx} dx)
= c_{n},

since only the nth term in the series is nonzero. That is,

c_{n} = \frac{1}{2π} ∫_{0}^{2π} f(x)e^{−inx} dx

• If f is an even function, then c_{n} is real.

6. Suppose that f(x) has the complex Fourier series expansion

f(x) = ∑_{n=−∞}^{∞} \frac{1}{1 + in} e^{inx}.

Find the real Fourier series expansion of f(x) (in terms of sines and cosines). Solution.

• We split the series up into sums for n < 0 and n > 0:

f(x) = ∑_{n=−1}^{−∞} \frac{1}{1 + in} e^{inx} + 1 + ∑_{n=1}^{∞} \frac{1}{1 + in} e^{inx}.

The term 1 comes from n = 0. Changing the summation variable from n to −n in the first sum, and combining the sums, we get

f(x) = ∑_{n=1}^{∞} \frac{1}{1 − in} e^{−inx} + 1 + ∑_{n=1}^{∞} \frac{1}{1 + in} e^{inx}
= 1 + ∑_{n=1}^{∞} (\frac{1}{1 + in} e^{inx} + \frac{1}{1 − in} e^{−inx}) .

Using Euler’s equation

cos nx = \frac{e^{inx} + e^{−inx}}{2} , sin nx = \frac{e^{inx} − e^{−inx}}{2i}

and the equations

\frac{1}{1 + in} = \frac{1 − in}{(1 + in)(1 − in)} = \frac{1 − in}{1 + n^{2}},
\frac{1}{1 − in} = \frac{1 + in}{(1 − in)(1 + in)} = \frac{1 + in}{1 + n^{2}} ,

to rewrite the terms in this series, we get

\frac{1}{1 + in} e^{inx} + \frac{1}{1 − in} e^{−inx} = \frac{1}{1 + n^{2}} (e^{inx} + e^{−inx})

−\frac{in}{1 + n^{2}} (e^{inx} − e^{−inx})

= \frac{2}{1 + n^{2}} cos nx + \frac{2n}{1 + n^{2}} sin nx.

Hence

f(x) = 1 + 2 ∑_{n=1}^{∞} \{\frac{1}{1 + n^{2}} cos nx + \frac{n}{1 + n^{2}} sin nx\} .  (1)

• Alternative method. If a 2π-periodic function f has complex Fourier coefficients c_{n} and Fourier cosine and sine coefficients a_{n} and b_{n}, respectively, then^{1}

c_{n} = \frac{1}{2} (a_{n} − ib_{n})  for n ≥ 0  (2)

For the given function

c_{n} = \frac{1}{1 + in}
= \frac{1 − in}{1 + n^{2}}
= \frac{1}{1 + n^{2}} − i\frac{n}{1 + n^{2}}

so

a_{n} = \frac{2}{1 + n^{2}} , b_{n} = \frac{2n}{1 + n^{2}} ,

which gives (1).

• For completeness, we derive (2) from the equations for the Fourier coefficients. We have

a_{n} = \frac{1}{π} ∫_{0}^{2π} f(x) cos nx dx,
b_{n} = \frac{1}{π} ∫_{0}^{2π} f(x) sin nx dx,
c_{n} = \frac{1}{2π} ∫_{0}^{2π} f(x)e^{−inx} dx.

1See below for a derivation of this result — it’s ok to state it without proof unless you’re specifically asked to derive it.

Using Euler’s formula in the definition of c_{n}, and rewriting the result, we get that, for n ≥ 0,

c_{n} = \frac{1}{2π} ∫_{0}^{2π} f(x) (cos nx − i sin nx) dx
= \frac{1}{2π} ∫_{0}^{2π} f(x) cos nx dx − i\frac{1}{2π} ∫_{0}^{2π} f(x) sin nx dx
= \frac{1}{2}a_{n} − \frac{1}{2}ib_{n},

which proves (2).