Suppose the function $f(x)$ has a Taylor series expansion. Then $$\int_a^bf(x)dx=\int_a^b(f(a)+f'(a)(x-a)+\frac{1}{2}f''(a)(x-a)^2+\cdots)dx=\\ \frac{f(a)}{1!}(b-a)+\frac{f'(a)}{2!}(b-a)^2+\frac{f''(a)}{3!}(b-a)^3+\cdots$$


$$\int_a^bf(x)dx=\int_a^b(f(b)+f'(b)(x-b)+\frac{1}{2}f''(b)(x-b)^2+\cdots)dx=\\ \frac{f(b)}{1!}(b-a)-\frac{f'(b)}{2!}(b-a)^2+\frac{f''(b)}{3!}(b-a)^3+\cdots$$



However, one can also consider $$\int_a^bf(x)dx=\int_a^df(x)dx+\int_d^bf(x)dx$$

where $d=\frac{a+b}{2}$


$$\int_a^df(x)dx=\int_a^d(f(a)+f'(a)(x-a)+\frac{1}{2}f''(a)(x-a)^2+\cdots)dx=\\ \frac{1}{1!}\frac{f(a)}{2}(b-a)+\frac{1}{2!}\frac{f'(a)}{2^2}(b-a)^2+\frac{1}{3!}\frac{f''(a)}{2^3}(b-a)^3+\cdots$$

$$\int_d^bf(x)dx=\int_d^b(f(b)+f'(b)(x-b)+\frac{1}{2}f''(b)(x-b)^2+\cdots)dx=\\ \frac{1}{1!}\frac{f(b)}{2}(b-a)-\frac{1}{2!}\frac{f'(b)}{2^2}(b-a)^2+\frac{1}{3!}\frac{f''(b)}{2^3}(b-a)^3+\cdots$$

and so


My question is, the two estimations are different. Which one is correct?

  • $\begingroup$ In the first two integrals, you're Taylor expanding about $a$ first and then expanding about $b$. Then, you're again saying that $\int^b_af(x)dx$ is the average of these two integrals - that part doesn't make sense to me. Could you justify? $\endgroup$
    – user122283
    Apr 16, 2014 at 0:05
  • $\begingroup$ After "Therefore" should it be $f'(a)+f'(b)$ in the numerator of the second term on the right of the equality? And similarly about the minus sign in front of the second term in the last line of the mass following "Then"? $\endgroup$
    – user142299
    Apr 16, 2014 at 0:10
  • $\begingroup$ Check the various methods to compute integrals numerically, there is quite a remarkable body of theory there. $\endgroup$
    – vonbrand
    Apr 16, 2014 at 0:24
  • $\begingroup$ Disregard my comment I was mistaken... I think I see what happened though I'll post an answer if I figure this out. $\endgroup$
    – user142299
    Apr 16, 2014 at 0:29
  • $\begingroup$ Wow this is undoubtedly the best question I have seen in a long time - wish I could upvote. $\endgroup$
    – user142299
    Apr 16, 2014 at 0:37

1 Answer 1


Remarkably, they appear to both be correct. I have checked the following integrals using both formulas: $$\int_0^{\pi/2}\sin x\,\mathrm{d}x=1,\;\;\int_0^{\pi/2}\cosh x\,\mathrm{d}x\approx 2.301,\;\;\int_a^{b}x^2\,\mathrm{d}x=\frac{b^3-a^3}{3},\;\;\int_a^{b}x^3\,\mathrm{d}x=\frac{b^4-a^4}{4}$$ See for example Here and Here

(scroll down to "Alternate forms")

The first two were performed by a program in Python.

There does not appear to be any mistake in your argument, so I can only conclude that in fact they are equal to each other. Note that the second series converged much more rapidly in my approximations than did the first. Hopefully someone can provide a proof.

  • $\begingroup$ "Hopefully someone can provide a proof." - the OP's derivation is a proof. What are you looking for from another proof? $\endgroup$ Apr 21, 2014 at 9:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .