Differentiation using the finite difference method

36 Views Asked by At

I am working on a passed paper for a numerical course I am taking and have come across the following question:

Determine the coefficients $a_0,a_1,a_2$

$D(f,h)=f'(0) =a_0f(0)+a_1f(h)+a_2f(2h)$

gives $D(f,h) = f'(0)$ if f is any second degree polynomial.

I am really stuck could someone please explain the process to me.

1

There are 1 best solutions below

2
On BEST ANSWER

Suppose $f$ is a second degree polynomial $f(x) = f_0 + f_1 x + f_2 x^2$, then $f'(0) = f_1$.

Hence we want to compute $f_1$ given the values $f(0),f(h),f(2h)$.

We have $f(0) = f_0$, $f(h) = f_0 + h f_1 + h^2 f_2$ and $f(2h) = f_0 + 2h f_1 + 4h^2 f_2$.

Now solve for $f_1$ in terms of $f(0),f(h),f(2h)$.