0% found this document useful (0 votes)
40 views26 pages

Lesson 9 Num Sol

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views26 pages

Lesson 9 Num Sol

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 26

Lesson 9

Polynomial Interpolation
Prepared by Engr. Kenneth Ryan Llorera
Objectives


Perform Numerical Approximation of Polynomials

Write LaGrange Approximating Polynomial and Taylor Polynomials from


given points

Approximating Polynomials
We mentioned in the introduction that one reason for using
algebraic polynomials to approximate an arbitrary set of data is that, given

any continuous function defined on a closed interval, there exists a


polynomial that is arbitrarily close to the function at every point in the
interval. Also, the derivatives and integrals of polynomials are easily
obtained and evaluated. It should not be surprising, then, that many
procedures for approximating derivatives and integrals use the polynomials
that approximate the function.
Approximating Polynomials
For a function with an initial value of which is , the derivative of
the function at with being the step size


which we can approximate to

for small values of . Although this may be obvious, it is not very


successful, due to our old nemesis round-off error. But it is certainly a place

to start. First, we need to talk about the LaGrange Polynomials.


LaGrange Polynomial
A LaGrange Polynomial is a type of polynomial used in numerical
analysis and interpolation. It provides a method to find a polynomial that

passes through a given set of points, making it useful for estimating values
between known data points. This technique is particularly valuable in fields
like numerical analysis, computer graphics, and engineering, where precise
interpolations are needed.
The development of LaGrange polynomials is attributed to the
French-Italian mathematician Joseph-Louis LaGrange (1736–1813). He

introduced this method of polynomial interpolation in 1795 while exploring


techniques in mathematical analysis and algebra, aiming to solve problems
related to curve fitting and function approximation. LaGrange’s work laid
important groundwork for both numerical analysis and theoretical
mathematics by providing a systematic way to construct polynomials
passing through a set of given points.
LaGrange Polynomials are effective in solving interpolations, but we
might need more if we need to solve derivatives using numerical methods.

LaGrange Transform
The polynomial 𝑃(𝑥) has a degree of at most 𝑛 if there are 𝑛+1
points, which is the minimum degree needed to exactly fit all points.


and each is defined as

where indicates the specific basis polynomial and the data point it
corresponds to andis used within the product to exclude 𝑥𝑖 when forming

𝐿𝑖(𝑥) so that it meets the interpolation conditions. If you have two points,
say , the Lagrange polynomial becomes:
LaGrange Transform

where LaGrange Basis Polynomials are


The is the LaGrange Interpolating Polynomial from n to k
LaGrange Interpolating Polynomial
Determine the linear Lagrange interpolating polynomial that passes
through the points (2,4) and (5,1).


Approximating Polynomials

For the approximation

suppose first that where , and that for some that is sufficiently
small to ensure that . We construct the first Lagrange polynomial for

determined by and , with its error term:


: This part specifies that is a point located within the open interval , not
including the endpoints 𝑎 and 𝑏. In other words, is somewhere strictly

between 𝑎 and 𝑏. :This indicates that the function 𝑓 belongs to the class of
functions that are twice continuously differentiable on the closed interval
[𝑎,𝑏]. This means that 𝑓 is continuous on [𝑎,𝑏], has a first derivative 𝑓′
that is also continuous on [𝑎,𝑏], and a second derivative 𝑓′′ that is
continuous on [𝑎,𝑏] as well.
LaGrange Transform

where the green term is the error term and the blue ones are from
the LaGrange Polynomial. The expression represents a composite function,

where 𝜉(𝑥) is an inner function and 𝑓 is an outer function. This


intermediate point notation arises from the Mean Value Theorem and
Cauchy’s form of the remainder in Taylor’s theorem. Rather than specifying
an exact location, 𝜉(𝑥) indicates that there exists some point where the
error takes on this form.
Taylor Polynomials

For the approximation


we can differentiate it for some between and

with as the differential operator



Taylor Series
The Taylor formula or Taylor series was named after the English
mathematician Brook Taylor (1685–1731), who introduced it in 1715 in his

work Methodus Incrementorum Directa et Inversa. Taylor’s formula was an


early development in calculus, providing a systematic way to approximate
functions by a series based on their derivatives at a specific point.
However, James Gregory (1638–1675), a Scottish mathematician,
also independently discovered a similar concept before Taylor. Additionally,

Colin Maclaurin (1698–1746), another Scottish mathematician, further


popularized Taylor’s work by applying the series for functions expanded at
zero, which became known as the Maclaurin series.
Taylor’s contributions formalized the approach, but the concept of
series expansion was also present in earlier works by mathematicians such

as Isaac Newton and Gottfried Wilhelm Leibniz. Taylor’s formulation


offered a powerful general method for approximation that influenced future
developments in calculus and analysis.
Taylor Expansion
High-accuracy divided-difference formulas can be generated by
including additional terms from the Taylor series expansion. For example,

the forward Taylor



series expansion can be written as


which is from the Taylor Series


for the simplification of the remainder , we defined a stepping size
Order of Taylor Expansion
This relationship, called the zero-order approximation, indicates
that the value of f at the new point is the same as its value at the old point.

This result makes intuitive sense


because if and are close to each other, it is likely that the new value is
probably


similar to the old value.

The first order approximation is


Therefore, a second-order term is added to the series to capture


some of the curvature that the function might exhibit

Truncation Error
Truncation error in Taylor approximation refers to the error that
arises when a Taylor series is truncated or cut off after a finite number of

terms. This error is the difference between the exact value of the function
and the value given by the truncated Taylor polynomial. It measures how
much information is lost by neglecting higher-order terms.
Approximating Polynomials
Use zero- through fourth-order Taylor series expansions to
approximate the function

from with
Because we are dealing with a known function, we can compute

values for f(x) between 0 and 1. The results indicate that the function

starts at and then curves downward to . Thus, the true value that we are
trying to predict is 0.2.
The Taylor series approximation with or zero order approximation
is
Approximating Polynomials


Approximating Polynomials
Thus, as in the figure, the zero-order approximation is a constant.
Using this formulation results in a truncation error

at
For , the first derivative must be determined and evaluated at :


Therefore, the first-order approximation is


For , the second derivative must be determined and evaluated at :


The second order approximation is
Approximating Polynomials

The second order approximation is

Additional terms would improve the approximation even more,


with , the third derivative must be determined and evaluated at

Because the fifth derivative of a fourth-order polynomial is zero.


Consequently, the Taylor series expansion to the fourth derivative yields an

exact estimate at
Approximating Polynomials

Let us prove it with , the fourth derivative must be determined and


evaluated at

Error in Taylor Series
In general, the nth-order Taylor series expansion will be exact for
an nth-order

polynomial. For other differentiable and continuous functions, such as


exponentials and

sinusoids, a finite number of terms will not yield an exact estimate. Each
additional term

will contribute some improvement, however slight, to the approximation.


This behavior

will be demonstrated in the example. Only if an infinite number of terms are


added will

the series yield an exact result.


The assessment of how many terms are required to get “close

enough” is based on the remainder term of the expansion. Recall that the

remainder term is of the general form of the remainder equation. This


relationship has two major drawbacks. First, is not known exactly but
Error in Taylor Series
The error is
where the nomenclature means that the truncation error is of the

order . That is, the error is proportional to the step size h raised to the th

power. Although this approximation implies nothing regarding the


magnitude of the derivatives that multiply , it is extremely useful in judging
the comparative error of numerical methods based on Taylor series
expansions. For example, if the error is O(h), halving the step size will halve
the error. On the other hand, if the error is O, halving the step size will
quarter the error.
In the notation the symbol 𝑂 represents Big-O notation. This is a
mathematical concept used in numerical analysis and computer science to

describe the asymptotic behavior of a function as its argument approaches


a particular limit—in this case, as ℎ (often a step size) approaches zero
Functions with infinite Number of
Derivatives
Use Taylor series expansions with to 6 to approximate at on the
basis of the value of f(x) and its derivatives at . Note that this means that .

As with the previous example, our knowledge of the true function


means that we can determine the correct value our true value

The zero-order approximation is

which makes a relative error


Functions with infinite Number of
Derivatives
Use Taylor series expansions with to 6 to approximate at on the
basis of the value of f(x) and its derivatives at . Note that this means that .

The first-order approximation is

which makes a relative error


Functions with infinite Number of
Derivatives
Use Taylor series expansions with to 6 to approximate at on the
basis of the value of f(x) and its derivatives at . Note that this means that .

The second-order approximation is

which makes a relative error


Exercise

Order

0
1
2
3
4
5
6

You might also like