2
$\begingroup$

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$$

1 Answers 1

2

The Mean Value Theorem says that there is a $\xi\in(x_i,x_{i+1})$ so that $$ \frac{f(x_{i+1})-f(x_i)}{h}=f'(\xi) $$ For any $x\in(x_i,x_{i+1})$, $$ |f'(x)-f'(\xi)|\le h\sup\limits_{(x_i,x_{i+1})}f'' $$ and since $|f'(x)+f'(\xi)|\le2\sup\limits_{(x_i,x_{i+1})}f'$ $$ |f'(x)^2-f'(\xi)^2|\le2h\sup_{(x_i,x_{i+1})}f'\sup_{(x_i,x_{i+1})}f'' $$ That is, for any $x\in(x_i,x_{i+1})$, $$ \left|\,f'(x)^2-\left(\frac{f(x_{i+1})-f(x_i)}{h}\right)^2\,\right| \le2h\sup\limits_{(x_i,x_{i+1})}f'\sup\limits_{(x_i,x_{i+1})}f'' $$ Therefore, an estimate of the maximum error would be $$ 2h^2\sum_i\sup_{(x_i,x_{i+1})}f'\sup_{(x_i,x_{i+1})}f''\le2h(b-a)\sup_{[a,b]}f'\sup_{[a,b]}f'' $$

  • 0
    Thank you, but isn't it the error estimation for $(f'(x))^2$? I don't see where you took the integral into account2017-02-28
  • 0
    @blueplusgreen: In the second to the last inequality is an estimate of the error for each term in the sum. The next inequality is the sum multiplied by $h$.2017-02-28
  • 0
    I sort of understand it that way: $2h(b-a)\sup f' \sup f''$ is like the integration from $a$ to $b$ for the error bound at some point.2017-02-28
  • 0
    yet, something isn't clear to me: it's like you're comparing summation to integration (continuous vs discrete). Are you using some inequality? (Can you please justify the last inequality?)2017-02-28
  • 0
    @blueplusgreen: Write the integral as $\sum \int_{x_{i}}^{x_{i+1}}f'^2\, dx$. Write the fraction $h(\frac{f(x_{i+1})-f(x_i)}{h})^2$ as $\int (\frac{f(x_{i+1})-f(x_i)}{h})^2 dx$ then subtract term by term.2017-02-28
  • 0
    Oh I get it now. Thank you very much for the help!! (the $h$ had a good reason being there)2017-02-28