Least Square Approximation/Regression: Numerical Methods by Chapra (Chapter 17) Numerical Analysis by Burden (Chapter 8)
Least Square Approximation/Regression: Numerical Methods by Chapra (Chapter 17) Numerical Analysis by Burden (Chapter 8)
Least Square Approximation/Regression: Numerical Methods by Chapra (Chapter 17) Numerical Analysis by Burden (Chapter 8)
APPROXIMATION/REGRESSION
Numerical Methods by Chapra(Chapter 17)
Numerical Analysis by Burden(Chapter 8)
Fitting a Degree Polynomial
•Suppose
we have to fit a degree polynomial
. . . .
. . . .
. . . .
Example 4:
• The following data shows the bacterial growth in a liquid culture over a number of
days. Fit a least square parabola to the above data.
Days 0 4 8 12 16 20
Amount 67 84 98 125 149 185
Exercises
Numerical Analysis by Burden
Exercise 8.1: Solve questions related to least square parabola and polynomials.
Numerical Methods by Chapra
Exercise 17: Solve questions related to least square parabola and polynomials.
INTERPOLATION
Numerical Methods by Chapra (Chapter 18)
Numerical Analysis by Burden (Chapter 3)
Interpolation
• Interpolation is an approach in which estimated curve passes directly through
each of the points.
• Thus, For data points, there is one and only one polynomial of degree n that
passes through all the points.
Interpolation Formulae
Newton’s Divided
Lagrange Interpolation
Difference Interpolation
Formula
Formula
x 1 2 5 Unequal
y 1 4 10 Spaced Data
x 1 2 3 4 Equally
y 0 7 26 124 Spaced Data
Lagrange Interpolation Formula
• Lagrange
Interpolation formula is applicable to equally spaced data as well as
unequal spaced data.
Development of Formula:
Let be a function which takes the values corresponding to . Since there are values of
corresponding to values of , we can represent by a polynomial of degree .
Let then first degree polynomial(straight line) for two sets of values is
•
where
Thus nth degree polynomial for for sets of data is
Example 1:
Find Lagrange Interpolation polynomial fitting the 1 3 4 6
points given in the following table. -3 0 30 132
Example 2
Evaluate
• using Lagrange Interpolation x 1 2 5
formula.
y 1 4 10
Exercises
Numerical Analysis by Burden
Exercise 3.1: Solve questions related to Lagrange Interpolation Polynomial.
Numerical Methods by Chapra
Exercise 18: Solve questions related to Lagrange Interpolation Polynomial.