C program to construct a divided difference table for f(x) = cos x based on five points which are 0,1,2,3,4. Use the coefficient ak (k, cos k). Round up to 7 decimal places. Derive p1(x), p2(x), p3(x), p4(x).
Please I need any help I can get on this program. Whatever you guys do to help would be sincerely appreciated. Thanks

what is a divided difference table?

what are p1(x), p2(x), etc...?

I would love to help you out, but you need to give us more details. Please explain it clearly.

small tidbit: include math.h file to be able to use sin, cos, and some other functions in your program.

first line of code:

#include <math.h>

In numerical analysis, it`s called Newton's divided differences interpolation polynomial because the coefficients of the polynomial are calculated using divided differences.

Construct a divided difference table for f(x) = cos x based on 5points which are 0,1,2,3,4.

The program will be written in C such that the result will be computed in a tabular form
like the table below for example:

0 1.0 0.7651977

-0.4837057

1 1.3 0.6200860 -0.1087339

-0.5489460 0.0658784

2 1.6 0.4554022 -0.0494433 0.0018251

-0.5786120 0.0680685

3 1.9 0.2818186 0.0118183

-0.5715210

4 2.2 0.1103623

In numerical analysis, it`s called Newton's divided differences interpolation polynomial because the coefficients of the polynomial are calculated using divided differences.

Construct a divided difference table for f(x) = cos x based on 5points which are 0,1,2,3,4.

The program will be written in C such that the result will be computed in a tabular for.

Please help me write the code in full.
Thanks. I`m so grateful

Hello kindly help send the code to construct a divided difference table with program C for f(x)= cos x, my email is SNIP

Edited 6 Years Ago by happygeek: keep it on-site please

This article has been dead for over six months. Start a new discussion instead.