I read that I can use \int_a^b
or \int\limits_a^b
. With \limits
, the equation looks more compact horizontally, but a little bigger vertically.
Is there some design rule to it, or just personal preference?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI am not aware of explicit design rules that would stipulate when to use side-set and when to used below/above limits of integration. That said, it's very rare to see anything but side-set limits of integration in either inline or display math mode.
The main reason for not placing the limits of integration above and below the integral sign must surely be that doing otherwise would increase considerably the depth and height of the expressions, which greatly risks ruining the overall "color" (more precisely: the average grayness) of the page on which the expressions are typeset.
The only exception to this dictum I can think of -- at least for single integrals -- is if the integrand itself is quite large, e.g., if it contains a double-fraction term. In such cases, placing the limits of integration above and below the integral symbol could help simplify the visual experience of the entire expression. As @PeterGrill and the other answer highlight, two further good candidate cases for setting the limit of integration below the integral symbol(s) are (i) if one is dealing with multiple integrals and (ii) if one wishes to express the entire set over which the integration takes place with a symbol (e.g., \mathbb{R}
) rather than with explicit lower and upper bounds.
The following example, in which all expressions are typeset in display math mode, contrasts the visual appeal of three separate integral expressions: the Gamma function, the Beta function (in a form that involves a fractional term), and an entirely fictitious integral expression that involves a double fraction term. Speaking for myself, I'd stay that only in the third case is it defensible to use \int\limits
instead of just \int
. Observe that the example code also demonstrates that issues of excessive amounts of white space between the integral symbol (and its side-set limits of integration) and the integrand are best dealt with by applying one or more \!
(negative thinspace) instructions rather than by setting the limits of integration above and below the integral symbol.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\Gamma(z)=\int_0^\infty \!\! e^{-x}x^{z-1}\,dx
\quad&\text{vs.}\quad
\Gamma(z)=\int\limits_0^\infty e^{-x}x^{z-1}\,dx\\
B(x,y) = \int_0^\infty \!\! \frac{t^{x-1}}{(1+t)^{x+y}}\,dt
\quad&\text{vs.}\quad
B(x,y) = \int\limits _0^\infty \frac{t^{x-1}}{(1+t)^{x+y}}\,dt\\
\int_{-\infty}^\infty \frac{\frac{a(x)}{b(x)}}{\frac{c(x)}{f(x)}}\,dx
\quad&\text{vs.}\quad
\int\limits_{-\infty}^\infty \frac{\frac{a(x)}{b(x)}}{\frac{c(x)}{f(x)}}\,dx
\end{align*}
\end{document}
\limits
useful when the integration is over a region (as in the other answer).
Nov 20, 2012 at 20:56
\int\limits
may also be called for if one is dealing with (i) multiple integrals and (ii) set notation (e.g., \mathbb{R}
) to denote a region over which the integration takes place instead of providing explicit lower and upper bounds.
\!
) after the limits it may be more straight-forward to put the limit subscript and/or superscript each into a \mathclap{...}
(provided the formula being integrated is not too tall). \mathclap
is provided by the mathtools package.
I have never seen \int\limits
used in syllabi at my university unless it was used for double (\iint
) or more combined integrals. In the code fragment below, without the \limits
, it is formatted wrong.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\iint\limits_D \quad \iint_D
\end{equation}
\end{document}
\limits
is traditionally used in German and Russian (and I guess everywhere in between), but it also needs a proper integral sign, like that of Euler, not that of Computer Modern.\limits
, e.g. encyclopediaofmath.org/wiki/Integral