NumericalMethodsChaper03

NumericalMethodsChaper03 - Numerical Methods - Chapter 3...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Numerical Methods - Chapter 3 – Linear Least Squares The least squares method is a method to find the approximate solution for sets of equations in which there are more equations than unknowns (over-determined systems). "Least squares" means that the overall solution minimizes the sum of the squares of the errors made in solving every single equation. 3.1 Curve Fitting If we have n points in a plane ( x i , y i ) and we want to fit a curve between them: m m x c x c x c c x Y + + + + = ... ) ( 2 2 1 0 Residual or error between the function and point i : i i i y x Y r = ) ( We want to find the coefficients c 0 , c 1 , c 2 …, c m such that: () = = n i i i y x Y E 1 2 ) ( is minimized. ( ) ( ) 2 2 2 2 2 1 1 1 2 ) ( ) ( ) ( ) ( n n n i i i y x Y y x Y y x Y y x Y E + + = = = L ( )( ) 2 2 2 1 0 2 2 2 2 2 2 2 1 0 2 1 1 2 1 2 1 1 0 1 2 ... ... ... ) ( n n n n n n n n n n n i i i y x c x c x c c y x c x c x c c y x c x c x c c y x Y E + + + + + + + + + + + + + + = = = L The condition that E is minimum is that 0 = j c E where j = 0 to m ( ) ( ) 0 ... 2 ... 2 ... 2 2 2 1 0 2 2 2 2 2 2 1 0 1 1 2 1 2 1 1 0 0 = + + + + + + + + + + + + + + = n m n m n n m m m m y x c x c x c c y x c x c x c c y x c x c x c c c E L ( ) ( ) 0 ... 2 ... 2 ... 2 2 2 1 0 2 2 2 2 2 2 2 1 0 1 1 1 2 1 2 1 1 0 1 = + + + + + + + + + + + + + + = n n m n m n n m m m m x y x c x c x c c x y x c x c x c c x y x c x c x c c c E L ( ) ( ) 0 ... 2 ... 2 ... 2 2 2 2 1 0 2 2 2 2 2 2 2 2 1 0 2 1 1 1 2 1 2 1 1 0 2 = + + + + + + + + + + + + + + = n n m n m n n m m m m x y x c x c x c c x y x c x c x c c x y x c x c x c c c E L ( ) ( ) 0 ... 2 ... 2 ... 2 2 2 1 0 2 2 2 2 2 2 2 1 0 1 1 1 2 1 2 1 1 0 = + + + + + + + + + + + + + + = m n n m n m n n m m m m m m m x y x c x c x c c x y x c x c x c c x y x c x c x c c c E L = = = = = = + + + = + + + + n i i n n i m i m n i i n i i n i y y y y x c x c x c c 1 2 1 1 1 2 2 1 1 1 0 ... ... 1 = = + = = = = + + + = + + + + n i i i n n n i m i m n i i n i i n i x y x y x y x y x c x c x c x c 1 2 2 1 1 1 1 1 3 2 1 2 1 1 1 0 ... ... = = + = = = = + + + = + + + + n i i i n n n i m i m n i i n i i n i x y x y x y x y x c x c x c x c 1 2 2 2 2 2 2 1 1 1 2 1 4 2 1 3 1 1 2 1 0 ... ... = = + = + = + = = + + + = + + + + n i m i i m n n m m n i m m i m n i m i n i m i n i m x y x y x y x y x c x c x c x c 1 2 2 1 1 1 1 2 2 1 1 1 1 1 0 ... ... This is a system of m +1 linear equations is m +1 unknowns. Of the form: [ A ]{ c } = { b }, we can solve it for the coefficients vector { c }.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 = = = = = = = + = + = = + = = = = + = = = = = = n i m i i n i i i n i i i n i i m n i m i n i m i n i m i n i m i n i m i n i i n i i n i i n i m i n i i n i i n i i n i m i n i i n i i x y x y x y y c c c c x x x x x x x x x x x x x x x n 1 1 2 1 1 2 1 0 1 2 1 2 1 1 1 1 2 1 4 1 3 1 2 1 1 1 3 1 2 1 1 1 2 1 M M L M O M M M L L L 3.2 Linearization Suppose we want to use the function: bx ae x Y = ) ( to fit some data. If we apply Residual or error between the function and point i : i i i y x
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/16/2011 for the course MECHANICAL 581 taught by Professor Wasfy during the Fall '11 term at IUPUI.

Page1 / 8

NumericalMethodsChaper03 - Numerical Methods - Chapter 3...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online