LaTeX Wiki
No edit summary
m (Fixed redlinks)
 
(22 intermediate revisions by 16 users not shown)
Line 1: Line 1:
  +
{{Symbol}} To specify the limits (or bounds) of integration, use subscripts and superscripts:
{{LsymTop}}
 
TeX has <code>\int</code> as the integral sign. Integral expressions are formed from the use of sub- and superscript, the judicious use of spacing, and simply writing out the differential. For example, a standard integral in LaTeX looks like
 
   
: <code>\int_a^b \! f(x) \, \mathrm{d}x.</code>
+
: <code><math>\int_a^b \! f(x) \, \mathrm{d}x.</math> </code>
: <math>\int_a^b \! f(x) \, \mathrm{d}x.</math>
+
: <syntaxhighlight lang=tex inline>\int_a^b \! f(x) \, \mathrm{d}x</syntaxhighlight>.
   
Note the use of <code>\mathrm{d}</code> to make a Roman "d" which distinguishes it from the product of variables ''d'' and ''x''. Note, too, the use of [[Negative thin space | \!]] to bring the function closer to the integral sign and the [[Thin space | \,]] to push the differential farther away. Without them, the integral looks like
+
Note the use of <code>\mathrm </code>to make a Roman "d" which distinguishes it from the product of variables ''d'' and ''x''. Note, too, the use of [[White space | \!]] to bring the function closer to the integral sign and the [[White space | \,]] to push the differential farther away. Without them, the integral looks like
   
: <math>\int_a^b f(x) \mathrm{d}x,</math>
+
: <math>\int_a^b f(x) dx,</math>
  +
: <syntaxhighlight lang=tex inline>\int_a^b f(x) dx</syntaxhighlight>,
   
 
which, although logically identical, is less legible and rankles the aesthetic sensibilities of many.
 
which, although logically identical, is less legible and rankles the aesthetic sensibilities of many.
  +
  +
Note: one can also use the <code>\dif</code> command from the ''commath'' package to make a Roman "d".
   
 
== Examples ==
 
== Examples ==
   
You can also treat the integral as a [[Sum-class symbol | sum-class symbol]] with the <code>\limit</code> command. This is most useful for double and triple integrals. For example,
+
You can also treat the integral as a [[Sum-class symbol | sum-class symbol]] with the <code>\limits</code> command. This is most useful for double and triple integrals. For example,
   
: <code>\iint\limits_D \, \mathrm{d}x\,\mathrm{d}y \quad \iiint\limits_E \, \mathrm{d}x\,\mathrm{d}y\,\mathrm{d}z</code>
+
: <syntaxhighlight lang=tex inline>\iint\limits_D \, \mathrm{d} x\,\mathrm{d} y \quad \iiint\limits_E \, \mathrm{d} x\,\mathrm{d} y\,\mathrm{d}z</syntaxhighlight>
 
: <math>\iint\limits_D \, \mathrm{d}x\,\mathrm{d}y \quad \iiint\limits_E \, \mathrm{d}x\,\mathrm{d}y\,\mathrm{d}z</math>
 
: <math>\iint\limits_D \, \mathrm{d}x\,\mathrm{d}y \quad \iiint\limits_E \, \mathrm{d}x\,\mathrm{d}y\,\mathrm{d}z</math>
   
Line 22: Line 24:
 
And let's not forget the [[Wikipedia:Line integral|closed path integral]].
 
And let's not forget the [[Wikipedia:Line integral|closed path integral]].
   
: <code>\oint \! \nabla f \, \mathrm{d}t = 0</code>
+
: <syntaxhighlight lang=tex inline>\oint \! \nabla f \, \mathrm{d}t = 0</syntaxhighlight>
 
: <math>\oint \! \nabla f \, \mathrm{d}t = 0</math>
 
: <math>\oint \! \nabla f \, \mathrm{d}t = 0</math>
  +
{{LsymBottom}}
 
  +
'''Note:''' To obtain double/triple/multiple integrals and cyclic integrals one must use the packages ''amsmath'' and ''esint'', respectively.
  +
  +
{{featured article}}
 
[[Category:Vector calculus]]
 
[[Category:Vector calculus]]
 
[[Category:Calculus]]
 
[[Category:Calculus]]
[[Category:Symbols]]
+
[[Category:Sum-class symbol]]

Latest revision as of 11:41, 6 February 2022

In LaTeX, \int is rendered as inside math mode. To specify the limits (or bounds) of integration, use subscripts and superscripts:

\int_a^b \! f(x) \, \mathrm{d}x.

Note the use of \mathrm to make a Roman "d" which distinguishes it from the product of variables d and x. Note, too, the use of \! to bring the function closer to the integral sign and the \, to push the differential farther away. Without them, the integral looks like

\int_a^b f(x) dx,

which, although logically identical, is less legible and rankles the aesthetic sensibilities of many.

Note: one can also use the \dif command from the commath package to make a Roman "d".

Examples

You can also treat the integral as a sum-class symbol with the \limits command. This is most useful for double and triple integrals. For example,

\iint\limits_D \, \mathrm{d} x\,\mathrm{d} y \quad \iiint\limits_E \, \mathrm{d} x\,\mathrm{d} y\,\mathrm{d}z

where D and E are regions that satisfy the requirements.

And let's not forget the closed path integral.

\oint \! \nabla f \, \mathrm{d}t = 0

Note: To obtain double/triple/multiple integrals and cyclic integrals one must use the packages amsmath and esint, respectively.