\documentstyle[12pt]{article}
%Define the strut
\def\s{\rule{0in}{3.0ex}}
\def\p{\vphantom{\tilde{\phi}}}
\def\Tr{{\rm Tr}}
\def\Poincare{Poincar\'e }
\def\Schrodinger{Schr\"odinger }
\def\doeack{This work  was supported in part by the Department of Energy, Nuclear
      Physics Division, under
      contracts W-31-109-ENG-38.}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{corollary}{Corollary}
\def\beq{\begin{equation}}
\def\eeq{\end{equation}}
\def\beqarray{\begin{eqnarray}}
\def\eeqarray{\end{eqnarray}}
%\voffset=-30mm
%\hoffset=-20mm
%\textwidth=170mm
%\textheight= 230mm
\begin{document}

\title{Wavelet Notes}
\author{B. M. Kessler, G. L. Payne, W. N. Polyzou
\\ \it The University of Iowa\\ \it Iowa City, IA, 52242}

\maketitle
\vspace{0.3cm}
\begin{abstract}
Notes on using wavelets in numerical calculations
\end{abstract}
\bigskip
\noindent {\bf file: usr/wavelets/revised-notes.tex}
\bigskip


\section{Continuous Wavelets} 

We begin by considering the continuous wavelet transform.  The
continuous wavelet transform is an alternate representation of a
function, like a Fourier transform.  Both continuous and discrete
wavelets are built from a single function called a {\bf mother
function}.  The notation, $\psi(x)$, is used to denote the mother
function of a wavelet.

Wavelets are built from translations and scale transformations of 
the mother function. Translations and scale transformations of $\psi(x)$
are defined by:
\beq
\psi_{t,s} (x) := \vert s \vert^{-p}\psi({x-t \over s}).
\eeq

The factor $p$ is a parameter.  The functions $\psi_{t,s} (x)$ are the
wavelets associated with the mother function $\psi(x)$.  The wavelet
$\psi_{t,s} (x)$ has two continuous parameters.  We investigate
conditions on the mother function that allow one to expand any
function in terms of wavelets.

To choose the parameter $p$ note that
\[
\int_{-\infty}^{\infty} \left\vert \vert s \vert^{-p}\psi({x-t \over s})
\right\vert^q dx =
\]
\beq
\vert s \vert^{1 - qp}  \int_{-\infty}^{\infty} \vert \psi(u) \vert^q du . 
\eeq
It follows that if $p=1/q$ the $L^q$-norm of $\psi$  
\beq
\Vert \psi \Vert_q := \left( \int_{-\infty}^{\infty} \vert \psi(u) \vert^q du
\right)^{1/q}  
\eeq
is preserved under scale transformations.  Thus for $p=1/q$:

\beq
\Vert \psi \Vert_q = \Vert \psi_{s,t} \Vert_q \qquad \mbox{for all} 
\qquad s,t .
\eeq

The {\bf continuous wavelet transform} of $f$ is defined by taking the 
scalar product of $f$ with the wavelet $\psi_{s,t}$:
\beq
\hat{f}(s,t) :=  
\int_{-\infty}^{\infty} \psi^*_{s,t}(x) f(x) dx = (\psi_{s,t},f) 
\eeq
where asterik $'*'$ indicates the complex conjugate for a
complex mother function.  In what follows a $\hat{f}$ is used to
indicate the wavelet transform of the function $f$.

Parseval's identity for the Fourier transform implies that the wavelet 
transform can be expressed in terms of the original 
function and the mother function 
or alternatively in terms of their Fourier transforms:
\beq
\hat{f}(s,t)= (\psi_{s,t},f) = (\tilde{\psi}_{s,t},\tilde{f})
\label{eq:AA}
\eeq
where the $\sim$ indicates the Fourier transform defined by:
\beq
\tilde{\psi}_{s,t}(k) = {1 \over \sqrt{2 \pi}} \int_{-\infty}^{\infty}
e^{-ikx} \psi_{s,t} (x) dx
\eeq
\beq
\tilde{f}(k) = {1 \over \sqrt{2 \pi}} \int_{-\infty}^{\infty}
e^{-ikx} f(x) dx.
\eeq

Note that Parseval's identity states 
$(f,f) = (\tilde{f},\tilde{f})$. 
Using this with $f=g+h$ and $f=g+ih$ gives
\beq
(g,g) + (h,h) + (g,h) + (h,g) =(\tilde{g},\tilde{g}) + 
(\tilde{h},\tilde{h}) + (\tilde{g},\tilde{h}) + (\tilde{h},\tilde{g}) 
\label{eq:AB}
\eeq
and
\beq
(g,g) + (h,h) + i(g,h) -i(h,g) =(\tilde{g},\tilde{g}) + 
(\tilde{h},\tilde{h}) +i (\tilde{g},\tilde{h}) -i (\tilde{h},\tilde{g}) 
\label{eq:AC}
\eeq
which, using the identities $(g,g)=(\tilde{g},\tilde{g})$ and 
$(h,h)=(\tilde{h},\tilde{h})$, gives the solution to (\ref{eq:AB})
and (\ref{eq:AC}):
\beq
(g,h)=(\tilde{g},\tilde{h})
\eeq
which is the form of Parseval's identity used in (\ref{eq:AA}).

The Fourier transform of the wavelet 
$\psi_{s,t}(x)$ can be expressed in terms of the 
Fourier transform of the mother function:

\[
\tilde{\psi}_{s,t}(k) := {1 \over \sqrt{2 \pi} }\int_{-\infty}^{\infty}
 e^{-i kx} \vert s \vert^{-p} \psi({x-t \over s}) dx=
\]
\[
{1 \over \sqrt{2 \pi} }\int_{-\infty}^{\infty}
e^{- i ksu} e^{- i kt} \vert s \vert^{-p+1} \psi(u) du=
\]
\beq
\vert s \vert^{1-p} e^{- i kt} \tilde{\psi} (sk).
\eeq


The inner product of the Fourier transforms gives
\[
\hat{f}(s,t) = (\tilde{\psi}_{s,t},\tilde{f})=
\]
\[
\int_{-\infty}^{\infty} \tilde{\psi}_{s,t}^* (k)
\tilde{f}(k) dk 
\]
\beq
\int_{-\infty}^{\infty} \vert s\vert^{1-p} e^{ i kt} \tilde{\psi}^* (sk)
\tilde{f}(k) dk . 
\label{eq:FA}
\eeq
Multiplying both sides of (\ref{eq:FA}) by $e^{-i k't}$ and 
integrating over $t$ gives
\[
{1 \over 2 \pi} \int_{-\infty}^{\infty} e^{- i k't} 
(\tilde{\psi}_{s,t},\tilde{f})dt =
\]
\beq
\vert s \vert^{1-p} \tilde{\psi}^* (sk')
\tilde{f}(k'),
\label{eq:FB}
\eeq
where the representation of the delta function:
\beq
{1 \over 2 \pi} \int_{-\infty}^{\infty} e^{- i (k'-k)t}dt = \delta (k'-k).
\eeq
was used to get (\ref{eq:FB}).

The right-hand side of (\ref{eq:FB}) is a product of the Fourier 
transform of the original function with another function.  
We can't divide by the function $\tilde{\psi}^* (sk')$ 
because it might be zero for some values of $k'$.  Instead, the trick is to
eliminate it using the variable $s$.

Multiply both sides of this equation by $\tilde{\psi}(sk')$ and a 
yet to be determined weight function $w(s)$ and integrate over $s$.
This gives

\[
{1 \over 2 \pi} \int_{-\infty}^\infty w(s) ds \int_{-\infty}^{\infty} dt 
e^{- i k't} \tilde{\psi}(sk') \hat{f}(s,t) =
\]
\beq
\tilde{f}(k') \int_{-\infty}^\infty w(s) ds
\vert s \vert^{1-p} \tilde{\psi}^* (sk') \tilde{\psi}(sk') =
\tilde{f}(k') Y(k') 
\label{eq:FC}
\eeq 
where
\beq
Y(k')= \int_{-\infty}^\infty ds w(s)  \vert s \vert^{1-p} 
\vert \tilde{\psi}(sk')\vert^2 .
\eeq

In order to be able to extract the Fourier transform of the original function,
it is sufficient that $Y(k')$ satisfies $0 < A \leq Y(k') \leq B < \infty$  
for some numbers $A$ and $B$.  In this case

\beq
\tilde{f} (k) = { 1 \over 2 \pi Y(k)}   
\int_0^\infty w(s) ds \int_{-\infty}^{\infty} dt 
e^{- i kt} \tilde{\psi}(sk) \hat{f}(s,t) .
\eeq

It is convenient to rewrite this in terms of the wavelet basis:
\beq
\tilde{f} (k) = { 1 \over 2 \pi Y(k)}   
\int_{- \infty}^\infty w(s) \vert s \vert^{p-1} ds \int_{-\infty}^{\infty} dt 
\tilde{\psi}_{s,t}(k) \hat{f}(s,t). 
\eeq

We define the {\bf dual wavelet} by
\beq
\tilde{\psi}^{s,t}(k) =
{ 1 \over 2 \pi Y(k)}\tilde{\psi}_{s,t}(k).
\label{eq:AD}
\eeq
The dual wavelet is distinguished from the ordinary wavelet by having 
the parameters $s,t$ appearing as superscripts rather than subscripts.

The inversion formula can be expressed in terms of the dual wavelet by
\beq
\tilde{f} (k) =    
\int_{-\infty}^\infty w(s) \vert s \vert^{p-1} ds \int_{-\infty}^{\infty} dt 
\tilde{\psi}^{s,t}(k) \hat{f}(s,t) .
\eeq

In order to recover the original function, take the inverse Fourier 
transform of this expressions:
\[
f(x) =  {1 \over \sqrt{2 \pi}} \int^{\infty}_{-\infty} dk
e^{ikx}\tilde{f}(k) =
\]
\beq
\int_{-\infty}^\infty w(s) \vert s\vert^{p-1} ds \int_{-\infty}^{\infty} dt 
\psi^{s,t}(x) \hat{f}(s,t) 
\eeq
where 
\beq
\psi^{s,t}(x) = {1 \over \sqrt{2 \pi}} \int^{\infty}_{-\infty} dk
e^{ikx} \tilde{\psi}^{s,t}(k).
\label{eq:AE}
\eeq
In general this is a tedious procedure because the dual wavelet $\psi^{s,t}(x)$
must be computed using (\ref{eq:AD}) and (\ref{eq:AE})
for each value of $s$ and $t$.  If the dual wavelet also
had a mother function, then it would only be necessary to Fourier transform 
the ``dual mother'' and then all of the other Fourier transforms could be 
expressed in terms of the transform of the ``dual mother''. 

The first step in constructing a ``dual mother'' is to investigate the 
structure of the dual wavelets in $x$-space:

\[
\psi^{s,t}(x) = {1 \over \sqrt{2 \pi}} \int^{\infty}_{-\infty} dk
e^{ikx} \tilde{\psi}^{s,t}(k) = 
\]
\[
{1 \over \sqrt{2 \pi}} \int^{\infty}_{-\infty} dk
e^{ikx}  { 1 \over 2 \pi Y(k)}
\vert s \vert^{1-p} e^{-i kt} \tilde{\psi} (sk) =
\]
\[
\psi^{s,0}(x-t) 
\]
where
\[
\psi^{s,0}(x) =
{1 \over \sqrt{2 \pi}} \int^{\infty}_{-\infty} dk
e^{ikx}  { 1 \over 2 \pi Y(k)}
\vert s \vert^{1-p} \tilde{\psi} (sk).
\]
This shows for a single scale the dual wavelet and its translation can 
be expressed in terms of a single function.  This is not necessarily 
true for the dual wavelet and the scaled quantity. 
\[
\psi^{s,0}(x) =
{1 \over \sqrt{2 \pi}} \int^{\infty}_{-\infty} dk
e^{ikx}  { 1 \over 2 \pi Y(k)}
\vert s\vert^{1-p} \tilde{\psi} (sk) 
\]
\[
=
{1 \over \sqrt{2 \pi}} \int^{\infty}_{-\infty} du
e^{iu {x \over s} }  { 1 \over 2 \pi Y(u/s)}
\vert s\vert^{-p} \tilde{\psi} (u).
\]
This fails to be a rescaling of a single function because of 
the $s$ dependence 
in the quantity $Y(u)$.  It follows that if {\it a weight function
$w(s)$} is chosen so $Y(u/s)=Y$ is constant,  the dual wavelet will
satisfy
\beq
\psi^{s,0}(x) =
{1 \over \sqrt{2 \pi}} \int^{\infty}_{-\infty} du
e^{iu {x \over s} }  { 1 \over 2 \pi Y}
\vert s\vert^{-p} \tilde{\psi} (u) =
\vert s\vert^{-p} \psi^{1,0}(x/s). 
\eeq
In this case $Y(u)$ is a constant which we denote by $Y$.  
The function $\psi^{1,0}(x)$ serves as the dual mother wavelet.

To determine $w(s)$ note
that 
\[ 
Y(sk) = \int_{-\infty}^{\infty} dt w(t) \vert t\vert^{1-p} \vert \tilde{\psi} 
(tsk)\vert^2.
\]
Let $t' = st$ to get
\[ 
Y(sk) = \int_{-\infty}^{\infty} dt w(t) \vert t\vert^{1-p} \vert \tilde{\psi} (tsk)\vert^2 =
\]
\[
\vert s\vert^{p-2} \int_{-\infty}^{\infty} dt' 
w(t'/s) \vert t\vert^{\prime 1-p} \vert \tilde{\psi} (t'k)\vert^2 .
\]
This will equal $Y(k)$ provided
\[
w(t') = \vert s\vert^{p-2} w(t'/s) \qquad \mbox{or} \qquad w(s) = \vert s\vert^{p-2}w(1) .
\]

With this choice 
\[ 
Y(k) = Y= w(1) \int_{-\infty}^{\infty} {dt \over \vert t\vert} \vert \tilde{\psi} 
(t)\vert^2  .
\]
Assuming this choice of weight the admissibility condition becomes
\[
0 < A \leq Y  \leq B < \infty .
\]

Having computed the constant $Y$ it is now possible to write down
an explicit expression for the dual mother wavelet:
\[
\psi^{s,0}(x-t) =
\]
\[
{\vert s\vert^{-p} \over \sqrt{2 \pi}}  \int^{\infty}_{-\infty} du
e^{iu {(x-t) \over s} }  { 1 \over 2 \pi Y}
\tilde{\psi} (u)
 \]
Letting $k=u/s$ 
\[
{1 \over \sqrt{2 \pi}} \int^{\infty}_{-\infty} dk
{ 1 \over 2 \pi Y}
\vert s\vert^{1-p} e^{ik(x-t) } \tilde{\psi} (ks)
\]
\[
{1 \over \sqrt{2 \pi}} \int^{\infty}_{-\infty} dk
{ 1 \over 2 \pi Y}
e^{ikx } \tilde{\psi}_{s,t} (k) .
\]
This has the form
\beq
\psi^{s,t}(x) = 
{1 \over 2 \pi} {1 \over Y}\psi_{s,t}(x).
\eeq

Thus the inversion procedure can be summarized by the formulas:
\beq
f(x) =
\int_{-\infty}^\infty \vert s\vert^{2p-3} ds \int_{-\infty}^{\infty} dt 
\psi^{s,t}(x) \hat{f}(s,t) 
\eeq
\beq
Y =\int_{-\infty}^{\infty} {dt \over \vert t\vert} \vert \tilde{\psi} 
(t)\vert^2  
\eeq
\beq
\psi^{s,t}(x) = {\psi_{s,t}(x) \over 2 \pi Y}
\eeq
\beq
\psi_{s,t} =\vert s \vert^{-p} \psi({x-t \over s}).  
\eeq

The mother function must satisfy $0< Y< \infty$.  
This requires that the Fourier transform of the mother function 
vanishes at the origin.  This is equivalent to saying that
the integral of the mother function is zero.

Using the representation for the wavelet transform gives a representation 
of a delta function:

\[
\delta (x-y) =
\]
\[
\int_{-\infty}^\infty \vert s\vert^{2p-3} ds \int_{-\infty}^{\infty} dt 
\psi^{s,t}(x) \psi^*_{s,t} (y)  =
\]
\[
{1 \over 2 \pi Y} \int_{-\infty}^\infty 
\vert s\vert^{2p-3} ds \int_{-\infty}^{\infty} dt 
\psi_{s,t}(x) \psi^*_{s,t} (y) .
\]
We can also use this representation of the delta function 
to formulate a Parseval's identity for continuous 
wavelets
\beq
(f,f) = {1 \over 2 \pi Y} \int_{-\infty}^\infty 
\vert s\vert^{2p-3} ds \int_{-\infty}^{\infty} dt 
\vert \hat{f} (s,t) \vert^2 .
\eeq

Consider the example of the {\bf Mexican hat} wavelet.  The mother 
function is
\[
\psi(x) = {1 \over \sqrt{2 \pi} } (x^2 -1) e^{-x^2/2}.
\]

To work with the Mexican hat mother function it is useful to use
properties of Gaussian integrals:
\[
\int_{-\infty}^{\infty} e^{-ax^2 + bx +c} dx =
\]
\[
\int_{-\infty}^{\infty} e^{-a(x- {b\over 2a})^2 + {b^2\over 4a} +c} dx.
\]
Change variables to $y = \sqrt{a}(x- {b\over 2a})$ to obtain:
\[
{ e^{{b^2\over 4a} +c} \over \sqrt{a}} \int_{-\infty}^{\infty} 
e^{-y^2} dy =
\]
\[
\sqrt{{\pi \over a}} e^{{b^2\over 4a} +c}. 
\]

This can be used to compute the 
Fourier transform of the Mexican hat mother function: 
\[
\tilde{\psi}(k) = {1 \over \sqrt{2 \pi}}\int_{-\infty}^{\infty}
e^{-ikx} \psi(x) dx =
\]
\[
{1 \over {2 \pi}}\int_{-\infty}^{\infty}
(x^2 -1) e^{-x^2/2 -ikx} dx .
\]
To do the integral insert a parameter $a$ which will be set to 1 at the 
end of the calculation:
\[
( - 2{d \over da} -1 ) {1 \over {2 \pi}}\int_{-\infty}^{\infty}
e^{-x^2a /2 -ikx} dx  =
\]
\[
( - 2{d \over da} -1 ){1 \over {2 \pi}}
\sqrt{{2\pi \over a}} e^{-{k^2\over 2a}} =
\]
\[
( {1 \over a} - {k^2 \over a^2} -1)   
\sqrt{{1 \over 2 \pi a}} e^{-{k^2\over 2a}}.
\]
In the limit that $a \to 1$ this becomes
\[
- \sqrt{{1 \over 2 \pi }}k^2  e^{-{k^2\over 2}}.
\] 

Using this expression it is possible to calculate the coefficient $Y$
\[
Y = \int_{-\infty}^{\infty} {dk \over \vert k \vert} \vert \tilde{\psi} (k)
\vert^2 =
\]
\[
\int_{-\infty}^{\infty} {dk \over \vert k \vert} \vert \tilde{\psi} (k)
\vert^2 =
\]
\[
{1 \over 2 \pi } \int_{-\infty}^{\infty} \vert k \vert^3 dk   
e^{-{k^2}} =
\]
\[
{1 \over \pi } \int_{0}^{\infty} k^3 dk   
e^{-{k^2}}.
\]
Inserting a parameter $a$ which will eventually be set to 1 gives
\[
Y={1 \over 2\pi }(- {d \over d a}) \int_{0}^{\infty} 2k dk   
e^{-ak^2} =
\]
\[
{1 \over 2\pi }(- {d \over d a}){1 \over a}  \int_{0}^{\infty} dv   
e^{-v} =
\]
\[
{1 \over 2\pi }.
\]
This satisfies the essential inequality $0<Y < \infty$ which ensures
the admissibility of the Mexican hat mother function.

The expression for the wavelet transform and its 
inverse can be written as:

\[
\hat{f}(s,t) = \vert s \vert^{-p}\int_{-\infty}^{\infty}dx 
{1 \over \sqrt{2 \pi} } (({x-t \over s})^2 -1) e^{-({x-t \over s})^2/2}
f(x) = 
\]
\[
\vert s \vert^{1-p}\int_{-\infty}^{\infty}du 
{1 \over \sqrt{2 \pi} } (u^2 -1) e^{-u^2/2}
f(su+t).
\]
where $x=su+t$

The inverse is formally given by 

\[
f(x) = \int_{-\infty}^{\infty} \vert s \vert^{2p-3} ds \int_{-\infty}^{\infty} 
dt {\psi_{st}(x) \over 2 \pi Y} \hat{f}(s,t) =
\]
\[
\int_{-\infty}^{\infty} \vert s \vert^{2p-3} ds \int_{-\infty}^{\infty} 
dt  {1 \over \sqrt{2 \pi} } \vert s \vert^{-p} 
(({x-t \over s})^2 -1) e^{-({x-t \over s})^2/2} \hat{f}(s,t) =
\]
\[
{1 \over \sqrt{2 \pi} } 
\int_{-\infty}^{\infty} \vert s \vert^{p-3} ds \int_{-\infty}^{\infty} 
dt   
(({x-t \over s})^2 -1) e^{-({x-t \over s})^2/2} \hat{f}(s,t) =
\]
\[
{1 \over \sqrt{2 \pi} } 
\int_{-\infty}^{\infty} \vert s \vert^{p-3} ds \int_{-\infty}^{\infty} 
du   
(u^2 -1) e^{-u^2/2} \hat{f}(s,su+x)
\]
where $t=su+x$.

Initially we were concerned because we were representing an arbitrary 
function by a linear superposition of functions that all have zero integral.
We could not understand how wavelets could be used to represent a function
with non-zero integral.

We tested this by computing the wavelet transform and its inverse 
for a Gaussian function with the Mexican hat wavelet.  The original 
Gaussian function was recovered.  

The resolution of this paradox has to do with the difference between $L^1$
and $L^2$ convergence.  The wavelet transform has a vanishing $L^1$ norm,
but the $L^2$ norm is non-zero.

\section{Haar Scaling Functions and Wavelets}

Scaling functions play a central role in the construction of
orthonormal bases of compactly supported wavelets.  The concept of
scaling functions is most easily understood using Haar wavelets (these
are made out of simple box functions).  These are the simplest compactly 
of supported wavelets. 

The {\bf Haar scaling function} is defined by
\beq
\phi (x) = \left\{
\begin{array}{ll}
0 & x \leq 0 \\
1 & 0<x\leq 1 \\
0 & x>1 
\end{array} 
\right. \,.
\eeq

Note that it is normalized so 
\beq
(\phi,\phi) := \int^{\infty}_{-\infty} \phi^* (x) \phi (x) dx =
\int_0^1 \phi (x) dx =1.
\eeq

The operations of discrete translation and dilatation are used 
extensively in the study of compactly supported wavelets.  
Define the {\bf unit translation operator $T$} by 
\beq 
(T \chi )(x) = \chi (x-1).  
\eeq 
This operator moves $\chi (x)$ to the right by one unit.
The unit translation operator has the property: 
\beq 
( T \psi , T \chi) = \int^{\infty}_{-\infty} \psi^* (x-1) \chi (x-1) dx= 
\eeq
changing variables to $y=x-1$ gives: 
\beq 
\int^{\infty}_{-\infty} \psi^* (y) \chi (y) dy= (\psi, \chi) 
\eeq 
or 
\beq
( T \psi , T \chi) = ( \psi ,  \chi). 
\eeq

If $A$ is a linear operator its {\bf adjoint} $A^{\dagger}$ is defined by 
the relation
\beq
(\psi , A^{\dagger} \chi ) = ( A \psi , \chi ). 
\eeq
It follows that 
\beq
( \psi , T^{\dagger} \chi ) = (T\psi, \chi ) =
\int^{\infty}_{-\infty} \psi^* (x-1) \chi (x) dx .
\eeq
Changing variables to $y=x-1$ gives
\beq
( \psi , T^{\dagger} \chi ) = 
\int^{\infty}_{-\infty} \psi^* (y) \chi (y+1) dy 
\eeq
or
\beq
(T^{\dagger} \chi ) (x) = \chi (x+1) 
\eeq
which is a felt shift by one unit.
Since
\beq
(\psi , \chi ) = (T\psi , T\chi )= (\psi ,T^{\dagger} T \chi )
\eeq
it follows that $T^{\dagger}= T^{-1}$.  An operator whose adjoint is its
inverse is called unitary.  Unitary operators preserve inner products.

It follows from the definition of the Haar scaling function $\phi (x) $ that 
\[
(T^m \phi , T^n \phi ) = ( \phi , T^{n-m}\phi)=
\int^{\infty}_{-\infty} \phi^* (x) \phi (x-n+m) dx =
\]
\beq
\int^{1}_{0} \phi (x-n+m) dx =
\delta_{nm}    
\eeq
This means the functions 
\beq
\phi_m (x) := (T^n \phi)(x) = \phi (x-n) 
\eeq
are orthonormal.  There are an infinite number of these functions as
$n: -\infty \to \infty$ in integer steps.

Define ${\cal V}_0$ to be the subspace of the space of square 
integrable functions of the form
\beq
f(x) = \sum_{n=-\infty}^{\infty} f_n \phi_n (x) =
\sum_{n=-\infty}^{\infty} f_n (T^n\phi) (x) 
\eeq
where the square integrability requires that the coefficients satisfy 
\beq
\sum_{n=-\infty}^{\infty} \vert f_n \vert^2 < \infty.
\eeq

For the Haar scaling functions ${\cal V}_0$ is the space of square
integrable functions that are piecewise constant on each unit
interval.  Note that while there are an infinite number of functions
in ${\cal V}_0$, it is a small subspace of the space of square
integrable functions.

In addition to translations,  define the linear operator $D$ corresponding to
{\bf discrete scale transformations}:
\beq
(D \chi )(x) = {1 \over \sqrt{2}} \chi (x/2).
\eeq
When this is applied to the Haar scaling function it gives 

\beq
(D\phi) (x) = \left\{
\begin{array}{ll}
0 & x \leq 0 \\
{1 \over \sqrt{2}} & 0<x\leq 2 \\
0 & x>2 
\end{array} 
\right.
\eeq

This function has the same box structure, except it is 
twice as wide as the original scaling function and shorter 
by a factor of $\sqrt{2}$.  Note that the normalization ensures 
\beq
(D\psi , D\chi ) = 
\int^{\infty}_{-\infty} {1 \over 2}\psi^* (x/2) \chi (x/2) dx 
\eeq
setting $y=x/2$,
\beq
= \int^{\infty}_{-\infty} \psi^* (y) \chi (y) dy =
(\psi , \chi )
\eeq
or
\beq
(D\psi , D\chi )=(\psi , \chi ).
\eeq
To compute the adjoint of $D$ note that 
\beq
(\psi , D^{\dagger} \chi ) = (D\psi , \chi ) =
\int^{\infty}_{-\infty} {1 \over \sqrt{2}}\psi^* (x/2) \chi (x) dx.
\eeq
Setting $y=x/2$
\beq
\int^{\infty}_{-\infty}\psi^* (y)\sqrt{2} \chi (2y) dy 
\eeq
implies that 
\beq
(D^{\dagger}\chi )(x)= \sqrt{2} \chi (2x). 
\eeq
This shows that $D^{\dagger} = D^{-1}$ or $D$ also unitary.

Define the functions
\beq
\phi_{mn} (x) = (D^m \phi_n) (x) = 2^{-m/2} \phi (2^{-m}x -n) =
2^{-m/2} \phi (2^{-m}(x - 2^m n)).  
\eeq
where the left index indicates the scale and the right index indicates
the number of integer translations.
It follows that for fixed $m$ 
\beq
(\phi_{mn} , \phi_{mk} ) = (D^m \phi_n , D^m \phi_k ) = (\phi_n ,
D^{m-m} \phi_k)= (\phi_n , \phi_k) = \delta_{nk}
\eeq
This shows that the functions $\phi_{mn}(x)$ for fixed $m$ are orthonormal.
We define the subspace ${\cal V}_m$ of the square integrable functions to 
be those functions of the form:
\beq
f(x) = \sum_{n=-\infty}^{\infty} f_n \phi_{mn} (x) =
\sum_{n=-\infty}^{\infty} f_n (D^mT^n\phi) (x) 
\eeq
where the square integrability requires that the coefficients satisfy 
\beq
\sum_{n=-\infty}^{\infty} \vert f_n \vert^2 < \infty.
\eeq
These functions are square summable functions that are piecewise constant
on intervals of width $2^m$.

In general the scaling function $\phi (x)$ is defined 
as the solution of a scaling equation subject to a normalization 
condition.  The scaling equation relates the scaled scaling function,  
$(D\phi) (x)$, to translates of the original scaling function. 
The general form of the {\bf scaling equation} is
\beq
(D\phi) (x) = \sum h_l T^l \phi (x)
\eeq
where $h_l$ are fixed constants, and the sum may be finite or infinite.

In general this equation cannot be solved analytically.  In the Haar
case we can write down the solution realizing that the scaled box is
stretched over two adjacent boxes with a suitable reduction in height.
It follows that:
\[
D\phi (x) = {1 \over \sqrt{2}} \phi (x/2) =
{1 \over \sqrt{2}} \phi (x) + {1 \over \sqrt{2}}T \phi (x) =
\]
\beq
{1 \over \sqrt{2}} \phi (x) + {1 \over \sqrt{2}}\phi (x-1) .
\eeq
Here $h_0 = h_1 = 1/\sqrt{2}$.  These coefficients are special to the
Haar scaling function.  The best way to think of this is that the scaling
function $\phi (x)$ is the solution of the scaling equation up to
normalization.  The normalization is fixed by
\[
\int \phi (x) dx =1 .
\]

To proceed a few additional relations are useful for future 
computations.  First note 

\beq
DT \psi (x) = D \psi (x-1) = {1 \over \sqrt{2} } \psi (x/2-1) =
 {1 \over \sqrt{2} } \psi ({x-2 \over 2} ) =
T^2 D \psi (x) 
\eeq
which leads to the operator relation 
\beq
DT = T^2 D . 
\eeq

It follows from this equation that 
\beq
D\phi_n(x)  = D T^n \phi (x)= T^{2n}D \phi (x) =
T^{2n} (h_0 \phi (x) + h_1 T \phi (x) ). 
\eeq
This shows that all of the basis elements in ${\cal V}_1$ can be expressed 
in terms of basis elements in ${\cal V}_0$.  For the Haar case this is 
obvious, but the argument above is more general.

Specifically if $\psi(x)  \in {\cal V}_1$ then
\beq 
\psi (x) = \sum_{-\infty}^{\infty} d_n \phi_{1n}(x) =
\eeq
\beq
\sum_{-\infty}^{\infty} d_n D \phi_{n}(x) =
\sum_{-\infty}^{\infty} (d_n h_0 \phi_{2n}(x) + d_n h_1 \phi_{2n+1}(x)) =
\eeq
\beq
\sum_{-\infty}^{\infty}  c_n \phi_{n}(x) 
\eeq 
where 
\beq
c_{2n} = d_n h_0 \qquad c_{2n+1} = d_n h_1 .
\eeq
It is easy to show that 
\beq
\sum_{-\infty}^{\infty}  \vert c_n \vert^2 =
\sum_{-\infty}^{\infty}  \vert d_n \vert^2 .
\eeq

What we have shown, as a consequence of the scaling equation,  is 
the inclusion 
\beq
{\cal V}_0 \supset {\cal V}_1 .
\eeq
Similarly, it is not difficult to show the inclusions 
\beq
\cdots {\cal V}_{-k} \supset {\cal V}_{-k+1} \supset \cdots \supset {\cal V}_0 
\supset \cdots {\cal V}_k \supset {\cal V}_{k+1} \cdots
\eeq
In this example these are all spaces of piecewise constant, square 
integrable functions that are constant on segments that differ by powers of 
2. 
  
First note that as $k \to -\infty$ the approximation to $f(x)$ given by 
\beq
f_k (x) = \sum_{n=-\infty}^{\infty} f_{kn} \phi_{kn}(x)  
\eeq
with 
\beq
f_{kn} = \int_{-\infty}^{\infty} \phi_{kn}^*(x) f(x) dx
\eeq
is bounded by the upper and lower Riemann sums for steps of width
$2^{-k}$. This is because the coefficients $f_{kn}$ are just average
values of the function on the appropriate sub-interval (to deal with
the infinite interval it is best to first consider functions that
vanish outside of finite intervals and take limits).  Since the upper
and lower Riemann sums converge to the same integral (when the
function is integrable) it follows that

\beq
\int_{-\infty}^{\infty} \vert f_k(x)-f(x)\vert dx < \epsilon
\eeq
for sufficiently large $-k$.  A related argument can be extended
to get $L^2$ convergence .

Similarly, as $k \to + \infty$, the width of $\phi_{kn}(x)$ grows 
like $2^k$ while the height falls off like $2^{-k/2}$.  Again,
if the function vanishes outside of a bounded interval then for 
sufficiently large $k$ there is only one (or two) 
$\phi_{kn}(x)$ that are non-vanishing where the function is non-vanishing.
In the case that only one $\phi_{kl}$ overlaps the support of $f(x)$
\beq
f_k (x) \sim 2^{-k/2} \phi_{kn_0} (x) \int_{-\infty}^{\infty} f(x) dx  
\eeq
The integral of the square of this function $\sim 2^{-k} \to 0$ as
$k \to \infty$.

Note that 
\beq
\int_{-\infty}^{\infty} f_k(x) dx \to \int_{-\infty}^{\infty} f(x)dx
\eeq
as $k \to \infty$.  This shows that this integral is finite in $L^1$ but
$0$ in $L^2$. 

Define the projection operators
\beq
P_k f(x) = \sum_{n=-\infty}^{\infty} f_{kn} \phi_{kn} (x) 
\eeq
where
\beq
f_{kn} = \int_{- \infty}^{ \infty}\phi_{kn}^* (x) f(x) dx .
\eeq
The above conditions can be stated in terms of these projectors:
\beq
\lim_{k \to - \infty } P_k  = I     
\eeq
\beq
\lim_{k \to + \infty } P_k  = 0 .     
\eeq
These conditions are valid for a large class of scaling functions.

We are now ready to construct {\bf wavelets}.  First recall the condition
\beq
{\cal V}_0 \supset {\cal V}_1 .
\eeq
Let ${\cal W}_1$ be the space of vectors in the space ${\cal V}_0$ that 
are orthogonal to the vectors in ${\cal V}_1$.  We can write
\beq
{\cal V}_0 = {\cal V}_1 \oplus {\cal W}_1
\eeq
This notation means that any vector in ${\cal V}_0$ can be expressed as
a sum of two vectors - one that is in ${\cal V}_1$ and one that is 
orthogonal to every vector in ${\cal V}_1$.

Note that the scaling equation implies that 
every vector in ${\cal V}_1$ can be expressed as a linear 
combination of vectors in ${\cal V}_0$ using
\beq
D\phi_n (x) = h_0 \phi_{2n} (x) + h_1 \phi_{2n+1} (x) 
\eeq
Clearly the functions that are orthogonal to these in ${\cal V}_1$
on the same interval can be expressed in terms of the functions
\beq
\psi_{1n} (x) := D\psi_{n} (x) = h_1 \phi_{2n} (x) - h_0 \phi_{2n+1} (x) = 
{1 \over \sqrt{2}} ( \phi_{2n} (x) -  \phi_{2n+1} (x)) 
\eeq
These are the elements of ${\cal V}_0$ that satisfy
\beq
(D\psi_{1n} , D\phi_l )  =0 .
\eeq
Thus we have that ${\cal W}_1$ is the space of square integrable 
functions of the form
\beq
f(x )= \sum_{n=-\infty}^{\infty} f_n \psi_{1n} (x)  
\eeq
with 
\beq
f(x )= \sum_{n=-\infty}^{\infty} \vert f_n \vert^2  
\eeq
where we have used
\beq
(\psi_{1n} , \psi_{1k} ) = \delta_{nk} 
\eeq
which follows from the definitions.

Similarly, we can decompose ${\cal V}_l = {\cal V}_{l+1} \oplus {\cal W}_{l+1}$
for each value of $l$.  For the special case $l=-1$ we define the mother
wavelet as
\beq
\psi(x) := D^{-1} ( h_1 \phi (x) - h_0 T \phi (x) )
= 
\eeq
\beq
h_1 \sqrt{2} \phi (2t) - h_0 \sqrt{2} \phi (2(t-1))=
( \phi (2t) - \phi (2(t-1)))
\eeq
which is manifestly orthogonal to the scaling function.  Translates of 
this function define a basis for ${\cal W}_0$
\beq
\psi_n (x) = T^n \psi(x) =  T^n D^{-1} ( h_1 \phi (x) - h_0 T \phi (x) )=
\eeq
\beq
D^{-1} ( h_1 \phi_{2n} (x) - h_0  \phi_{2n+1} (x) ).
\eeq
It is simple to show that 
\beq
(\psi_n , \psi_k) = \delta_{nk}
\eeq

If we decompose every space we have for any $k$
\beq
{\cal V}_{-k} =  {\cal W}_{-k+1} \oplus {\cal V}_{-k+1}  =
\eeq
\beq
{\cal W}_{-k+1} \oplus {\cal W}_{-k+2} \oplus {\cal V}_{-k+2} =
\eeq
\beq
{\cal W}_{-k+1} \oplus {\cal W}_{-k+2} \oplus \cdots \oplus {\cal W}_l 
\oplus {\cal V}_{l} 
\eeq
Note that unlike the ${\cal V}$ spaces, the ${\cal W}_k$ spaces are
all mutually orthogonal, since if $k>l \to {\cal W}_k \subset {\cal V}_l$ 
which is orthogonal to ${\cal W}_l$ by definition.

If $f(x)$ is any square integrable function the conditions
\beq
\lim_{k \to - \infty } P_k  = I     
\eeq
\beq
\lim_{k \to + \infty } P_k  = 0     
\eeq
mean that for sufficiently large $k$ and $l$ that $f(x)$ can be well 
approximated by a function in 
\beq
{\cal W}_{-k+1} \oplus {\cal W}_{-k+2} \oplus \cdots \oplus {\cal W}_l .
\eeq

This means that the function can be approximated by a linear combination of 
basis functions (wavelets) from each of the spaces ${\cal W}_r$ .

Basis functions for ${\cal W}_m$ are given by
\beq
\psi_{mn}(x) = D^m T^n \psi(x) = 
D^{m-1} ( h_1 \phi_{2n} (x) - h_0  \phi_{2n+1} (x) ) .
\eeq
That these are a basis with the required properties is easily shown by 
showing that these functions are orthogonal to ${\cal V}_{m}$ and 
can be used to recover the remaining vectors in ${\cal V}_{m-1}$. 

The functions $\psi_{nl} (x) $ satisfy
\beq
(\psi_{nl} , \psi_{n'l'} ) = \delta_{nn'} \delta_{ll'} 
\eeq
where the $\delta_{nn'}$ follows from the orthogonality of the 
spaces ${\cal W}_n$ and ${\cal W}_{n'}$ for $n\not=n'$.

The $\delta_{ll'}$ follows from the unitarity of $D$ and 
\beq
(\psi , T^n \psi ) =\delta_{n0}.
\eeq

The important steps generalize to the case of a general scaling equation
of 
the form:
\beq
D\phi (x) = \sum h_l T^l \phi (x)
\eeq
This equation is
solved to find the scaling function $\phi (x)$.  This, along with translations
and dilatations is used to construct the spaces ${\cal V}_l$.   The 
scaling equation ensures the existence of space ${\cal W}_k$ that can
be used to build discrete orthonormal basis.  The mother wavelet 
is expressed in terms of the scaling function and the coefficients
as 
\beq
\psi(x) = D^{-1} \sum_l g_l T^l \phi (x)
\qquad g_l = (-)^kh_{k-l} \quad k \quad \mbox{odd} 
\eeq


In general the coefficients $h_l$ must satisfy constraints for the solution 
to the scaling equation to exist.  The expression for $g_l$ will be 
derived in the next section.

\section{Scaling Functions - General Considerations}

In this section we give a more general treatment of scaling equations.
In general the {\bf scaling function} is the solution of the {\bf 
scaling equation}
\beq
D \phi (x) = \sum_l h_l T^l \phi (x).
\label{eq:iaa}
\eeq
In addition to satisfying the scaling equations we require 
that {\bf integer translates} of the scaling functions are {\bf orthonormal}
\beq
(\phi_n , \phi_m ) = (T^n \phi , T^m \phi ) = ( \phi , T^{m-n}\phi )
= \delta_{mn}. 
\eeq
The initial scale is fixed by the {\bf normalization condition}
\beq
\int \phi (x) dx =1.
\eeq

We investigate the consequences of these three conditions.

Using the definitions of the operators $D$ and $T$ the scaling
equation becomes:
\beq
{1 \over \sqrt{2}} \phi ({x \over 2}) = \sum h_l \phi (x-l).
\label{eq:iab}
\eeq
It can be put in the useful form
\beq
\phi (x) = \sum_l \sqrt{2} h_l \phi (2x-l).
\label{eq:iac}
\eeq

In general the sums may be from $-\infty \to \infty$.  Finite sums are treated
by assuming that only a finite number of the $h_l$'s are non zero.  All of the 
compactly supported scaling functions are solution of scaling equations with 
a finite number of non-zero coefficients.

The claim is that if this equation has a solution, it is unique up to
an overall normalization factor.  To investigate this claim take the
Fourier transform of both sides of equation (\ref{eq:iac}) to get

\beq
{1 \over \sqrt{2 \pi} }
\int_{-\infty}^{\infty}  e^{-i k x} \phi (x) dx = \sum_l \sqrt{2} h_l 
{1 \over \sqrt{2 \pi} }
\int_{-\infty}^{\infty}  e^{-i k x} \phi (2x-l) dx.
\label{eq:iad}
\eeq

Changing variables $x \to 2x-l$ gives
\beq
{1 \over \sqrt{2 \pi} }
\int_{-\infty}^{\infty}  e^{-i k x} \phi (x) dx = \sum_l {1 \over \sqrt{2}} h_l 
{1 \over \sqrt{2 \pi} }
\int_{-\infty}^{\infty}  e^{-i (k/2) (x+l) } \phi (x) dx.
\label{eq:iae}
\eeq
or 
\beq
\tilde{\phi} (k) = \tilde{\phi}({k \over 2})  
\tilde{h}({k \over 2})  
\label{eq:iaf}
\eeq
where  
\beq
\tilde{h}({k})  =
\sum_l {h_l \over \sqrt{2}} e^{-i k l }.
\label{eq:iag}
\eeq

This form of the scaling equation can be iterated $n$ times to get:
\beq
\tilde{\phi} (k) = \tilde{\phi}({k \over 2^n}) \prod_{m=1}^n 
\tilde{h}({k \over 2^m}) 
\label{eq:iah}
\eeq

This equation holds for any $n$ provided the Fourier transforms exist.
For a finite $n$, an approximation can be made by a finite number of
iterations of the form
\beq
\tilde{\phi}_n (k) = \tilde{\phi}_{n-1}({k \over 2})  
\tilde{h}({k \over 2})  
\label{eq:iai}
\eeq
for any starting function $\tilde{\phi}_0 (k)$.  In the limit of large $n$ 
the function $\tilde{\phi}_m (k)$ should converge to the scaling function.
It is clear that this result is approximately independent of the choice 
of starting function; it really depends on the coefficients $h_l$.  

If the limit exists as $n \to \infty$,
and the scaling function is continuous in a neighborhood of zero, then
\[
\tilde{\phi} (k) = \lim_{n\to \infty} \tilde{\phi}({k \over 2^n}) 
\prod_{l=1}^n  \tilde{h}({k \over 2^l}) =
\]
\beq
\tilde{\phi}(0) 
\prod_{l=1}^{\infty}  \tilde{h}({k \over 2^l}) .
\label{eq:iaj}
\eeq

If the infinite product converges, then we have an expression for the 
scaling function, up to normalization, which is fixed by assigning a value
to $\tilde{\phi} (0)$.  For the Haar wavelets this expression becomes
\[
\tilde{\phi}(0) 
\prod_{l=1}^{\infty}  {1 \over 2} (1 + e^{-ik/2^l}) =
\]
\[
\lim_{l\to \infty} 
\tilde{\phi}(0) {1 \over 2^l} (1+ e^{-ik/2})(1+ e^{-ik/4})\cdots
(1+ e^{-ik/2^l})
\]
expanding this out gives
\[
\tilde{\phi}(0) \lim_{l \to \infty} 
{1 \over 2^l} \sum_{m=0}^{2^{l}-1} (e^{-ik/2^l})^m
=
\]
\[
\tilde{\phi}(0) \lim_{l \to \infty} {1 \over 2^l}
{1-e^{-ik} \over  1-e^{-ik/2^l}} =
\]
\beq
\tilde{\phi}(0) e^{-ik/2}{\sin (k/2) \over (k/2)} .
\label{eq:iaja}
\eeq
A direct calculation of the Fourier transform of the Haar scaling function 
gives
\[
\tilde{\phi}(k) = {1 \over \sqrt{2\pi}}\int_{-\infty}^\infty e^{-ikx} \phi (x)dx= {1 \over \sqrt{2\pi}}\int_0^1 e^{-ikx} dx= 
\]
\beq
{1 \over \sqrt{2\pi}}
e^{-ik/2}{\sin (k/2) \over (k/2)}
\eeq
which agrees with (\ref{eq:iaja}) if we choose the normalization 
$\tilde{\phi}(0)={1 \over \sqrt{2\pi}}$, which is consistent with 
the requirement
\[
\int \phi (x) dx=1.
\]

The coefficients $h_l$ are not arbitrary.  First note that setting 
$k=0$ in (\ref{eq:iaj}) gives  
\beq
1 = \prod_{l=0}^\infty  \tilde{h}(0). 
\label{eq:iak}
\eeq
Using (\ref{eq:iah}) gives 
\beq
\tilde{h} (0) = 1 =  \sum_l {h_l \over \sqrt{2}}
\eeq
or
\beq
\sum_l h_l =  \sqrt{2}.
\label{eq:ial}
\eeq
This condition is satisfied by the Haar wavelets.   This is a 
necessary condition on the scaling coefficients in order to have a 
solution to the scaling equation.

Another condition is that is needed to make a multi-resolution analysis 
is the orthogonality of the unit translates, 
$(\phi_n, \phi_m) = \delta_{nm}$.  This requires, using (\ref{eq:iac})
\[
2 \sum_{lk} h_l^* h_k \int_{-\infty}^{\infty} \phi^* (2x-2n-l)\phi(2x-2m-k)dx=
\]
\[
2 \sum_{lk} h_l^* h_k \int_{-\infty}^{\infty} \phi^* (2x)\phi(2x-2(m-n)-(k-l))dx =
\]
\[
\sum_{lk} h_l^* h_k \int_{-\infty}^{\infty} \phi^* (x)\phi(x-2(m-n)-(k-l))dx
\]
\beq
\sum_l h^*_l h_{l-2(m-n)} = \delta_{mn} 
\label{eq:iam}
\eeq
or equivalently 
\beq
\sum_l h^*_{l-2m} h_{l} = \delta_{m0} .
\label{eq:ian}
\eeq
This is trivially satisfied for the Haar wavelets.

Note that if there are only two non-vanishing scaling coefficients,  
$h_0$ and $h_1$,
then the conditions (\ref{eq:ial}) and (\ref{eq:ian}) have a unique 
solution, which is the Haar scaling coefficients.

To see this first note conditions on the coefficients are
\beq
h_0 + h_1= \sqrt{2} 
\eeq
\beq
h_0 h_0^* + h_1 h_1^* = 1 .
\eeq
These equations have the unique real solution $h_0 = h_1 = {1 \over \sqrt{2}}$
To see this write $h_k = h_{kr} + i h_{ki}$ for real  $h_{kr}$ and $h_{ki}$. 
Inserting these in the equations gives
\beq
h_{0r} + h_{1r}= \sqrt{2} 
\eeq
\beq
h_{0i} + h_{1i}= 0 
\eeq
\beq
h_{0r} h_{0r} + h_{0i} h_{0i} + h_{1r} h_{1r} + h_{1i} h_{1i} = 1 .
\eeq

Note that since
\beq
\sum_m h_{n+2m} = \sum_m h_{n + 2m + 2k} 
\label{eq:iao}
\eeq
the $m$ sum has two values according to whether $n$ is even or odd:
\beq 
h_e := \sum_m h_{2m} \qquad h_o := \sum_m h_{2m+1}.
\label{eq:iap}
\eeq
This means that 
\[
\sum_{m,n} h^*_n h_{n+2m} = \sum_m \delta_{m0} =1 =
\]
\beq
h_e \sum_{n} h^*_{2n} + h_o \sum_n h^*_{2n+1} =1 
\label{eq:iaq}
\eeq
or
\beq
h^*_e h_e + h^*_o h_o =1 .
\label{eq:iar}
\eeq
We also have
\beq
h_e + h_o = \sqrt{2}
\label{eq:ias}
\eeq
Assuming that the coefficients $h_l$ are real these can be solved
to get 
\beq
h_e = h_o = {1 \over \sqrt{2}}, 
\label{eq:iat}
\eeq
which are precisely the scaling coefficient for the Haar wavelets.

These condition are useful checks and uniquely determine the 
Haar coefficients; but the essential equations are (\ref{eq:ial})
and (\ref{eq:ian}).

For scaling equations with more than two non-zero coefficients, additional
conditions are needed to determine the scaling coefficients.  In all cases
considered in these notes the solutions of the equations for the scaling 
coefficients are real.
 
The other conditions that require some study are the ones relating the 
scaling function to the mother function.  The {\bf mother 
function} lives in the space ${\cal W}_0$ which means that it has an 
expansion in ${\cal V}_{-1}$.
\beq
\psi (x)  = \sum_{n} \sqrt{2} g_n \phi (2x-n ).
\label{eq:iau}
\eeq
This and all of its translates should be orthogonal to the scaling 
function, which is in ${\cal V}_0$.
In terms of the coefficients this requirements is: 
\[
(\psi_m , \phi)   = \sum_{n,l} h_l g_n (\phi_{n-2m},\phi_l ) 
\]
\[
\sum_{n,l} h_l g_n \delta_{n-2m,l} 
\]
\beq
\sum_{n} h_{n-2m} g_n  =0 
\label{eq:iav}
\eeq
for all $m$.   We restrict our considerations to the case 
that the coefficients $g_m$ and $h_m$ are real.   

We also need orthonormality of the translated mother function 
\[
(\psi_m , \psi_n)   = \sum_{l,k} g_l g_k (\phi_{l-2m},\phi_{k-2n} ) 
\]
\beq
\sum_{k} g_{k-2(n-m)} g_k = \delta_{mn} 
\label{eq:iaw}
\eeq
or equivalently
\beq
(\psi_m , \psi)   =
\sum_{k}  g_{k+2m} g_k = \delta_{m0} 
\label{eq:iax}
\eeq
If we choose
$g_k := (-1)^k h_{l-k}$ where $l$ is odd it satisfies (\ref{eq:iav}) and 
(\ref{eq:iax}):
\[
\sum_{k}  g_{k-2(n-m)} g_k = 
\sum_{k}   (-1)^{k-2(n-m)} h_{l-k+2(n-m)} (-1)^k h_{l-k} =
\]
\beq 
\sum_{k}   h_{k-2(n-m)} h_{k} = 
\delta_{mn} 
\label{eq:iay}
\eeq
where we have let $l-k \to k$ in the last term.  It also follows that 
\[
\sum_{n} h_{n-2m} g_n  =
\sum_{n} h_{n-2m} (-1)^n h_{l-n}  =
\]
\[
\sum_{n'} h_{l-n'} (-1)^{l-n'-2m} h_{n'-2m}  = 
(-)^l\sum_{n'} h_{l-n'} (-1)^{n'} h_{n'-2m}  =
\]
\beq
(-1)^l\sum_{n'} g_{n'} h_{n'-2m} .   
\label{eq:iaz}
\eeq
Since $l$ is odd, the sum is equal to its negative which
shows that it vanishes.  The choice of $l$ is arbitrary - it simply
involves moving the origin of the mother.  Since the mother is
orthogonal to the translates of all of the father wavelets, it does
not matter where the origin is placed.

This shows that the coefficients $h_l$, satisfying  
\beq
\sum_l h_l =  \sqrt{2}.
\label{eq:iba}
\eeq
\beq
\sum_l h_{l-2m} h_{l} = \delta_{m0} 
\label{eq:ibb}
\eeq
\beq
g_k := (-1)^k h_{l-k} \qquad l \qquad \mbox{odd}
\label{eq:ibc}
\eeq
give a multi-resolution analysis, scaling function, and a mother function. 

To determine the support of the scaling function note that
the scaling function is given by
\[
\phi(x) = {\tilde{\phi}(0)  \over \sqrt{2 \pi}} \int_{-\infty}^{\infty} 
e^{i k x} \prod_{l=1}^{\infty}  \tilde{h}({k \over 2^l}) dk =
\]
\[
{\tilde{\phi}(0)  \over \sqrt{2 \pi}} \int_{-\infty}^{\infty} 
e^{i k x} \prod_{l=1}^{\infty} \left (\sum_{n_l} {h_{n_l} \over \sqrt{2}} 
e^{-i k {n_l}/2^l }\right ) dk
\]
\[
\lim_{l\to \infty} \tilde{\phi}(0) \sqrt{2 \pi} 
\sum_{n_1=0}^N \cdots \sum_{n_l=0}^N \left ( \prod_{m=1}^l 
{h_{n_m} \over \sqrt{2}}\right )
\delta (x -\sum_{m=1}^l  n_m/2^l ).
\]

This defines the scaling function as a distribution.  
This is not a useful representation for computation, however it indicates
that if a scaling function has $N$ non-zero coefficients $h_l$ then the 
scaling function has support on 
\[
[0,(N-1)({1 \over 2} + {1 \over 4} + {1 \over 8} \cdots )] = [0,N-1]
\]
where $N=2k$ is the number of scaling coefficients.  We write this as
$[0,2k-1]$.

While the support condition depends only on the number of non-zero 
coefficients, 
there are many wavelets with a given finite number of non-zero scaling 
coefficients.   Except for the constraints dictated by the scaling equation,
orthonormality, and normalization, there is considerable freedom in choosing 
the coefficients $h_l$.  The Daubechies order $K$ wavelets are defined by 
the  
conditions
\[
\int x^l \psi (x) dx = 0, \qquad l=1,2, \cdots ,K-1
\]
This equation ensures that polynomials of degree $<K-1$ 
can be locally represented by finite linear combinations of scaling 
functions on a fixed scale.  This is a useful property for 
numerical approximations.

The scaling equat