-
Notifications
You must be signed in to change notification settings - Fork 0
Lab 2
Newton interpolation polynomial:
Where — a divided difference.
- Table of y(x);
- Degree of polynomial;
- Values of X.
- Interpolation function output;
- Exact value;
- Interpolation error.
(As it turned out, it is not necessary)
To calculate the error of a function, which is represented by Newton polynomial:
Estimation of the polynomial interpolation error for the above given formula is called a priori.
It allows you to identify factors that determine the accuracy: steepness of function and configuration of the nodes (In the center - more precisely).
We use inverse interpolation to solve a system of transcendental equations with two variables.
Nobody does this. Generally use Taylor series to solve similar problems.
We rearrange the columns of x and y values and interpolate transformed table using Newton polynomial.
A cubic spline is a curve consisting of "docked" polynomials of the third degree . At the docking points, values and derivatives of two neighboring polynomials are equal.
A system of equations for determination of :
The above system of linear algebraic equations is solved by the sweep method. We find an array .
With found, the remaining coefficients are determined by the formulas:
- Building a table;
- Set value of x;
- Find the k-th interval, which includes x;
- Output the result y.
It is based on use of canonical form of a system of linear algebraic equations with a tridiagonal matrix.
The sweep method is performed in 2 stages:
-
Trace: by the means of the formulae for given initial coefficients
, we find all the sweep coefficients
-
Backtrace: with a known value of
we determine all
- back stroke by formulae:
TODO
Prepared by @gofixyourself