Optimal way to find derivative - numerically

158 Views Asked by At

Suppose we are given points $x_0,x_1,x_2$ evenly spaced points $(x_0-x_1=x_1-x_2)$, and $u(x_1),u(x_2),u(x_3)$ Where $u$ is some function.

Find the best way to approximate $u''(x)$ using only the above data, and approximate the error.

Normally, I would use the method of undetermined coefficients, but that would require that $x$ is one of the given points. This case is different. In this case, we are given 3 points and we are asked to find an approximation for the derivative at any point.

Interpolation comes to mind, but who says it is the best way?

Would appreciate any help, I'm quite new to this material.

1

There are 1 best solutions below

3
On

Approximate by:

$$u''(x_2)=\frac{u(x_3)-2u(x_2)+u(x_1)}{h^2}$$, where $h=x_2-x_1$

Or interpolate with Lagrange polynomial