# How to write an integral like this in MathJax/LaTeX?

How can I write an integral with underlined characters evenly spaced between two integral signs like this in MathJax/LaTeX? In MathJax the easiest way to type it is probably:

\mathbf{P}((X,Y) \in B) = \iint\limits_{(x,y) \in B} f_{X,Y}(x,y) \,dx \,dy Live example on MathB.in

If you want the two integral signs as far apart as in the picture, you could use two regular \int signs and wrap them in \mathop so that you can place limits on the combined construct.

\mathbf{P}((X,Y) \in B) = \mathop{\int\int}\limits_{(x,y) \in B} f_{X,Y}(x,y) \,dx \,dy Live example on MathB.in

• Thank you!!! This is exactly what I needed. Jan 8, 2020 at 3:47
• +1: Cool live example! Jan 8, 2020 at 4:49

TL;DR:

\mathbf P((X,Y) \in B) = \iint\limits_{(x,y \in B)} f_{X,Y}(x,y)\ \mathrm dx\ \mathrm dy


gives First of all, the symbol \iint gives what you are looking for in terms of a double-integral sign. However, when adding the limits of integration, they appear to the side, rather than directly below. Thus, we need to make use of \limits_{...subscript...}.
If you want the two integral signs to be spaced out a bit more, replace \iint with \int \int, which places two seperate integral signs.