1. ## Numerical integration

Find $\alpha$ such that the following differentiation formula holds:

$f'(x) \approx \alpha \int_{-h}^h t \, f(x+t) dt$

So first thing I did was tried to integrate using integration by parts

$\int_{-h}^h t \, f(x+t) dt = [t \, F(x + t) ] ^h _{-h} - \int_{-h}^h F(x+t) dt$

but I don't think that's right. I'm trying to get it to look like $\lim_{h \rightarrow \infty} \dfrac{f(x + h) - f(x)}{h}$ so I'm guessing $\alpha$ has a limit in it?

Can anyone help?

2. ## Re: Numerical integration

I assume that h is supposed to be getting pretty small. If that's the case we can expand f as a taylor series

$f(x+t)\approx f(x)+f'(x)t$ so

$\displaystyle{\int_{-h}^h}t f(x+t)~dt \approx \displaystyle{\int_{-h}^h}t \left(f(x)+f'(x)t\right)~dt = \displaystyle{\int_{-h}^h}t f(x)+f'(x)t^2~dt$

$\displaystyle{\int_{-h}^h}t f(x)+f'(x)t^2~dt= 0 + \dfrac 2 3 h^3 f'(x) = \dfrac 2 3 h^3 f'(x)$

$f'(x) \approx \alpha \dfrac 2 3 h^3 f'(x)$

so $\alpha = \dfrac 3 {2 h^3}$

probably not a bad idea to get another set of eyeballs to check this.

3. ## Re: Numerical integration

Originally Posted by romsek
I assume that h is supposed to be getting pretty small. If that's the case we can expand f as a taylor series

$f(x+t)\approx f(x)+f'(x)t$ so

$\displaystyle{\int_{-h}^h}t f(x+t)~dt \approx \displaystyle{\int_{-h}^h}t \left(f(x)+f'(x)t\right)~dt = \displaystyle{\int_{-h}^h}t f(x)+f'(x)t^2~dt$

$\displaystyle{\int_{-h}^h}t f(x)+f'(x)t^2~dt= 0 + \dfrac 2 3 h^3 f'(x) = \dfrac 2 3 h^3 f'(x)$

$f'(x) \approx \alpha \dfrac 2 3 h^3 f'(x)$

so $\alpha = \dfrac 3 {2 h^3}$

probably not a bad idea to get another set of eyeballs to check this.
Yea I think that's right, if we expand about the taylor series then we'd also get a f''(x) and a f'''(v) term which if you integrate the f'''(v) will give you the error of this approximation.

I just didn't know how to start this, thanks!