Math 118 :: Winter 2009 :: Homework 3 Solution 1 ∗

advertisement
Math 118 :: Winter 2009 :: Homework 3 Solution∗
February 28, 2009
1
Let f be the unit step function on [a, b] with the discontinuity point xd , i.e.
(
0, a ≤ x ≤ xd
f (x) =
(1)
1, xd < x ≤ b
For any partition a = x0 < x1 < · · · < xn−1 < xn = b, we assume that xd is in
the interval [xi , xi+1 ) for some i. Then we have
(
1, if p = i
|f (xp+1 ) − f (xp )| =
(2)
0, if p 6= i
hence,
X
|f (xp+1 ) − f (xp )| = 1
(3)
p
for any partition. Thus, the total variation, which is defined as the supremum
of this sum, equals one.
2
(a)
CN = 1 for piecewise linear splines.
∗ contact
Kaiyuan Zhang through kzhang@math.stanford.edu for any questions.
1
(b)
On the one hand,
¯
¯
¯X
¯
¯N
¯
|p(x)| = ¯¯
yj k(x − xj )¯¯
¯ j=1
¯
≤
N
X
(4)
|yj ||k(x − xj )|
(5)
max |yi ||k(x − xj )|
(6)
j=1
≤
N
X
j=1
i
= max |yi | ·
i
N
X
|k(x − xj )|
(7)
j=1
≤ max |yi | · sup
i
x
N
X
|k(x − xj )|
(8)
j=1
(9)
One the other
possible constant. Let x∗
PN hand, we show that CN is the smallest
∗
maximize j=1 |k(x − xj )| and yj be 1 if k(x − xj ) ≥ 0, −1 if k(x∗ − xj ) < 0.
Then we have
p(x∗ ) =
N
X
yj k(x∗ − xj )
(10)
|k(x∗ − xj )|
(11)
j=1
=
N
X
j=1
Therefore,
CN ≥
N
N
X
X
|p(x∗ )|
=
|k(x∗ − xj )| = sup
|k(x − xj )|
maxi |yi | j=1
x
j=1
2
(12)
(c)
N
X
|Sh (x − xj )|
(13)
j=1
=
¯
N ¯
X
¯ sin((x − xj )π/h) ¯
¯
¯
¯ (x − xj )π/h ¯
(14)
¯
N ¯
X
¯ sin(π(x − x0 )/h) ¯
¯
¯
¯ π(x − x0 )/h − jπ ¯
(15)
j=1
=
j=1
=| sin(π(x − x0 )/h)|
¯
N ¯
X
¯
¯
1
¯
¯
¯ π(x − x0 )/h − jπ ¯
(16)
j=1
(17)
Then, let y = π(x − x0 )/h,
CN = sup
x
= sup
y
N
X
|Sh (x − xj )|
N
X
| sin(y − jπ)|
j=1
= sup | sin y|
y
(18)
j=1
|y − jπ|
N
X
j=1
1
|y − jπ|
N
1
π X
≥ [let y = ]
2 j=1 (j − 12 )π|
R 3π/2 1
R (N +1/2)π 1
dx
dx
π/2 x
(N −1/2)π x
≥
+ ··· +
π
π
1
= (ln((N + 1/2)π) − ln(π/2))
π
1
= ln(2N + 1)
π
1
1
> ln N + ln 2
π
π
3
(19)
(20)
(21)
(22)
(23)
(24)
(25)
(d)
We assume that N h < π/2.
CN = sup
x
= sup
x
< sup
x
= sup
x
N
X
|SN (x − xj )|
(26)
| sin(π(x − xj )/h)|
2π/h| tan((x − xj )/2)|
(27)
j=1
N
X
j=1
N
X
| sin(π(x − xj )/h)|
j=1
2π/h|(x − xj )/2|
N
X
| sin(π(x − xj )/h)|
j=1
|π(x − xj )/h|
(28)
(29)
Therefore CN is smaller than that in (c).
(e)
Chebyshev interpolation is equivalent to a bandlimited interpolation on a periodic equispaced grid. Thus it has the same CN as (d).
3
dx
Let H be the L2 space over [−1, 1] with the measure √1−x
. For any f ∈ H, let
2
P∞
f = n=0 an Tn , then
1 ˆ
hf, Tn i
=
fn
(30)
an =
hTn , Tn i
kTn k2
where
fˆn = hf, Tn i
(31)
is the Fourier transform. Therefore the Plancherel Identity is
kf k2H =
∞
X
|an |2 kTn k2 =
n=0
∞
X
1
|fˆ |2 = kfˆk2G
2 n
kT
k
n
n=0
where G is the `2 space over n = 0, 1, 2, · · · and
(
π, n = 0
kTn k2 =
π/2, n > 0
4
(32)
(33)
4
(a)
y1 − y0
= −2
x1 − x0
y2 − y1
=4
z2 = −z1 + 2
x2 − x1
z1 = −z0 + 2
(34)
(35)
For k ≥ 2, yk does not change, so zk = 4 if k is even, zk = −4 if k is odd.
(b)
s0 (x) = 1 − x2
(36)
2
s1 (x) = −2(x − 1) + 3(x − 1)
(37)
2
(38)
2
(39)
s2 (x) = 1 + 4(x − 2) − 4(x − 2)
s3 (x) = 1 − 4(x − 3) + 4(x − 3)
2
1.5
1
0.5
0
−0.5
0
0.5
1
1.5
2
2.5
3
3.5
(c)
CN = 2 as we can see from the plot (and it is also easy to verify).
5
4
(d)
http://en.wikipedia.org/wiki/Spline interpolation#Quadratic spline interpolation
The coefficients z above are basically a running derivative approximation.
Since only two points are used to calculate the next iteration’s curve (instead of
three), this method is susceptible to severe oscillation effects when signal change
is quickly followed by a steady signal. Without some sort of dampening, these
oscillation effects make the above method a poor choice.
5
(a)
1
un+1 = un + (u0 )n h + (u00 )n h2 +
2
1
un−1 = un − (u0 )n h + (u00 )n h2 −
2
1 000
(u )n h3 +
6
1 000
(u )n h3 +
6
1 0000
(u )n h4 + o(h4 )
24
1 0000
(u )n h4 + o(h4 )
24
(40)
(41)
Then we have
un+1 − 2un + un−1
1
= (u00 )n + (u0000 )n h2 + o(h2 )
h2
12
(42)
It is a second order approximation.
(b)
Applying centered difference twice gives
un+2 −un
2h
n−2
− un −u
un+2 − 2un + un−2
2h
=
2h
4h2
(43)
If we do some computation,
1
1
1
un+2 = un + (u0 )n (2h) + (u00 )n (2h)2 + (u000 )n (2h)3 + (u0000 )n (2h)4 + o(h4 )
2
6
24
(44)
1
1
1
un−2 = un − (u0 )n (2h) + (u00 )n (2h)2 − (u000 )n (2h)3 + (u0000 )n (2h)4 + o(h4 )
2
6
24
(45)
Then we find that
un+2 − 2un + un−2
1
= (u00 )n + (u0000 )n h2 + o(h2 )
4h2
3
This has a larger error than the previous formula.
6
(46)
Download