15.7 Approximations Using Wavelets 539
when n increases by 1, this is not surprising. We now have a comparable rate of
convergence for Daubechies wavelets.
In approximating a function, a reasonable measure of the size of the approxi-
mant is the number of coefficients used. For f ∈ L
2
(0, 1), we have
H
n
f(x) = hf, ϕiϕ(x) +
n−1
X
k=0
2
k
−1
X
j=0
hf, ψ
kj
iψ
kj
(x)
and so H
n
f uses 2
n
coefficients. If there is a bound on the number of coefficients
that we can use, due to storage limitations, for example, one choice is to use the
largest value of n so that H
n
f does not have too many coefficients. It is frequently
better to use a larger value of n and then replace small coefficients with zero. This
has the advantage that if f has large irregularities at small resolution, these will
appear in the approximation.
15.7.4. EXAMPLE. Consider the function given by
f(x) =
(
x if x ∈ (−π, π),
0 if |x| ≥ π.
In Section 14.5, we analyzed the how the partial sums S
n
f of the Fourier series
approximated f near the discontinuity at π. The Fourier series for f on (−π, π) is
f(x) ∼ 2
∞
X
k=1
(−1)
k+1
k
sinkx,
which converges very slowly. Even at a point well away from the discontinuity,
convergence is slow. For example, if x = π/2, then we get
f(π/2) = 2
∞
X
k=0
(−1)
k
2k + 1
.
To get 2
n
P
k=0
(−1)
k
/(2k + 1) within 10
−6
of the exact sum of the series, we need
n ≥ 500, 000. (To be fair, we can do better with Fej
´
er kernels, but the behaviour is
not optimal even then.)
The Haar wavelet approximations H
n
f are the step functions taking the av-
erage value of f over each interval of length 2
−n
. It is not difficult to see that
except for two intervals about the discontinuities ±π, the convergence is uniform.
The maximum error is 2
−n−1
. Since the number of coefficients needed is roughly
2
n+1
π, we see that this convergence is not much more efficient than the Fourier se-
ries globally. However, to compute f(π/2), note that only n terms in the expansion
H
n
f are nonzero at π/2. Thus to compute this value within 10
−6
, we only need 19
terms since 2
−20
< 10
−6
.
Even better, the vanishing moments of the Daubechies wavelets ensure that so
long as the support of ψ
kj
does not contain ±π, thecoefficient hf, ψ
kj
iwill be zero.
Since ψ has support in [0, 3], each ψ
kj
has support in an interval of length 3/2
k
,