Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
4 views

Numerical Methods II Interpolation and Approximation

Lecture notes on Numerical Methods 2 - Interpolation and Approximation

Uploaded by

nanyaobiefule
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Numerical Methods II Interpolation and Approximation

Lecture notes on Numerical Methods 2 - Interpolation and Approximation

Uploaded by

nanyaobiefule
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

CMP305: Computational Science

and Numerical Methods

Book: A Journey Through Computational Science and Numerical


Methods: An Undergraduate Guide

Prof. John B. Oladosu

Lecture 5: : Numerical Methods II: Interpolation and


Approximation
1
Introduction
• In computational science, data often come in discrete
form, and we frequently need to estimate values
between data points or approximate functions.
• Numerical methods for interpolation and
approximation are essential for achieving this.
• In this lecture, we explore techniques to interpolate
data points and approximate functions, enabling us to
make predictions and analyze phenomena.
2
5.1 Polynomial Interpolation

• Polynomial interpolation is a method used to construct a polynomial that passes through


a given set of data points. Given n+1 data points (x_0, y_0), (x_1, y_1), …, (x_n, y_n),
where the x_i values are distinct, we seek a polynomial of degree at most n that satisfies:

• Common interpolation methods include:

• 5.1.1 Lagrange Interpolation


• 5.1.2 Newton's Divided-Difference Interpolation
3
5.1.1 Lagrange Interpolation
• Lagrange interpolation constructs a polynomial of degree n by combining n+1
Lagrange basis polynomials, each associated with a data point. The polynomial is
given by:

• where l_i(x) are the Lagrange basis polynomials:

• Lagrange Interpolation
4
5.1.2 Newton's Divided-Difference Interpolation
• Newton's divided-difference interpolation constructs a polynomial of
degree n using a recursive process. The polynomial is given by:

•The coefficients f[x_0, x_1, …, x_i] are divided differences and are computed iteratively.
•Polynomial interpolation is widely used for data fitting, curve smoothing, and approximating functions when
the underlying function is expected to be smooth.

Newton's Divided-Difference Interpolation

5
5.2 Curve Fitting

•Curve fitting is a broader concept that involves finding a mathematical


function that best represents a set of data points. While polynomial
interpolation restricts us to polynomial functions, curve fitting allows
for a wider range of function types, including exponentials, logarithms,
trigonometric functions, and more.
•5.2.1 Nonlinear Least Squares Fitting
•5.2.2 Splines

6
5.2.1 Nonlinear Least Squares Fitting
•Nonlinear least squares fitting is a method for finding the parameters of a function
that minimizes the sum of the squares of the differences between the function and
the data points. It is especially useful when fitting data to nonlinear models.
•The general form of a nonlinear least squares problem is:

• where p represents the parameters of the function f(x,p), and N is the number of
data points.

7
5.2.2 Splines
•Splines are piecewise-defined functions that consist of polynomial
segments, often used for curve fitting and interpolation. Common types
include:
 Linear Splines: Use linear polynomials between data points.
 Cubic Splines: Use cubic polynomials between data points and
ensure continuity of the function and its first and second derivatives
at each data point.
•Splines are valuable when data exhibit abrupt changes, and a single
polynomial may not provide a good fit.
8
5.3 Applications

•Interpolation and approximation techniques have broad applications in various fields:


 Engineering: Interpolation is used in finite element analysis, while curve fitting helps model physical
systems.
 Computer Graphics: Splines are fundamental for creating smooth curves and surfaces in computer
graphics.
 Finance: Time-series data often require interpolation and approximation for modeling and risk assessment.
 Statistics: Curve fitting and nonlinear least squares are used in regression analysis.
 Machine Learning: Interpolation and approximation are essential components of machine learning models
for function approximation and data smoothing.

• In computational science, the ability to accurately interpolate data and approximate functions is crucial for
making predictions, understanding patterns, and solving complex problems. These techniques are
foundational tools for the computational scientist's toolbox.

You might also like