# How to align limits of double integrals?

I'd like to have the limits of two integrals vertically aligned.

In this example, the x and b should be positioned on the same line.

$\int\limits_x^{\infty}\int\limits_b^{\infty} x^2+y^2 \mathrm{d}x \mathrm{d}y$


Has anybody an idea how to achieve this?

One way is to use \vphantom{b} with x:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\int\limits_{\vphantom{b}x}^{\infty}\int\limits_b^{\infty} x^2+y^2 \mathrm{d}x \mathrm{d}y$
\end{document}


With some beautifications as per the comments of Mico:

\documentclass{article}
\usepackage{amsmath}
\newcommand*\diff{\mathop{}\!\mathrm{d}}
\begin{document}
$\int\limits_{\vphantom{b}x}^{\infty}\!\!\int\limits_b^{\infty} x^2+y^2 \,\diff x \, \diff y$
\end{document}


• Aah, you beat me by a few seconds to this answer... :-) Real quick: I would also recommend placing parentheses around the integrand, tightening the space between the two integral symbols by inserting \! (negative thinspace), and adding \, (positive thinspace) between the integrand and the variables of integration. – Mico Nov 18 '13 at 9:41
• @Mico And also between the variables of integration: \,dx\,dy is what you find in the TeXbook all the times. – Bakuriu Nov 18 '13 at 12:53
• @Mico I was improving the speed my two finger typing lately and it is the first time I was faster :-) Thanks for the comments and I edited the answer. – user11232 Nov 18 '13 at 22:26

Another possible method is to use an invisible strut like \mathstrut.

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[intlimits]{amsmath}
\usepackage{physics}

\begin{document}
$\int_{x\mathstrut}^{\infty}\int_{b\mathstrut}^{\infty} x^2+y^2\,\dd x\,\dd y$
\end{document}


For other formatting options the »physics« package is quite helpful.

Place a \strut in each limit, so your example becomes

$\int\limits_{x\strut}^{\infty}\int\limits_{b\strut}^{\infty} x^2+y^2 \mathrm{d}x \mathrm{d}y$


A \strut is an invisible box of zero width but the same height and depth as (I think) an parenthesis.

• Note that strut doesn't get smaller in subscripts so this does align them but leaves more space than the other two answers – David Carlisle Nov 18 '13 at 9:45