6

I can do a path integral like this:

$$\oint \limits_{C(S)} fd{\textbf l}$$

But how can I do a surface integral? The output should look something the surface integrals below, but hopefully better:

enter image description here

2 Answers2

11

A version where the limits are underneath the integral signs:

\documentclass{article}

\usepackage{amsmath,esint}

\newcommand*\VF[1]{\mathbf{#1}}
\newcommand*\dif{\mathop{}\!\mathrm{d}}

\begin{document}

\begin{align*}
  \iiint\limits_V (\nabla \cdot \VF{F}) \dif V
  &= \oiint\limits_{S(V)} \VF{F} \cdot \hat{\VF{n}} \dif S\\
  \iiint\limits_V (\nabla \times \VF{F}) \dif V
  &= \oiint \hat{\VF{n}} \times \VF{F} \dif S
\end{align*}

\end{document}

output1

A version where the limits are beside the integral signs:

\documentclass{article}

\usepackage{amsmath,esint}

\newcommand*\VF[1]{\mathbf{#1}}
\newcommand*\dif{\mathop{}\!\mathrm{d}}

\begin{document}

\begin{align*}
  \iiint_{V} (\nabla \cdot \VF{F}) \dif V
  &= \oiint_{S(V)} \VF{F} \cdot \hat{\VF{n}} \dif S\\
  \iiint_{V} (\nabla \times \VF{F}) \dif V
  &= \oiint \hat{\VF{n}} \times \VF{F} \dif S
\end{align*}

\end{document}

output2

Note: As pointed out by Charles Staats, the upright d in a differential is not common notation in all branches of science; for an italic d, simply use a d without \mathrm.

David Carlisle
  • 757,742
  • If the name clash occurs, the compiler will warn you unless you use \def instead of \(re)newcommand. – kiss my armpit Sep 21 '13 at 16:17
  • 1
    A note: Depending on your field, it may or may not be desirable to make the d in e.g. dV upright (as in this answer) rather than the default italic. To get italic, simply replace \mathrm{d} by d in the definition of the \dif command; the command is still useful to adjust the spacing. – Charles Staats Sep 21 '13 at 21:28
  • 1
    @CharlesStaats In general I'd completely agree, but style seemed to be unimportant; I was merely trying to replicate the given example as closely as I could. (Personally, I'd define an \Int<n>_^[d-var]{integrand} macro for this.) I will say that I've never seen a field that prefers an italicized d (although I have seen it in a \mathbb-like style). – Sean Allred Sep 22 '13 at 04:34
  • @Sean: An italicized d is preferred in pure mathematics. – Charles Staats Sep 22 '13 at 17:21
  • @CharlesStaats How odd… not in my experience! Notation tends to differ with geography as well… Strange. – Sean Allred Sep 22 '13 at 20:17
7
\documentclass{article}
\usepackage{amsmath,esint}
\begin{document}
\begin{align*}
  \iiint\limits_V(\nabla \cdot \mathbf{F}) dV
      & = \oiint \limits_{S(V)} \mathbf{F \cdot \hat{n}} dS \\
  \iiint\limits_V(\nabla \times \mathbf{F}) dV
      & = \oiint \limits_{S(V)} \mathbf{\hat{n} \times F} dS \\
  \iiint\limits_V(\nabla f) dV
      & = \oiint\limits_{S(V)}\mathbf{\hat{n}}f dS
\end{align*}
\end{document}

output

David Carlisle
  • 757,742
Sean Allred
  • 27,421
  • 1
    Don't you need to load the amsmath packages to get the align environment? – Svend Tveskæg Sep 22 '13 at 05:01
  • @SvendTveskæg You are absolutely right; I'm not sure why it worked on my system without that… – Sean Allred Sep 22 '13 at 16:17
  • [continuation from below Svend's answer] The first three books I checked were Ahlfors' Complex Analysis, Spivak's Comprehensive Introduction, and the calculus book I'm teaching out of (Stewart, Multivariable Calculus). All three of them use italicized d for differentials. I also just confirmed that Hartshorne's Algebraic Geometry and Beauville's Complex Algebraic Surfaces use italicized d. I don't want to waste too much time on this, but of the five books on my bookshelf I have checked, all five of them used an italicized d for differentials. – Charles Staats Sep 22 '13 at 22:23