I try to modify @Mico answer as follows:
\documentclass{article}
\begin{document}
\[
V = \int_0^2(4-x^2)\,dx
= 4\int_0^2\!dx - \int_0^2\!x^2\,dx
= 4\left[x\middle]_0^2 - \middle[\frac{1}{3}x^3\right]_0^2
\]
\end{document}
but to my surprise I got the following result:
Is this a bug?
I expect that at both term indices will be on the same position regarding bracket. The same result is also if instead x is for example if in brackets is \frac{1}{x}.

\middleisn't as useful as one might have hoped.... – David Carlisle Mar 27 '17 at 21:22\middlefor this? Anyway,\middleis\leftunder cover, so it doesn't accept subscript or superscript. – egreg Mar 27 '17 at 21:26\middleis not clear anymore to me :( – Zarko Mar 27 '17 at 21:42