Polynomial interpolation of $n+1$ points but ensure last coefficient is a certain number?

77 Views Asked by At

I have $n+1$ data points $(x,y)$, and I want to create an interpolating polynomial as described here https://en.wikipedia.org/wiki/Polynomial_interpolation.

enter image description here

However there is a twist, I want to ensure $a_0$ is some real rational number. Basically what I am looking for is a way to interpolate and solve for $a_n, a_{n-1}, ..., a_1$ given that $a_0=k$ for some known value of k. For example k can be 0 or 1. For my purpose, the error or complexity does not matter.

Does anyone know if this is possible to do?

Thanks.

2

There are 2 best solutions below

0
On BEST ANSWER

Essentially, when you build an interpolation polynomial of degree $n$ using $n+1$ points $(x_i,y_i)$ with $x_i\ne x_j$ whenever $i\ne j$, you obtain a well-defined system of $n+1$ linear equations on $n+1$ unknowns (the coefficients of your interpolation polynomial).

When you impose an additional constraint $a_0=k$ (this will be your $n+2$nd equation), your system becomes overdetermined.

If this value $a_0=k$ agrees with the $n+1$ previous equations, everything is ok. If it does not, then the system does not have any solutions.

A viable approach would be to increase the degree of the polynomial. If $\forall i\, x_i\ne 0$, then you just add another interpolation point $(0,k)$ and now on $n+2$ points you can build an interpolation polynomial of degree $n+1$; as a consequence, for such a polynomial $a_0=k$.

However, if one of interpolation points is already of the form $(0,s)$, then in the case $s=k$, you can build your polynomial of degree $n$. In the case $s\ne k$, you can not build such a polynomial, whatever you do. You will need to resort to approximations, least square problem, etc.

1
On

In general you will not be able to find a polynomial of degree $n$ that interpolates $n+1$ points if you fix one of the coefficients beforehand.

The problem of finding an interpolating polynomial $p(x) = a_nx^n + \dotsb a_1x + a_0$ for $n+1$ points $(x_i, y_i)$ is in general solved by solving the linear system obtained from the equations

$$p(x_i) = a_nx_i^n + \dotsb a_1x_i + a_0 = y_i, \quad i = 1, \dotsc, n+1$$

for the values of the coefficients $a_j$.

If however you fix the value of $a_0$, the equations now become

$$p(x_i) = a_nx_i^n + \dotsb a_1x_i= y_i - a_0, $$

which gives the system

$$ \pmatrix{ x_1^n & x_1^{n-1} & \cdots & x_1 \\ \vdots & \ddots & \ddots & \vdots \\ x_{n+1}^n & x_{n+1}^{n-1} & \cdots & x_{n+1} } \pmatrix{a_n \\ \vdots \\ a_1} = \pmatrix{y_1 - a_0 \\ \vdots \\ y_{n+1} - a_0}.$$

This is an overdetermined system (i.e. one with more constraints than variables), hence has no exact solution in general. In this case one can obtain a least squares approximation to the interpolation using QR decomposition or something similar.