fourier-approxdn10
Download
Report
Transcript fourier-approxdn10
Fourier Approximation
Related Matters Concerning
Fourier Series
Approximating Functions
A function f(x) that approximates a set of data {(x1,y1),(x2,y2),(x3,y3),…,(xn,yn)} does
not require that the function when evaluated at each xj value agree with the
corresponding yj value like interpolation does.
Approximating functions try to have each f(xj) come close to equaling each yj as
possible with respect to some limit you put on the calculations for f(x). Most
commonly for polynomial or trigonometric polynomials this is the degree of the
polynomial.
In all the interpolating polynomials we have studied (Lagrange, Newton and
Fourier) we have seen that if you do not restrict the degree of the polynomial for a
data set you can always get an interpolating polynomial if you take the degree to
be large enough. The problems that arise from having the degree of these
polynomials get large are:
It increases how complicated the polynomial is. This makes calculations with
it very difficult if you do them by hand.
It increases how many calculations need to be done thus increasing the
amount of time required for a calculation if doing them by machine.
Measuring How “Closely” a Function Approximates Data
In order to measure how closely a function f(x) approximates a set of data
{(x1,y1),(x2,y2),(x3,y3),…,(xn,yn)} we measure the error between the data and the
function. Ideally (as in interpolation) we want this to be zero. There are many
different ways this can be done but one of them that is widely used because it has
many nice properties is what is called the sum of differences of squares.
E f (x j ) y j
n
2
j 1
Notice the only way that E=0 is for f(xj) = yj. This means that the function f(x) is
an interpolating function.
In statistics when you use the mean to approximate a set of data (i.e. f(x) = x
you call this value the variance. When you approximate the data with a line
the line that makes E a minimum is called the regression line.
We can apply this same idea to Fourier series.
Fourier Approximating Polynomials
If we choose n equally spaced points {t0,t1,t2,…,tn-1} in the interval [0,2) then the
value E below:
a0
E 2 ak cosk t j bk sin k t j x j
j 0
k 0
k 0
n
m
m
2
will be minimal for the data set {x0,x1,x2,…,xn-1} (Fourier Form) when the
coefficients ak and bk are chosen as shown below:
2 n
ak xi cosk ti
n i 0
and
2 n
bk xi sin k ti
n i 0
This allows for any data set to be approximated with a trigonometric polynomial
of degree m. Generally we assume 2m+1 < n.
For example, lets approximate the data set {1,1,-1,2} with a trigonometric
polynomial of degree 1(i.e. m=1). Notice that for exact interpolation this would
require a trigonometric polynomial of degree 2.
2
a0 1 cos0 0 1 cos0 2 1 cos0 2 cos0 32
4
1
3
1 1 1 2
2
2
2
a1 1 cos1 0 1 cos1 2 1 cos1 2 cos1 32
4
1
1 0 1 0 1
2
2
b1 1 sin 1 0 1 sin 1 2 1 sin 1 2 sin 1 32
4
1
1
0 1 0 2
2
2
The approximating polynomial is:
2
9
3
f (0) 1
4 16
2
9
3
f 2 1
4 16
2
2
3
1
f (t ) cos(t ) sin( t )
4
2
2
9
3
f 1
4 16
2
f
9
3
2
4 16
2
3
2
2
9 9 9 9 36 9
E
2.25
16 16 16 16 16 4