Two-sided first order Taylor series?

89 Views Asked by At

I have a function known at points $x_1$ and $x_2$, as well as its derivative, i.e., I have data $\{f(x_1), f'(x_1), f(x_2), f'(x_2)\}$.

I want to get an approximation to $f(x)$ where $x \in [x_1, x_2]$. Clearly I can write $f(x) = f(x_1) + (x-x_1)f'(x_1)$ when $x < (x_1+x_2)/2$ and $f(x) = f(x_2) + (x-x_2)f'(x_2)$ otherwise. This gives me an error of order $(x_2-x_1)^2/4$.

But can I do better than that? Can I combine the information from both the left and right hand sides and obtain higher accuracy?

1

There are 1 best solutions below

0
On

You may be interested in Hermite Interpolation.