Difference table:
f(x) \approx Pn(x) = f(x0) + s\Delta f(x0) + \frac{s(s - 1)}{2!} \Delta^2 f(x0) + \frac{s(s - 1)(s - 2)}{3!} \Delta^3 f(x_0)
f'(x) \approx \frac{1}{h} \frac{dPn}{ds} = \frac{1}{h} \left[\Delta f(x0) + \frac{2s - 1}{2!} \Delta^2 f(x0) + \frac{3s^2 - 6s + 2}{3!} \Delta^3 f(x0)\right]
Here x = 2, x_0 = 1, s = 1, h = 1
f'(2) = 3 - \frac{1}{2} + \frac{2}{6} = \frac{13}{6}
f''(x) \approx \frac{1}{h^2} \frac{d^2Pn}{ds^2} = \frac{1}{h^2} \left[\Delta^2 f(x0) + (s - 1)\Delta^3 f(x_0)\right]
f''(2) = -1
Example 3: Calculate f^{(4)}(0.15)
Objective: To approximate F = \int_{a}^{b} f(x)dx
Third order Lagrange polynomial: n = 3, x0 = a, x3 = a + 3h = b, x1 = a + h, x2 = a + 2h, h = (b - a)/3
\int{x0}^{x3} f(x)dx = \frac{3h}{8} [f(x0) + 3f(x1) + 3f(x2) + f(x_3)] - \frac{3h^5}{80} f^{(4)}(\xi), with \xi \in (a, b)
Example 4: Using Trapezoidal, Simpson 1/3 and 3/8 rules, find \int{0}^{2} x^4 dx and \int{0}^{2} sin(x) dx and find the upper bound for the error.
Let f \in C^2[a, b] and n an even number, h = (b - a)/(n + 2), xj = a + (j + 1)h, for j = -1, 0, 1, …, n + 1. There exists a \mu \in (a, b) for which the Composite Midpoint rule for n + 2 subintervals can be written with its error term as: \int{a}^{b} f(x)dx= 2h\sum{j=0}^{n/2} f(x{2j}) + \frac{(b - a)}{6} h^2 f''(\mu)
Example 6: Determine values of n that will ensure an approximation error of less than 0.00002 when approximating \int_{0}^{\pi} sin(x)dx employing:
For each case, approximate the integral with the smallest possible n.