Consider the following numerical integration method:$$\int_a^b \left( f'(x) \right)^2\ dx \approx h\cdot \sum_{i=0}^{n-1} \left(\frac{f(x_{i+1}) - f(x_i)}{h}\right)^2$$ Where $h=\frac{b-a}{n}$ and $x_k = a+kh$. You may assume the derivatives (in any order) are bounded. What is the error for this method?
So basically I could subtract the right-hand-side from the left-hand-side but I don't see how to proceed.
Could Taylor expansion help here?
EDIT
Let's look at the following Taylor expansions
$$f(x) = f(a) + f'(a)(x-a) + \frac{f''(a)}{2}(x-a)^2 + \frac{f^{3}(a)}{3!}(x-a)^3 + \cdots$$
$$f'(x) = f'(a) + f''(a)(x-a) + \frac{f^{3}(a)}{2}(x-a)^2 + \frac{f^{4}(a)}{3!}(x-a)^3 + \cdots$$
$$(f'(x))^2 = (f'(a))^2 + (f''(a))^2(x-a)^2 + \frac{(f^{3}(a))^2}{4}(x-a)^4 + \frac{(f^{4}(a))^2}{36}(x-a)^9 + \cdots$$
Hence,
$$\int_a^b (f'(x))^2 \ dx = \int_a^b (f'(a))^2 + (f''(a))^2(x-a)^2 + \frac{(f^{3}(a))^2}{4}(x-a)^4 + \frac{(f^{4}(a))^2}{36}(x-a)^9 + \cdots$$
We can change the integral by substituting $[y = x-a]$:
$$\int_0^{nh} (f'(y))^2 \ dy = \int_0^{nh} (f'(a))^2 + (f''(a))^2y^2 + \frac{(f^{3}(a))^2}{4}y^4 + \frac{(f^{4}(a))^2}{36}y^9 + \cdots$$
EDIT2:
I kinda think I should take another approach first.
We are familiar with the forward difference formula:
$$ f'(x_0) = \frac{f(x_0 +h) - f(x_0)}{h} - f''(\xi) \frac{h^2}{2}$$
We could apply this to our method to get:
$$\approx \sum_{i=0}^{n-1} \left( f'(x_0) + f''(\xi(x_i))\frac{h^2}{2} \right)^2$$