0% found this document useful (0 votes)
8 views2 pages

8 Newton Backward Interpolation

The document presents a problem involving Newton's Backward interpolation to estimate the population of a town in 1895 based on historical data from 1891 to 1931. It includes a C program that takes input for years and populations, calculates the required interpolation, and outputs the estimated population for 1895 as approximately 54.85 thousand. The program demonstrates the implementation of the interpolation method using arrays and loops.

Uploaded by

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

8 Newton Backward Interpolation

The document presents a problem involving Newton's Backward interpolation to estimate the population of a town in 1895 based on historical data from 1891 to 1931. It includes a C program that takes input for years and populations, calculates the required interpolation, and outputs the estimated population for 1895 as approximately 54.85 thousand. The program demonstrates the implementation of the interpolation method using arrays and loops.

Uploaded by

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

Newton's Backward interpolation

Problem: The population of a town is given below as thousands


Year : 1891 1901 1911 1921 1931
Population : 46 66 81 93 101

Find the population of 1895 ?

Program:
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
main()
{
float x[20],y[20],f,s,d,h,p;
int j,i,k,n;
printf("enter the value of the elements :");
scanf("%d",&n);
printf("enter the value of x:\n");
for(i=1;i<=n;i++)
{
scanf("%f",&x[i]);
}
printf("enter the value of y:\n");
for(i=1;i<=n;i++)
{
scanf("%f",&y[i]);
}
h=x[2]-x[1];
printf("enter the searching point f:");
scanf("%f",&f);
s=(f-x[n])/h;
d=y[n];
p=1;
for(i=n,k=1;i>=1,k<n;i--,k++)
{
for(j=n;j>=1;j--)
{
y[j]=y[j]-y[j-1];
}
p=p*(s+k-1)/k;
d=d+p*y[n];
}
printf("for f=%f ,ans is=%f",f,d);
getch();
}

Output:
Enter the value of the elements :5
Enter the value of x:
1891
1901
1911
1921
1931
Enter the value of y:
46
66
81
93
101
Enter the searching point f:1895
For f=1895.000000 ,ans is=54.852795

You might also like