Table of Contents
Newton Interpolation Program in C
I have explained the newton interpolation program in c programming here in this post. This tutorial helps computer science students understand the concepts of interpolation, extrapolation in numerical techniques.
This tutorial helps the students implement the program for backward interpolation in the c programming language.
Frequently Asked Questions
This newton interpolation program based tutorial will help the computer science graduate to get the answer to the following questions
- What is Interpolation?
- What is extrapolation?
- What is Newton Backward Interpolation Formula?
- How to make a program in c for the newton backward interpolation?
Newton Backward Interpolation Program in C
What is Interpolation ?
What is Extrapolation ?
What is Newton’s Forward and Backward Interpolation ?
Given the set of (n+1) values of x and y, it is required to find y n (x), a polynomial of the nth Degree such that y and y n (x) agree at the tabulated points. The values of x be equidistant i.e. xi = x0 + ih, i=0, 1, 2…..n.
Since y n(x) is a polynomial of the nth Degree
y n(x) =a0 +a1(x-x0) +a2(x-x0)(x-x1)………….+an(x-x0)………….(x-x n-1)
Imposing now the condition that y and yn(x) should agree at the set of tabulated points and applying x=x0+ph, we get Newton’s Forward difference interpolation formula which is given by.
y n(x) = y0 + pDy0 + p (p-1) / 2! D2y0+ p (p-1) (p-2) / 3! D3y0 + ……… + p (p-1) (p-2)…. (p-n+1) / n! Dn y0
It is helpful for interpolation near the beginning of a set of tabular values.
Similarly, if you (x) chosen in the form
y n(x) = a0+a1 (x-x n) + a2 (x-x n) (x-x n-1) +……..an(x-x n) (x-x n-1)……(x-x1)
then we have
y n (x) = y n + pÑy n + p(p+1) / 2 Ñ2 y n + ………+ p(p+1)…..(p+n-1) / n! Ñ n y n
where p= x-x n / h
This is newton’s backward difference interpolation formula, and it uses tabular values to the left of y n. It is helpful for interpolation near the end of the tabular values.
Newton Backward Interpolation Program in C
Program to implement the newton interpolation program in c for backward method programing language is give below. Students are suggested to implement this program in C. If you face any problem or error then you may ask in the comment.
Void Main()
for(i=0; i <n; i++) {
printf(“/n nenter the value of x%d: “,i);