Approximation of an indefinite integral Consider this integral
$$\frac{1}{2d}\int_{-d}^{d}f(x-t) \, \mathrm{d}t$$
When $d$ goes to zero,
$$\lim _{d\to 0} \frac{1}{2d}\int_{-d}^{d}f(x-t) \, \mathrm{d}t = f(x)$$
but what is the second term in the expansion of this integral (the second order asymptotic) when $d$ is small?
($f(x)$ is an even function, i.e. $f(x-t)=f(t-x)$)
 A: HINT:
Let $F(d)$ be the function 
$$F(d)=\int_{-d}^d f(x-t)\,dt \tag 1$$
Expand $F(d)$ as given in $(1)$ in a Taylor series around $d=0$ and find
$$F(d)=2f(x)d+\frac13 f''(x)d^3+O(d^5)$$

SPOILER ALERT:  Scroll over the highlighted region to reveal the full expansion

Note from $(1)$ that $F'(d)=f(x-d)+f(x+d)$.  Continuing to differentiate we find $$F^{(n)}(0)=(1-(-1)^n)f^{(n-1)}(x)$$and therefore the Taylor series for $F(d)$ is $$F(d)=\sum_{n=0}^\infty \frac{2f^{(2n)}(x)}{(2n+1)!}d^{2n+1}$$Finally, dividing by $2d$ we find that $$\frac{1}{2d}\int_{-d}^d f(x-t)\,dt=f(x)+\frac16 f''(x)d^2+\sum_{n=2}^\infty \frac{f^{(2n)}(x)}{(2n+1)!}d^{2n}$$  

A: Take the Taylor expansion of $f(x-t)$ about $x$ upto the term in $x^3$ and integrate term by term to get:
$$
\int_{-d}^df(x-t)dt\approx\int_{-d}^d \left[f(x)+(-t)f'(x)+\frac{t^2}{2}f''(x)\right]\;dt=2df(x)+\frac{d^3}{3}f''(x)
$$
and the error term is $O(t^5)$
A: $$\frac{1}{2d}\int_{-d}^df(x-t)dt=\frac{1}{2d}\int_{-d}^d[f(x)-f'(x)t+\frac{1}{2}f''(x)t^2+\cdots]dt$$
$$=\frac{1}{2d}f(x)\times2d-\frac{1}{2d}\int_{-d}^df'(x)tdt+\frac{1}{2d}\int_{-d}^d\frac{1}{2}f''(x)t^2dt+\cdots$$
$$=f(x)-\frac{1}{2d}f'(x)\int_{-d}^dtdt+\frac{f''(x)}{4d}2\times\frac{d^3}{3}+\cdots$$
$$=f(x)+\frac{f''(x)}{6}d^2+\cdots$$
