Latex Puts Too Much Space Next to Integrals

Integrals with limits take up width horizontally that includes their limits. In other words, if you have an integral with large limits below (or above) the integral

\int\limits_{-\infty < x < c} (c - x) \ dP(x)

you are left with a large amount of space to the left and right of the integral before the integrand (c - x) starts. This is sometimes desirable, but in my case it isn't, since I have a whole bunch of integrals like this all in the same expression. Is there a way to make whatever is inside the integral snuggle up next to the integral sign, ignoring the width of the limit?

3 Answers

Something like this will do the trick.

\usepackage{amsmath}
\def\mathclap#1{\text{\hbox to 0pt{\hss$\mathsurround=0pt#1$\hss}}}
\begin{document}
\[
\int\limits_{\mathclap{-\infty < x < c}} (c - x) \ dP(x)
\]
\end{document}

More about such tricks is given in this article.

0

It is possible with less effort:

\int\!\!\!{olution}

\! is a negative space. However, when a lot of formulas have to be altered, the previously posted answers may be more appropriate.

The mathtools package contains a definition for \mathclap, and also a command \smashoperator that is a bit more convenient:

\smashoperator{\int_{\infty < x < c}} (c - x) \, dP(x)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest