Professional Documents
Culture Documents
An Approximation Problem
Related Engineering Problems
Q
Selecting the most appropriate …
Approximation function
Q
Steps
1. Selecting function type (polynomial, exp., log., etc.)
2. Optimize its coefficients to obtain “the best” approximation
function
3. Try some other functions
4. Optimize the coefficients
5. Compare and decide the best of the best
D
h
Max error
error
error
h h
Max error
Q Q
The Least Square Method
Full expression: “the least of sum of square of errors”
This is the most favorite method /criteria
The square of differences between observed and approximate
data are summed. The sum is then minimized by adjusting the
coefficient of the evaluated trial function (approximating
function)
This means that all data are treated equally regardless the
number of data with the same or closed value.
What happen when the method is applied for the condition
with most data are within a certain narrow range ? (compared
with the case of evenly distributed data in the range)
Computational Procedure
Data: yi (xi), i = 1,2,3, …, n
Approximating function: g(x)
The differences (errors) are evaluated at xi; Ei = yi - g(xi) for
all i.
The square of errors; Ei2 = [yi – g(xi) ]2
n
E
2
The sum of square of errors; D2 = i
i 1
Min
yi2
0; for all i; why ? g xi axi b
a
g xi 2 g xi xi 2axi b xi ; for all i;
2
a
2 yi g xi 2 yi xi
a
n n
2 xi axi b yi 0; x ax b y 0;
i i i
i 1 i 1
n n n
a x b xi xi yi 0
2
i
i 1 i 1 i 1
The second equation
D 2 n n n n
0; D y g x
g xi 2 yi g xi
2 2 2 2
y
b
i i i
i 1 i 1 i 1 i 1
yi2
0; for all i; g xi axi b
b
g xi 2 g xi 1 2axi b ; for all i;
2
b
2 yi g xi 2 yi
b
n n
2 axi b yi 0; ax b y 0;
i i
i 1 i 1
n n
a xi b yi 0
i 1 i 1
The Resulting Matrix Equation
n n n
a xi2 b xi xi yi 0
i 1 i 1 i 1
n n
a xi b yi 0
i 1 i 1
n 2 n
n
xi xi
a xi yi
i n1 i 1
i 1n
x b
1 yi
i 1
i
i 1