# How to show the integral symbol on this site? [duplicate]

On this question: How do I use substitution in integrals? there are examples of what I want. I just want to show integrals on my questions like that. How can I do it?

• Are you asking for a tutorial on writing equations so they display correctly? See here, and here. – Arturo Magidin Jun 24 '12 at 1:46
• Click on "edit" on that (or any other) page and you'll see how it was done. – Gerry Myerson Jun 24 '12 at 4:54
• @GerryMyerson: He may not be able to edit (low rep). But right-clicking on an equation (at least on Firefox) will open a dialogue window that should allow him to see the MathJax code displayyed. – Arturo Magidin Jun 24 '12 at 5:23
• @Arturo: Low-rep users can suggest edits, therefore can edit. In fact, anonymous users can suggest edits, so surely a user with 108 points of reputation can... – Asaf Karagila Jun 24 '12 at 5:46
• @Asaf: All these "new-fangled" things. When I was a low-rep user, the edit button did not even appear. And we had to post during snowstorms, up-hill, both ways! – Arturo Magidin Jun 24 '12 at 5:47
• There's a workaround explained in this answer - every user can view the source. Another possibility would be to view the source of the page you're viewing (Ctrl+U in Firefox), but it's more difficult to find it there and you can see only mathjax syntax there, not markdown. – Martin Sleziak Jun 24 '12 at 7:34

For basics about MathJax, which is used at this site to typeset math, see editing help or this question.

Specifically for integrals:

You can get integral like this:
$$\int x^2 \, dx = \frac{x^3}3 +C$$ $$\int x^2 \, dx = \frac{x^3}3 +C$$ Notice \, in front of dx - this adds a small space between them, so it looks better.

You can write multiple integrals like this:
$$\iint r(\cos\varphi+\sin\varphi)\,d\varphi\,dr$$ $$\iint r(\cos\varphi+\sin\varphi)\, d\varphi\, dr$$ Writing \iint gives you better spacing than just \int\int. For triple integrals:
$$\iiint 1 \,dx \,dy \,dz$$ $$\iiint 1 \,dx \,dy \,dz.$$

If you want definite integrals, you can add bounds like this:
$$\int_0^1 x^2 \,dx= \frac13$$
$$\int_0^1 \int_0^{2\pi} r \,d\varphi\,dr$$
$$\iint_{x^2+y^2\le 1} x+y \,dx\,dy$$
$$\int_0^1 x^2 \,dx= \frac13\\ \int_0^1 \int_0^{2\pi} r \,d\varphi\,dr\\ \iint_{x^2+y^2\le 1} x+y \,dx\,dy$$ Notice that if the subscript or superscript has more than one symbol, you have to enclose it in {}, e.g. $\int_{-\pi}^\pi$ or $\int_0^{2\pi}$. (Or course, you can use curly brackets even if there is only one symbol, e.g. $\int_{0}^{1}$ works fine; but they are not necessary.) Here is what these examples look like: $\int_{-\pi}^\pi$; $\int_0^{2\pi}$ and $\int_{0}^{1}$.

Another useful thing - if you are using substitution or per partes you might want to indicate what you are doing, e.g. like this:
$$\int \cos x \sin x \,dx = \left| \begin{array}{c} u=\sin x \\ du=\cos x\,dx \end{array} \right| =\int u \,du$$ $$\int \cos x \sin x \,dx = \left| \begin{array}{c} u=\sin x \\ du=\cos x\,dx \end{array} \right| =\int u \,du$$ $$\int x\cos x\, dx = \left| \begin{array}{cc} u=x & v'=\cos x \\ u'=1 & v=\sin x \end{array} \right| = x\sin x - \int \sin x \,dx$$ $$\int x\cos x\, dx = \left| \begin{array}{cc} u=x & v'=\cos x \\ u'=1 & v=\sin x \end{array} \right| = x\sin x - \int \sin x \,dx$$

Integrals are rendered slightly differently in centered formulas (marked by pairs of dollars) and inline mode, compare this:
$$\int_a^b f(x) \,dx,$$ $\int_a^b f(x) \,dx$ and $\int\limits_a^b f(x)\,dx$. $$\int_a^b f(x) \,dx,$$ $\int_a^b f(x) \,dx$ and $\int\limits_a^b f(x)\,dx$.

• For double integrals, \iint rather than \int\int produces two integral signs with the proper amount of space between them. – Did Jun 24 '12 at 10:57
• I did not know that. But if I want $\int_0^1 \int_0^1$, I use \int twice, right? I made the post CW, feel free to edit it. – Martin Sleziak Jun 24 '12 at 10:59
• Yes, \int twice, or \iint_{} with the domain of integration in the subscript, which can be an awkward alternative or not, depending on the domain. – Did Jun 24 '12 at 11:02
• @did I've added some example into the post. I hope it's approximately like what you meant. – Martin Sleziak Jun 24 '12 at 11:22
• For completeness, let me note that the triple integral symbol $\displaystyle \iiint$ is also defined: \iiint. We also have the contour integral symbol $\displaystyle \oint$ \oint. – Willie Wong Jun 25 '12 at 8:03
• @WillieWong I've added \iiint. I did not write about contour integrals, since I use them only rarely. Feel free to edit my post or add a separate answer with some examples of contour integrals, if you thing it would be useful. – Martin Sleziak Jun 25 '12 at 12:33
• This post mentions how the integral sign can be made larger. – Martin Sleziak Mar 21 '14 at 14:14