Bessel’s Interpolation formula

Bessel’s Interpolation formula :

ALGORITHM :

  1. Start of the program.
  2. Input number of terms n
  3. Input the array ax
  4. Input the array ay
  5. h=ax[1]-ax[0]
  6. for i=1;i<n-l;i++
  7. diff[i][1]=ay[i+1]-ay[i]
  8. End Loop i
  9. for j=2;j<=4;j++
  10. for i=0;i<n–j;i++
  11. diff[i][j]=diff[i+1][j–1]–diff[i][j–1]
  12. End Loop i
  13. End Loop j
  14. i=0
  15. Repeat Step 16 until ax[i]<x
  16. i=i+1
  17. i=i–1;
  18. p=(x–ax[i])/h
  19. y1=p*(diff[i][1])
  20. y2=p*(p-1)*(diff[i][2]+diff[i–1][2])/4
  21. y3=p*(p-1)*(p-0.5)*(diff[i–1][3])/6
  22. y4=(p+1)*p*(p–1)*(p–2)*(diff[i–2][4]+diff[i–1][4])/48
  23. y=ay[i]+y1+y2+y3+y4
  24. Print Output
  25. End of Program
C SOURCE CODE :

OUTPUT :

Bessel's Interpolation formula


Leave a Reply

Your email address will not be published. Required fields are marked *