Direct Method Polynomial Interpolation Study Guide

Introduction to Interpolation and the Direct Method

Interpolation is a mathematical technique used to determine a value of a dependent variable, typically denoted as yy, based on a given set of discrete data points. In a standard dataset, we are provided with pairs of values such as (x0,y0)(x_0, y_0), (x1,y1)(x_1, y_1), (x2,y2)(x_2, y_2), (x3,y3)(x_3, y_3), up to (xn,yn)(x_n, y_n). The objective is to calculate a corresponding yy value for a specific xx that resides between these known points but is not included in the original dataset itself. For instance, if we have (x)(x) values at specific intervals, interpolation allows us to find the function value f(x)f(x) between two points, such as between (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2).

In the context of interpolation, it is highly advantageous to use polynomials. Creating a polynomial equation based on a given dataset is preferred because polynomial functions are easier to evaluate, easier to differentiate, and easier to integrate compared to other types of functions. The Direct Method is one common approach where we assume a polynomial relationship of the form:

y=a0+a1x+a2x2++anxny = a_0 + a_1 x + a_2 x^2 + \dots + a_n x^n

To define this equation, one must have a minimum of two points. Specifically, to determine a unique polynomial of degree nn, we require n+1n + 1 data points. This allows us to set up a system of n+1n + 1 equations to solve for the n+1n + 1 unknown constants or numerical coefficients, which are represented as a0,a1,,ana_0, a_1, \dots, a_n. While the values of xx and xnx^n are known from the dataset, the constants must be calculated to define the specific equation governing the interval.

Defining the Polynomial Equation with Linear Interpolation

The process of applying the Direct Method involves first setting up the equation based on the dataset and then solving for the unknown coefficients. Once the equation is fully defined, we simply substitute the desired value of xx into the polynomial to find the corresponding yy.

Consider a practical example involving the upward velocity of a rocket, which is provided as a function of time (tt) in the following dataset:

  • At t=0st = 0\,s, v=0m/sv = 0\,m/s
  • At t=10st = 10\,s, v=227.04m/sv = 227.04\,m/s
  • At t=15st = 15\,s, v=362.78m/sv = 362.78\,m/s
  • At t=20st = 20\,s, v=517.35m/sv = 517.35\,m/s
  • At t=22.5st = 22.5\,s, v=602.97m/sv = 602.97\,m/s
  • At t=30st = 30\,s, v=901.67m/sv = 901.67\,m/s

The objective is to determine the velocity at t=16st = 16\,s using direct linear interpolation. Because 1616 is bounded by the values 1515 and 2020, we choose these two points as our start and end points. In linear interpolation, we use only two points, which results in a first-degree polynomial (a straight line) defined by the equation:

v(t)=a0+a1tv(t) = a_0 + a_1 t

By substituting the data points from the table into this working equation, we establish a system of two equations:

  1. At t=15t = 15: a0+a1(15)=362.78a_0 + a_1(15) = 362.78
  2. At t=20t = 20: a0+a1(20)=517.35a_0 + a_1(20) = 517.35

Solving for Coefficients and Calculating Results

To find the values of a0a_0 and a1a_1, various methods such as matrix algebra or the elimination method can be employed. Solving the system above yields the following constants:

a0=100.93a_0 = -100.93a1=30.914a_1 = 30.914

With these constants, we can define the specific linear equation that is valid for the interval between t=15t = 15 and t=20t = 20:

v(t)=100.93+30.914(t)v(t) = -100.93 + 30.914(t)

It is important to note that this specific equation only holds true between these two points; if the points change, the constants must be recomputed. By substituting t=16t = 16 into the equation, we obtain the velocity:

v(16)=100.93+30.914(16)=393.7m/sv(16) = -100.93 + 30.914(16) = 393.7\,m/s

To improve the accuracy of the result, one can increase the number of data points considered. Increasing the points increases the number of terms in the polynomial and, consequently, the number of constants that must be solved. By using three points, we perform quadratic interpolation, which allows the model to capture the transition and curvature between points more effectively.

Quadratic Interpolation and Error Analysis

For quadratic interpolation, we select three points that bound t=16t = 16. Suitable options include the sets (10,15,20)(10, 15, 20) or (15,20,22.5)(15, 20, 22.5). If we choose the points at t=10t = 10, t=15t = 15, and t=20t = 20, the working polynomial equation becomes:

v(t)=a0+a1t+a2t2v(t) = a_0 + a_1 t + a_2 t^2

Note that as terms are added, the exponents of the independent variable increase. We set up three equations based on the velocity data from the table:

  1. a0+a1(10)+a2(102)=227.04a_0 + a_1(10) + a_2(10^2) = 227.04
  2. a0+a1(15)+a2(152)=362.78a_0 + a_1(15) + a_2(15^2) = 362.78
  3. a0+a1(20)+a2(202)=517.35a_0 + a_1(20) + a_2(20^2) = 517.35

Solving this system using numerical methods or matrix elimination results in the following constants:

a0=12.05a_0 = 12.05a1=17.733a_1 = 17.733a2=0.3766a_2 = 0.3766

The precise quadratic equation for the range 10t2010 \leq t \leq 20 is:

v(t)=12.05+17.733(t)+0.3766(t2)v(t) = 12.05 + 17.733(t) + 0.3766(t^2)

Substituting t=16t = 16 into this quadratic model yields:

v(16)=12.05+17.733(16)+0.3766(162)=392.19m/sv(16) = 12.05 + 17.733(16) + 0.3766(16^2) = 392.19\,m/s

To evaluate the improvement in accuracy, we calculate the absolute relative approximate error between the linear and quadratic results:

Error=New ValueOld ValueNew Value×100\text{Error} = \left| \frac{\text{New Value} - \text{Old Value}}{\text{New Value}} \right| \times 100

Using the new value (392.19392.19) and the old value (393.7393.7), the resulting error is 0.38410%0.38410\%. Increasing the points allows the model to better reflect the correct curvature of the physical process.

Cubic Interpolation and Refined Accuracy

To further minimize error, we can use four points to perform cubic interpolation. For t=16t = 16, we may choose the set (10,15,20,22.5)(10, 15, 20, 22.5). This requires a polynomial with four terms:

v(t)=a0+a1t+a2t2+a3t3v(t) = a_0 + a_1 t + a_2 t^2 + a_3 t^3

Substituting the four chosen data points into this general equation creates a system of four equations to determine the four unknown constants. Using a matrix method to solve for the coefficients results in:

a0=4.254a_0 = -4.254a1=21.266a_1 = 21.266a2=0.13204a_2 = 0.13204a3=0.005347a_3 = 0.005347

This specific cubic equation is valid exclusively for the interval between t=10t = 10 and t=22.5t = 22.5. Substituting t=16t = 16 into this equation gives:

v(16)=392.06m/sv(16) = 392.06\,m/s

Comparing this to the quadratic result, the relative approximate error decreases significantly from 0.38410%0.38410\% to approximately 0.023%0.023\%. This demonstrates the general principle of the Direct Method: as more data points are integrated into the polynomial equation, the resulting interpolation becomes increasingly accurate, and the error relative to previous iterations continues to diminish.