Homework #5 Solutions

Homework #5 Solutions
Math 182, Spring 2014
Instructor: Dr. Doreen De Leon
1
Exercises 3.2: 6, 9, 10, 11, 16, 17
6. True or false? Prove, or provide a counterexample.
(a) If f (x) and g(x) are periodic of period T , then so is c1 f (x) + c2 g(x) for any choice of constants
c1 and c2 .
Solution: Let c1 and c2 be arbitrary constants. Then,
c1 f (x + T ) + c2 g(x + T ) = c1 f (x) + c2 g(x),
since f and g are periodic with period T . Therefore, c1 f (x) + c2 g(x) is periodic with period
T.
(b) If f (x) and g(x) are periodic with period T , then so are f (x)g(x) and f (x)/g(x) (on their
domains).
Solution: Both statements are true.
f (x)g(x): Consider (f g)(x + T ).
(f g)(x + T ) = f (x + T )g(x + T )
= f (x)g(x).
f (x)/g(x): Consider f (x)/g(x).
f
f (x + T )
(x + T ) =
g
g(x + T )
f (x)
=
.
g(x)
(c) If f (x) and g(x) are periodic with fundamental period T , then f (x)g(x) is periodic with
fundamental period T .
Solution: This stateement is false. For example, let f (x) = cos x and g(x) = sin x. Then,
both f and g have fundamental period 2π. However,
f (x)g(x) = cos x sin x =
which has fundamental period π.
1
1
sin 2x,
2
In Exercises 9-11, determine if f (x) is even, odd, or neither.
9. f (x) = 2x5 + 5x3 − 2
Solution:
f (−x) = 2(−x)5 + 5(−x)3 − 2
= −2x5 − 5x3 − 2
6= −f (x) or f (x).
Therefore, f (x) is neither odd nor even.
π
10. f (x) = cos 3 x −
4
Solution:
π
f (−x) = cos 3 −x −
4 π = cos 3 − x +
4
π
= cos 3 x +
4
6= f (x).
Therefore, f (x) is neither odd nor even.
11. f (x) = x2 sin x
Solution:
f (−x) = (−x)2 sin(−x)
= x2 (− sin x)
= −x2 sin x
= −f (x).
Therefore, f (x) is odd. Of course, we could also show this by simply noting that f (x) is the product
of an even function (x2 ) and an odd function (sin x), which means that f (x) must be odd.
16. (a) Show that the functions 1 and x are orthogonal on −1 ≤ x ≤ 1.
Solution:
Z
1
1 · x dx
< 1, x > =
−1
Z 1
=
=
x dx
−1
1
x2 2 −1
= 0.
Since < 1, x >= 0, 1 and x are orthogonal on −1 ≤ x ≤ 1.
2
(b) Find a quadratic polynomial which is orthogonal to both 1 and x on −1 ≤ x ≤ 1.
Solution: Let p2 (x) = x2 + bx + c. We choose p2 (x) to be of this form because there are only
two orthogonality conditions, which gives us only two equations. We could also have chosen
p(x) = ax2 + bx + c, which would have given us an arbitrary variable, which we could have
then set to be any value.
Z 1
2
1 · (x2 + bx + c) dx
< 1, x + bx + c > =
−1
1
Z
=
(x2 + bx + c) dx
−1
1
1 3 1 2
= x + bx + cx
3
2
−1
2
= + 2c.
3
Z 1
< x, x2 + bx + c > =
x · (x2 + bx + c) dx
−1
1
Z
=
x3 + bx2 + cx dx
−1
1 4 1 3 1 2 1
= x + bx + cx 4
3
2
−1
2
= b.
3
Since we require both of these inner products to be 0, we obtain
2
+ 2c
3
1
=⇒ c = − .
3
2
0= b
3
=⇒ b = 0.
0=
Therefore, a quadratic polynomial which is orthogonal to both 1 and x on −1 ≤ x ≤ 1 is
1
p2 (x) = x2 − . (Note that any constant multiple of this polynomial will also work.)
3
(c) Show that the quadratic in part (b) actually is orthogonal to any linear function f (x) = ax + b
on −1 ≤ x ≤ 1.
3
1
2
Solution: We can show this directly by taking the inner product x − , ax + b .
3
Z 1
1
1
2
2
x − , ax + b =
x −
(ax + b) dx
3
3
−1
Z 1
Z 1
1
1
2
2
=
x −
(ax) dx +
x −
b dx
3
3
−1
−1
Z 1
Z 1
1
1
3
x2 − dx
x − x dx + b
=a
3
3
−1
−1
1 !
1 3 1 = a(0) + b
x − x
3
3 −1
= 0.
Therefore, the quadratic from part (b) is orthogonal to any linear function.
(d) Find a cubic polynomial which is orthogonal to 1, x, and the quadratic from part (b), on
−1 ≤ x ≤ 1. (If we continue in this manner, we generate a set of orthogonal polynomials
called the Legendre polynomials, which we treat in Chapter 7.)
Solution: Let p3 (x) = x3 + ax2 + bx + c. then, we know
3
Z
2
1
< 1, x + ax + bx + c > =
1 · (x3 + ax2 + bx + c) dx
−1
1
Z
=
(x3 + ax2 + bx + c) dx
−1
1
1 4 1 3 1 2
= x + ax + x + cx
4
3
2
−1
2
= a + 2c.
3
Z 1
< x, x3 + ax2 + bx + c > =
x · (x3 + ax2 + bx + c) dx
−1
1
Z
=
x4 + ax3 + bx2 + cx dx
−1
1 5 1 4 1 3 1 2 1
= x + ax + bx + cx 5
4
3
2
−1
2 2
= + b.
5 3
4
Z 1
1
1 3
2
2
x −
(x3 + ax2 + bx + c) dx
x − , x + ax + bx + c =
3
3
−1
Z 1
Z
1 1 3
2 3
2
=
x (x + ax + bx + c) dx −
(x + ax2 + bx + c) dx
3
−1
−1
Z 1
1
2
5
4
3
2
x + ax + bx + cx dx −
=
a + 2c
3 3
−1
2
2
1 6 1 5 1 4 1 3 1
= x + ax + bx + cx − a − c
6
5
4
3
9
3
2
−1
2
2
2
2
= a+ c− a− c
5
3
9
3
8
= a.
45
Since we require all three of these inner products to be 0, we obtain
2
0 = a + 2c
3
2 2
0= + b
5 3
8
0 = a.
45
3
Solving gives a = 0, b = , and c = 0. Therefore, the requisite cubic is
5
3
p3 (x) = x3 + x.
5
Again, we note that any constant multiple of this polynomial will work.
17. Find the inner product of f and g, with respect to the weight function w, on the given interval.
√
(a) f (x) = x, g(x) = x2 , w(x) = x, 0 ≤ x ≤ 4
Solution:
Z
4
< f (x), g(x) > =
f (x)g(x)w(x) dx
0
Z
4
=
√
x(x2 )( x) dx
0
Z
=
4
7
x 2 dx
0
2 9 4
= x 2 9
0
2 9
= 42
9
1024
.
=
9
(b) f (x) = 1 + x, g(x) = 2 + x, w(x) = x2 ,
0≤x≤1
5
Solution:
Z
1
f (x)g(x)w(x) dx
< f (x), g(x) > =
0
Z
1
(1 + x)(2 + x)x2 dx
=
0
Z
1
(x2 + 3x + 2)x2 dx
=
0
Z
1
x4 + 3x3 + 2x2 dx
1 5 3 4 2 3 1
= x + x + x 5
4
3 0
1 3 2
= + +
5 4 3
97
= .
60
=
0
6
2
Exercies 3.3: 2, 5, 10, 17 (EC)
2. Calculate the Fourier series of f (x) on the given interval.
(
−1, if − 3 ≤ x < 0
f (x) =
2,
if 0 ≤ x ≤ 3
Solution:
1
a0 =
3
Z
3
f (x) dx
−3
Z 0
Z
1
1 3
=
−1 dx +
2 dx
3 −3
3 0
2
1
=
−x|0−3 + x|30
3
3
= 1.
Z
1 3
nπx
an =
f (x) cos
dx
3 −3
3
Z
Z
1 0
nπx
nπx
1 3
=
dx +
dx
− cos
2 cos
3 −3
3
3 0
3
nπx 0
nπx 3
2
1
sin
sin
=−
+
nπ
3 −3 nπ
3 0
= 0.
Z
1 3
nπx
bn =
f (x) sin
dx
3 −3
3
Z
Z
1 0
nπx
1 3
nπx
=
− sin
dx +
2 sin
dx
3 −3
3
3 0
3
1
nπx 0
nπx 3
2
=
cos
cos
−
nπ
3 −3 nπ
3 0
2
1
(1 − cos(−nπ)) −
(cos(nπ) − 1)
=
nπ
nπ
3
=
(1 − cos nπ)
nπ
3
=
(1 − (−1)n )
nπ
So, we have
∞
F (x) =
1 X 3
nπx
+
(1 − (−1)n ) sin
.
2
nπ
3
n=1
But, if we note that
3
bn =
·
nπ
(
0, if n is even,
,
2, if n is odd
then we can write (by letting n = 2k).
∞
1 X
6
(2k − 1)πx
F (x) = +
sin
.
2
(2k − 1)π
3
k=1
7
Then, let n = k to obtain
∞
6
(2n − 1)πx
1 X
sin
.
F (x) = +
2
(2n − 1)π
3
n=1
5. Calculate the Fourier series of f (x) on the given interval.
f (x) = x2 , on − 1 ≤ x ≤ 1
Solution:
Z
1
x2 dx
a0 =
−1
1 3 1
= x 3 −1
2
= .
3
Z
1 1 2
an =
x cos nπx dx
1 −1
Z 1
x2 cos nπx dx since x2 cos nπx is even.
=2
0
!
1 Z 1
1 2
2
=2
x sin nπx −
x sin nπx dx
nπ
0 nπ
0
!
1 Z 1
2
2
x cos nπx −
cos nπx dx
=2
2
(nπ)2
0 (nπ)
0
2
=2
cos
nπ
(nπ)2
4
=
(−1)n .
(nπ)2
Z
1 1 2
bn =
x sin nπx dx
1 −1
= 0 since x2 sin nπx is odd .
Therefore, we obtain
∞
F (x) =
1 X
4
+
(−1)n
cos nπx.
3
(nπ)2
n=1
8
10. Calculate the Fourier series of f (x) on the given interval.

π

0, if − π ≤ x < − 2
f (x) = 1, if − π2 < x < π2


0, if π2 < x ≤ π
Solution:
a0 =
=
1
π
Z
1
π
Z
π
f (x) dx
−π
π
2
1 dx
− π2
= 1.
Z
1 π
an =
f (x) cos nx dx
π −π
Z π
1 2
=
cos nx dx
π −π
2
=
=
=
bn =
=
π
1
sin nx|−2 π
2
nπ nπ
−nπ
1
sin
− sin
nπ
2
2
2
nπ
sin
.
nπZ
2
π
1
f (x) sin nx dx
π −π
Z π
1 2
sin nx dx
π −π
2
π
1
=
cos nx|−2 π
2
nπ 1
nπx
−nπ
=
cos
− cos
nπ
2
2
= 0.
Therefore, we obtain
∞
F (x) =
1 X 2
nπ
+
sin
cos nx.
2
nπ
2
n=1
17. (EC) Complex Fourier Series: Using Euler’s formula, eiθ = cos θ + i sin θ, we can rewrite the Fourier
series in the form
∞
X
ikπx
f (x) ∼
ck e L .
n=−∞
Using L = π,
(a) Find the coefficients ck in terms of the coefficients an and bn of the original Fourier series
(where k = ±n).
9
Solution: Since L = π, we have
f (x) ∼
=
∞
X
k=−∞
∞
X
ck eikx
ck (cos kx + i sin kx)
k=−∞
=
0
X
∞
X
ck (cos kx + i sin kx) +
k=−∞
ck (cos kx + i sin kx) .
k=0
Let l = −k and rewrite the first sum in l.
f (x) ∼
=
∞
X
∞
X
c−l (cos(−lx) + i sin(−lx)) +
l=0
∞
X
ck (cos kx + i sin kx)
k=0
∞
X
c−l (cos lx − i sin lx) +
l=0
ck (cos kx + i sin kx) .
k=0
Let l = n and let k = n and rewrite both sums.
f (x) ∼
=
∞
X
c−n (cos nx − i sin nx) +
n=0
∞
X
∞
X
n=0
n=0
∞
X
cn (cos nx + i sin nx)
n=0
(c−n + cn ) cos nx +
= 2c0 +
∞
X
(cn − c−n ) sin nx
(cn + c−n ) cos nx +
n=1
∞
X
(cn − c−n ) sin nx.
n=1
Now, equate the above expression with the Fourier series for f (x).
∞
∞
∞
∞
n=1
n=1
n=1
n=1
X
X
X
a0 X
(cn − c−n ) sin nx.
(cn + c−n ) cos nx +
bn sin nx = 2c0 +
an cos nx +
+
2
Finally, solve for cn and c−n .
a0
= 2c0
2
an = cn + c−n ,
n = 1, 2, . . .
bn = cn − c−n , n = 1, 2, . . .
a0
=⇒ c0 =
4
an + bn
cn =
, n = 1, 2, . . .
2
an − bn
c−n =
, n = 1, 2, . . . ,
2
Or,
ck =
a
0

4,
an +bn
2 ,

 an −bn
2 ,
10
if k = 0,
if n > 0,
if n < 0.
It turns out that, when complex functions are involved, we must change the definition of inner
product, so that it has certain desirable mathematical properties which are satisfied by the
real inner product and the vector dot product. Actually, this complex inner product turns out
to be
Z
L
f (x)g(x) dx,
< f (x), g(x) >=
−L
where f (x) is the complex conjugate of f (x). Note that if f and g were both real, then this
turns out to be the same as the inner product from Definition 3.3.
(b) Show that eikx = e−ikx .
Solution:
eikx = cos kx + i sin kx
= cos kx − isin kx
= cos kx − i sin kx.
And,
e−ikx = cos(−kx) + i sin(−kx)
= cos kx − i sin kx
= eikx . X
∞
X
(c) Assume that f (x) =
ck eikx , on −π ≤ x ≤ π. Find the coefficients by way of the complex
n=−∞
inner product < eikx , f (x) > on −π ≤ x ≤ π.
Solution: First, we need to verify that < eikx , eilx >= 0 if k 6= l on −π ≤ x ≤ π.
Z π
eikx eilx dx
< eikx , eilx > =
Z−π
π
=
e−ikx eilx dx
−π
Z π
=
ei(l−k)x dx.
−π
If l = k, then we have
Z π
ikx ikx
< e ,e > =
dx
−π
= 2π.
11
If l 6= k, then we have
π
1
ei(l−k)x i(l − k)
−π
1
ei(l−k)π − ei(l−k)(−π)
=
i(l − k)
1
=
((cos(l − k)π + i sin(l − k)π) − (cos(l − k)(−π) + i sin(l − k)(−π)))
i(l − k)
1
=
((cos(l − k)π + i sin(l − k)π) − (cos(l − k)π − i sin(l − k)π))
i(l − k)
1
=
2 sin(l − k)π
l−k
= 0.
< eikx , eilx > =
Now, back to our problem to determine an equation for ck .
*
+
∞
X
inx
inx
ikx
< e , f (x) > = e ,
ck e
Z
π
=
n=−∞
∞
X
−inx
e
−π
=
∞
X
ck eikx dx
n=−∞
Z
π
ck
n=−∞
(
2πck ,
=
0,
e−inx eikx dx
−π
if n = k,
if n =
6 k
=⇒ < eikx , f (x) > = 2πck .
Solving, we find
ck =
3
1
< eikx , f (x) >,
2π
k = 0, 1, . . . .
Exercises 3.4: 2, 4, 6
2. Determine if f (x) is piecewise continuous and if it is piecewise smooth (assume that L > 0). (If f
is actually continuous or smooth, say so.)
(
−x2 , if − L ≤ x < 0,
f (x) =
x2 ,
if 0 ≤ x ≤ L
Solution: Since f (0−) = 0 = f (0+), we see that f is continuous. To determine if it is smooth, we
will construct f 0 (x):
(
−2x, if − L ≤ x < 0,
f 0 (x) =
.
2x,
if 0 ≤ x ≤ L
Since f 0 (0−) = 0 = f 0 (0+), we see that f 0 (x) is continuous, so f 0 (x) is smooth.
12
4. Determine if f (x) is piecewise continuous and if it is piecewise smooth (assume that L > 0). (If f
is actually continuous or smooth, say so.)
4
f (x) = x 3 , on − L ≤ x ≤ L.
Solution: We can see that f (x) is continuous on −L ≤ x ≤ L. And since
4 1
f 0 (x) = x 3 ,
3
which is continuous for all x, we see that f (x) is smooth.
6. Determine if f (x) is piecewise continuous and if it is piecewise smooth (assume that L > 0). (If f
is actually continuous or smooth, say so.)


2, if x = −3,
f (x) = x, if − 3 < x ≤ 1,

1
x , if 1 < x ≤ 3
Solution: We can see that f is not continuous, since f (−3) = 2 and f (−3+) = −3 6= f (−3). f is,
however, piecewise continuous. And, f 0 (x) is not defined at x = −3, but is defined and continuous
on −3 < x ≤ 1 and 1 ≤ x ≤ 3, and f 0 (−3+) exists and is finite. Therefore, f 0 is piecewise
conditnuous and f (x) is piecewise smooth.
4
Exercises 3.4: 8, 10, 19(a), (b)
8. Sketch three periods of the graph of the Fourier series of
f (x) = x2 on − 2 ≤ x ≤ 2.
Solution: We have the following sketch (made by brute force in MATLAB).
13
10. Sketch three periods of the graph of the Fourier series of
(
0,
if − 3 ≤ x < 0,
f (x) =
1 − x, if 0 ≤ x ≤ 3.
Solution: We have the following sketch (made by brute force in MATLAB).
19. In the 17th and 18th centuries, starting even before the discovery/invention of calculus, finding the
sum of various infinite series was a hot topic. For example, as early as 1736, Euler quite cleverly
came up with the sum
∞
X
1
π2
=
,
n2
6
n=1
a sum that other famous mathematicians had been unable to evaluate, the most notable being the
Swiss mathematician James Bernoulli (1654-1705). Around the same time, Euler also came up with
∞
∞
X
X
1
π4
1
π6
=
and
=
.
n4
90
n6
945
n=1
n=1
(a) Many of these infinite series are much easier to deal with using Fourier series. Use the Fourier
series for f (x) = x2 on −1 ≤ x ≤ 1 and Theorem 3.1 to derive Euler’s sum
∞
X
1
1 1
π2
=
1
+
+
+
·
·
·
=
.
n2
4 9
6
n=1
14
Solution: We may find the Fourier series expansion of f (x) = x2 on −1 ≤ x ≤ 1 using the
formulas from Section 3.3, which you did in Exercises 3.3, problem 5. We obtain
F (x) =
∞
4 X (−1)n
1
cos nπx.
+ 2
2 π
n2
n=1
From Theorem 3.1, this is equal to x2 . So, if we let x = 1, then we obtain
∞
1
4 X (−1)n
cos nπ.
+ 2
3 π
n2
12 =
n=1
Since cos nπ = (−1)n , we have
1=
∞
1
4 X 1
.
+ 2
3 π
n2
n=1
Solving for the infinte series gives
∞
X
1
π2 2
π2
=
· =
.
2
n
4 3
6
n=1
(b) Use the same Fourier series to find the sum
∞
X
(−1)n+1
n=1
=1−
n2
1 1
1
+ −
+ ··· ,
4 9 16
that is, the alternating version of the sum in (a).
Solution: If we let x = 0 in the Fourier series expansion of f (x) = x2 , we obtain
∞
1
4 X (−1)n
0 = + 2
.
3 π
n2
2
n=1
Then, solve for the series.
∞
4 X (−1)n
1
=−
2
2
π
n
3
n=1
∞
X
−
n=1
∞
X
n=1
(−1)n
π2
=
−
n2
12
(−1)n
π2
=
2
n
12
∞
X
(−1)n+1
n=1
15
n2
=
π2
12