Image Filtering Advanced Image Filtering Advanced Image filtering with GDI and DX HW accelerations.
HW #7 SOLUTIONS - UCSD Mathematics | Homebenchow/W17/HW7Solutions.pdf · HW #7 SOLUTIONS 3 for all...
Transcript of HW #7 SOLUTIONS - UCSD Mathematics | Homebenchow/W17/HW7Solutions.pdf · HW #7 SOLUTIONS 3 for all...
HW #7 SOLUTIONS
1. Let f and g be Riemann-integrable complex-valued functions on [−π, π]. Define
〈f, g〉 =
∫ π
−πfg dx and ‖f‖ =
√〈f, f〉 ≥ 0.
For integrable functions and c ∈ C, prove that:(a) 〈cf1 + f2, g〉 = c〈f1, g〉+ 〈f2, g〉,(b) 〈f, cg1 + g2〉 = c〈f, g1〉+ 〈f, g2〉,(c) 〈g, f〉 = 〈f, g〉.(d) If f is continuous and ‖f‖ = 0, then f(x) = 0 for all x ∈ [−π, π]. Remark : We say that 〈·, ·〉 is a Hermitianinner product on the space of continuous functions.
Solution
(a) 〈cf1 + f2, g〉 =∫ π−π(cf1 + f2)g dx =
∫ π−π cf1g + f2g dx = c
∫ π−π f1g dx+
∫ π−π f2g dx = c〈f1, g〉+ 〈f2, g〉.
(b) 〈f, cg1 + g2〉 =∫ π−π f(cg1 + g2) dx =
∫ π−π f(cg1 + g2) dx = c
∫ π−π fg1 dx+
∫ π−π fg2 dx = c〈f, g1〉+ 〈f, g2〉.
(c) 〈g, f〉 =∫ π−π gf dx =
∫ π−π gf dx =
∫ π−π fg dx = 〈f, g〉.
(d) If f : [−π, π] → C is continuous and ‖f‖ = 0, then∫ π−π |f | dx = 0. Let g : [−π, π] → [0,∞) be defined
by g(x) = |f(x)|. It suffices to show that g = 0.
Suppose for some a ∈ [−π, π], g(a) > 0. Since g is continuous, being a composition of two continuous func-tions f and the absolute value function, g−1(( 1
2g(a),∞)) is an open set in [−π, π] containing a. Therefore there
exists c < d such that a ∈ [c, d] ⊂ [−π, π] and g(x) ≥ 12g(a) for all x ∈ [c, d]. We have now
0 =
∫ π
−πg(x) dx ≥
∫ d
c
g(x) dx ≥∫ d
c
1
2g(a) dx =
1
2g(a) · (d− c) > 0,
a contradiction.
2. We say that a function f from R to C is in C2 if it is twice-differentiable, i.e., f ′ and f ′′ exist, and itssecond derivative f ′′ is continuous. In this case we write f ∈ C2.(a) Let f, g ∈ C2 be 2π-periodic, i.e., f(x+ frm−epi) = f(x) for all x ∈ R. Prove that
〈f ′′, g〉 = −〈f ′, g′〉 = 〈f, g′′〉,
where the inner product is defined by (1).(b) Let φ ∈ C2 be a nonzero 2π-periodic function satisfying φ′′ = −λφ, where λ ∈ C. Prove that λ ∈ R andλ ≥ 0.(c) Let φ be as in part (b). Prove that if φ is not constant, then λ > 0.
Solution.
(a) Since f(x+2π) = f(x) for all x ∈ R, differentiating, we have f ′(x+2π) = f ′(x) and again f ′′(x+2π) = f ′′(x).1
2 HW #7 SOLUTIONS
So f, f ′, f ′′ are all 2π-periodic. By integration by parts,∫ π−π f
′′(x)g(x) dx = (f ′(π)g′(π) − f ′(−π)g′(−π)) −∫ π−π f
′(x)g′(x) dx = −∫ π−π f
′(x)g′(x) dx. Note: g′ exists and g′ = g′, which follows directly from writing
g(x) = g1(x) + ig2(x) where g1 = Re g and g2 = Im g2, for x ∈ [−π, π].
The other equality follows similarly with integration by parts. (b) By part (a), −λ〈φ, φ〉 = 〈φ′′, φ〉 = −〈φ′, φ′〉.Since φ is in C2, it’s in particular continuous, and since it’s nonzero, 〈φ, φ〉 6= 0 by #1d. So λ = 〈φ′, φ′〉/〈φ, φ〉 isreal and nonnegative.
(c) Since φ′ is differentiable, it’s continuous, so if φ is nonconstant then φ′ 6= 0, i.e. 〈φ′, φ′〉 6= 0 by #1dagain. Therefore λ = 〈φ′, φ′〉/〈φ, φ〉 > 0.
3. (a) Let f, g ∈ C2 be 2π-periodic functions satisfying f ′′ = −λf and g′′ = −µg, where λ, µ ∈ R. Provethat if λ 6= µ, then 〈f, g〉 = 0.(b) Recall from ODE theory that the general solution to φ′′ = −λφ, where λ ≥ 0, is
φ(x) = c1 cos(√λx) + c2 sin(
√λx).
Prove that if φ is 2π-periodic, then λ = n2 for some n ∈ Z.(c) Let φ ∈ C2 be a 2π-periodic function satisfying φ′ = −λφ, where λ ∈ R. Prove that if φ is not constant, thenλ ≥ 1.
Solution.
(a) We have −λ〈f, g〉 = 〈f ′′, g〉 = 〈f, g′′〉 = −µ〈f, g〉 because λ, µ are reals. If λ 6= µ, then (µ − λ)〈f, g〉 = 0implies that 〈f, g〉 = 0.
(b) If c1 and c2 are not both 0, then φ(x)/√c21 + c22 can be written as sin(
√λx + a) for some a ∈ R by use
of the well-known formula sin(θ1 + θ2) = sin(θ1) cos(θ2) + cos(θ1) sin(θ2). The function x 7→ sin(√λx + a) has
a period 2π√λ
, so if φ is 2π-periodic then 2π must be a positive integer multiple of 2π√λ
, i.e. 2π√λn = 2π for some
n ∈ Z, or λ = n2.
(c) Follows directly from part (b) above and from #2(c), for if n2 > 0 then n2 ≥ 1 (if n ∈ Z).
4. Do Exercise #13 on p. 198.
Solution.
Define f : [0, 2π]→ R by
f(x) =
{x if 0 ≤ x < 2π0 if x = 2π
We apply Parseval’s Theorem, obtaining1
2π
∫ 2π
0
|f |2 dx =∑n∈Z|cn|2, where cn = 1
2π
∫ 2π
0f(x)e−inx dx.
Note that, in general, if f, g are Riemann-integrable functions on a compact interval [a, b] such that f(x) = g(x)
HW #7 SOLUTIONS 3
for all x ∈ [a, b] except at a finite set, then∫ baf(x) dx =
∫ bag(x) dx. Therefore 1
2π
∫ 2π
0|f |2 dx = 1
2π
∫ 2π
0x2 dx = 4π2
3 .
c0 = 12π
∫ 2π
0x dx = π.
For n 6= 0, cn = 12π
∫ 2π
0xe−inx dx = − 1
in by integration by parts.
Therefore |cn|2 = 1n2 if n 6= 0 and |c0|2 = π2.
We have then 4π2
3 = π2 + 2∑∞n=1
1n2 , or
∑∞n=1
1n2 = π2
6 .
5. We say that a function f from R to C is in C1 if it is continuously differentiable, i.e., f ′ exists and f ′ iscontinuous. Recall that if g ∈ R,
cm(g) =1
2π
∫ π
−πg(x)e−imx dx.
(a) Let f ∈ C1 be a 2π-periodic function. Prove that
cm(f ′) = imcm(f).
(b) Prove Wirtinger’s inequality: If f ∈ C1 is a 2π-periodic function with∫ π−π f(x) dx = 0, then∫ π
−π|f(x)|2 dx ≤
∫ π
−π|f ′(x)|2 dx,
with equality if and only if f(x) = c1eix + c−1e
−ix.
Solution.
(a) cm(f ′) = 12π
∫ π−π f
′(x)e−imx dx = 12π
(f(π)e−imπ − f(−π)eimπ + im
∫ π−π f(x)e−imx dx
)= 1
2π im∫ π−π f(x)e−imx dx =
imcm(f).
(b) From part (a) and Parseval’s Theorem, the left hand side of the inequality is∑n∈Z |cn(f)|2 and the right
hand side is∑n∈Z n
2|cn(f)|2, so the inequality is clear. Since∫ π−π f(x) dx = 0, we have c0(f) = 0. Therefore
the equality holds if and only if cn(f) = 0 for all |n| ≥ 2. By Parseval’s Theorem applied to the functionf − c1(f)eix − c−1e−ix, we have
∫ π−π |f − c1(f)eix − c−1e−ix|2 dx = 0 if and only if the equality in Wirtinger’s
inequality holds. But∫ π−π |f − c1(f)eix − c−1e−ix|2 dx = 0 if and only if f = c1(f)eix − c−1e−ix by #1(d) (f is
continuous).