This site is supported by donations to The OEIS Foundation.
Template:Integral
[⧼Purge⧽ Template:Integral]
- See also: {{integral/nicer}}, which produces nicer integral symbols but requires
font-family: 'Lucida Sans Unicode';
which we cannot rely on being installed on the user's computer/tablet/smartphone...
The {{integral}} mathematical formatting template is used to obtain an HTML+CSS or a LaTeX formatted integral expression of one of the following types:
- simple integral,
- double integral,
- triple integral,
- quadruple integral,
- multiple integral,
- contour integral,
- clockwise contour integral,
- counterclockwise contour integral,
- boundary surface integral,
- boundary hypersurface integral.
Note: The {{integral}} template uses the {{integral/int}} helper template to implement the int
(simple integral) option, which is also used to implement the idotsint
(multiple integral) option.
Contents
Usage
- {{integral|type|from|to|integrand}}
or
- {{integral|type|from|to|integrand|format}}
or
- {{integral|type|from|to}} integrand
or
- {{integral|type|from|to|format}} integrand
where the first argument (type) is from
∫ | ∬ | ∭ | ⨌ | ∮ | ∲ | ∳ | ∯ | ∰ |
∫ | ∬ | ∭ | ⨌ | ∮ | ∲ | ∳ | ∯ | ∰ |
int | iint | iiint | iiiint | oint | varointclockwise | ointctrclockwise | oiint | oiiint |
∫ | ∬ | ∭ | ⨌ | ∮ | ∲ | ∳ | ∯ | ∰ |
∫ | ∬ | ∭ | ⨌ | ∮ | ∲ | ∳ | ∯ | ∰ |
int | iint | iiint | iiiint | oint | varointclockwise | ointctrclockwise | oiint | oiiint |
with description (these match the LaTeX definitions exactly, except for 2int, 3int and 4int)
- int: simple integral
∫ ∫
, - iint: double integral
∬ ∬
,
- 2int: double integral
∫ ∫ ∫ ∫
,
- 2int: double integral
- iiint: triple integral
∭ ∭
,
- 3int: triple integral
∫ ∫ ∫ ∫ ∫ ∫
,
- 3int: triple integral
- iiiint: quadruple integral
⨌ ⨌
,
- 4int: quadruple integral
∫ ∫ ∫ ∫ ∫ ∫ ∫ ∫
,
- 4int: quadruple integral
- idotsint: multiple integral
⋯∫ ∫ ∫ ⋯ ∫
, - oint: contour integral
∮ ∮
, - varointclockwise: clockwise contour integral
∲ ∲
, - ointctrclockwise: counterclockwise contour integral
∳ ∳
, - oiint: boundary surface integral
∯ ∯
, - oiiint: boundary hypersurface integral
∰ ∰
;
and where
- the second (from) and third (to) arguments are the limits of a definite integral;
and where
- the fourth argument (integrand) is the mathematical expression to integrate (optional);
and where the fifth argument, or fourth argument if integrand is omitted, (format) is from
- htm: HTML+CSS markup (text style) for integral expression (default),
- HTM: HTML+CSS markup (display style) for integral expression,
- tex: LaTeX markup (text style) for integral expression,
- TEX: LaTeX markup (display style) for integral expression.
Examples
- See also {{integral/testcases}} for more examples and/or tests.
In the following examples
- {{int}} calls {{integral}} with the int option;
- {{iint}} calls {{integral}} with the iint option;
- {{iiint}} calls {{integral}} with the iiint option;
- {{iiiint}} calls {{integral}} with the iiiint option;
- {{idotsint}} calls {{integral}} with the idotsint option;
- {{oint}} calls {{integral}} with the oint option;
- {{varointclockwise}} calls {{integral}} with the varointclockwise option;
- {{ointctrclockwise}} calls {{integral}} with the ointctrclockwise option;
- {{oiint}} calls {{integral}} with the oiint option;
- {{oiiint}} calls {{integral}} with the oiiint option.
Text style inline formulae
The code
: {{Wikipedia|Lorem ipsum|}} dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Gauss{{'}}s Law: {{math| ''{{Gr|epsilon}}''{{sub|0}}{{sp|3}}<!-- -->{{oiint|{{d|{{Gr|Omega}}|part}}|<!-- -->|{{vec|E|b}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{sp|1}}{{vec|S|b}}}}<!-- -->}}<!-- --> {{=}} <!-- -->{{iiint|{{Gr|Omega}}|<!-- -->|''{{Gr|rho}}''{{sp|3}}{{d|''V''}}<!-- -->}} |&}}. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. {{math| {{Gr|Gamma}}(''z'') {{=}} <!-- -->{{int|0|infty |''e''{{^|{{op|-}}{{sp|1}}''t''}}{{sp|2}}''t''{{sp|2}}{{^|''z''{{sp|1}}{{op|-}}1}}{{sp|3}}{{d|''t''}} }} |&}}. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
yields the HTML+CSS: Line spacing is undisturbed.
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Gauss’s Law:
. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.ϵ0
E ⋅ d S =∯ ∂ Ω ∫ ∫
ρ d V∫ Ω
. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Γ(z) =
e − t t z − 1 d t∫ ∞ 0
Examples without integrand as argument (as in LaTeX)
The code
: {{repeat|2|{{repeat|5|yadda{{nbsp}}}}{{nl}}}}before {{math|{{int|''a''|''b''}} ''x''{{^|2}}{{sp|3}}{{d|''x''}} {{=}} {{tfrac|''b''{{^|3}} {{op|-}} ''a''{{^|3}}|3}}|&}} after{{repeat|2|{{nl}}{{repeat|5|yadda{{nbsp}}}}}}
yields the text style HTML+CSS
- yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda
before
after
x 2 d x =∫ b a b 3 − a 3 3
yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda
The code
: {{repeat|2|{{repeat|5|yadda{{nbsp}}}}{{nl}}}}before {{math|{{int|''a''|''b''|tex}} ''x''{{^|2|tex}}{{sp|3|tex}}{{d|''x''|tex}} {{=}} {{tfrac|''b''{{^|3|tex}} {{op|-}} ''a''{{^|3|tex}}|3|tex}}|$}} after{{repeat|2|{{nl}}{{repeat|5|yadda{{nbsp}}}}}}
yields the text style LaTeX
- yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda
before after
yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda
The code
{{indent}}{{math|{{int|''a''|''b''|HTM}} ''x''{{^|2}}{{sp|3}}{{d|''x''}} {{=}} {{frac|''b''{{^|3}} {{op|-}} ''a''{{^|3}}|3|HTM}}|&&}}
yields the display style HTML+CSS
|
The code
{{indent}}{{math|{{int|''a''|''b''|TEX}} ''x''{{^|2|tex}}{{sp|3|tex}}{{d|''x''|tex}} {{=}} {{frac|''b''{{^|3|tex}} {{op|-}} ''a''{{^|3|tex}}|3|TEX}}|$$}}
yields the display style LaTeX
Examples with integrand as argument
The code
: {{repeat|2|{{repeat|5|yadda{{nbsp}}}}{{nl}}}}before {{math|{{int|''a''|''b''|''x''{{^|2}}{{sp|3}}{{d|''x''}}}} {{=}} {{tfrac|''b''{{^|3}} {{op|-}} ''a''{{^|3}}|3}}|&}} after{{repeat|2|{{nl}}{{repeat|5|yadda{{nbsp}}}}}}
yields the text style HTML+CSS
- yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda
before
after
x 2 d x =∫ b a b 3 − a 3 3
yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda
The code
: {{repeat|2|{{repeat|5|yadda{{nbsp}}}}{{nl}}}}before {{math|{{int|''a''|''b''|''x''{{^|2|tex}}{{sp|3|tex}}{{d|''x''|tex}}|tex}} {{=}} {{tfrac|''b''{{^|3|tex}} {{op|-}} ''a''{{^|3|tex}}|3|tex}}|$}} after{{repeat|2|{{nl}}{{repeat|5|yadda{{nbsp}}}}}}
yields the text style LaTeX
- yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda
before after
yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda
The code
{{indent}}{{math|{{int|''a''|''b''|''x''{{^|2}}{{sp|3}}{{d|''x''}}|HTM}} {{=}} {{frac|''b''{{^|3}} {{op|-}} ''a''{{^|3}}|3|HTM}}|&&}}
yields the display style HTML+CSS
|
The code
{{indent}}{{math|{{int|''a''|''b''|''x''{{^|2|tex}}{{sp|3|tex}}{{d|''x''|tex}}|TEX}} {{=}} {{frac|''b''{{^|3|tex}} {{op|-}} ''a''{{^|3|tex}}|3|TEX}}|$$}}
yields the display style LaTeX
Contour integrals and boundary integrals
The code
: {{repeat|2|{{repeat|7|yadda{{nbsp}}}}{{nl}}}}before {{math| {{varointclockwise|''C''||''F''{{sp|1}}({{vec|x|b}}){{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|x|b}}}}}} {{=}} <!-- -->{{op|-}}{{ointctrclockwise|''C''||''F''{{sp|1}}({{vec|x|b}}){{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|x|b}}}}}} |tex = {{varointclockwise|C||F({{vec|x|b|tex}}) \sdot {{d|{{vec|x|b|tex}}|tex}}|tex}} {{=}} <!-- -->- {{ointctrclockwise|C||F({{vec|x|b|tex}}) \sdot {{d|{{vec|x|b|tex}}|tex}}|tex}} |&}} after{{repeat|2|{{nl}}{{repeat|7|yadda{{nbsp}}}}}}
yields the text style HTML+CSS
- yadda yadda yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda yadda yadda
before
after
F (x) ⋅ d x = −∲ C
F (x) ⋅ d x∳ C
yadda yadda yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda yadda yadda
and with the $
option, yields the display style LaTeX
- yadda yadda yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda yadda yadda
before after
yadda yadda yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda yadda yadda
The code
{{indent}}{{math| {{varointclockwise|''C''||''F''{{sp|1}}({{vec|x|b}}){{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|x|b}}}}|HTM}} {{=}} <!-- -->{{op|-}}{{ointctrclockwise|''C''||''F''{{sp|1}}({{vec|x|b}}){{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|x|b}}}}|HTM}} |tex = {{varointclockwise|C||F({{vec|x|b|tex}}) \sdot {{d|{{vec|x|b|tex}}|tex}}|TEX}} {{=}} <!-- -->- {{ointctrclockwise|C||F({{vec|x|b|tex}}) \sdot {{d|{{vec|x|b|tex}}|tex}}|TEX}} |&&}}
yields the display style HTML+CSS
|
and with the $$
option, yields the display style LaTeX
\iint
and \iiint
and \iiiint
The code
: {{repeat|2|{{repeat|10|yadda{{nbsp}}}}{{nl}}}}<!-- -->before {{math|''F'' {{=}} {{iint|2-ball}} {{d|''F''}}|tex = F = \iint_{ 2\text{-ball} } dF|&}},{{sp|quad}}<!-- -->{{math|''G'' {{=}} {{iiint|3-ball}} {{d|''G''}}|tex = G = \iiint_{ 3\text{-ball} } dG|&}},{{sp|quad}}<!-- -->{{math|''H'' {{=}} {{iiiint|4-ball}} {{d|''H''}}|tex = H = \iiiint_{ 4\text{-ball} } dH|&}} after<!-- -->{{repeat|2|{{nl}}{{repeat|10|yadda{{nbsp}}}}}}
yields the text style HTML+CSS
- yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda
before
,F = ∫
d F∫ 2-ball
,G = ∫ ∫
d G∫ 3-ball
afterH = ∫ ∫ ∫
d H∫ 4-ball
yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda
The code
: {{repeat|2|{{repeat|10|yadda{{nbsp}}}}{{nl}}}}<!-- -->before {{math|''F'' {{=}} {{iint|2-ball}} {{d|''F''}}|tex = F = \iint_{ 2\text{-ball} } dF|$}},{{sp|quad}}<!-- -->{{math|''G'' {{=}} {{iiint|3-ball}} {{d|''G''}}|tex = G = \iiint_{ 3\text{-ball} } dG|$}},{{sp|quad}}<!-- -->{{math|''H'' {{=}} {{iiiint|4-ball}} {{d|''H''}}|tex = H = \iiiint_{ 4\text{-ball} } dH|$}} after<!-- -->{{repeat|2|{{nl}}{{repeat|10|yadda{{nbsp}}}}}}
yields the text style LaTeX
- yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda
before , , after
yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda
The code
: {{math|''F'' {{=}} {{iint|2-ball||HTM}} {{d|''F''}}|tex = F = \iint_{ 2\text{-ball} } dF|&&}},{{sp|quad}}<!-- -->{{math|''G'' {{=}} {{iiint|3-ball||HTM}} {{d|''G''}}|tex = G = \iiint_{ 3\text{-ball} } dG|&&}},{{sp|quad}}<!-- -->{{math|''H'' {{=}} {{iiiint|4-ball||HTM}} {{d|''H''}}|tex = H = \iiiint_{ 4\text{-ball} } dH|&&}}
yields the display style HTML+CSS
- ,
F = ∫
d F∫ 2-ball ,G = ∫ ∫
d G∫ 3-ball H = ∫ ∫ ∫
d H∫ 4-ball
The code
: {{math|''F'' {{=}} {{iint|2-ball||HTM}} {{d|''F''}}|tex = F = \iint_{ 2\text{-ball} } dF|$$}},{{sp|quad}}<!-- -->{{math|''G'' {{=}} {{iiint|3-ball||HTM}} {{d|''G''}}|tex = G = \iiint_{ 3\text{-ball} } dG|$$}},{{sp|quad}}<!-- -->{{math|''H'' {{=}} {{iiiint|4-ball||HTM}} {{d|''H''}}|tex = H = \iiiint_{ 4\text{-ball} } dH|$$}}
yields the display style LaTeX
- , ,
\idotsint
The code
: {{repeat|2|{{repeat|5|yadda{{nbsp}}}}{{nl}}}}before {{math|''H'' {{=}} {{idotsint|''n''-ball}} {{d|''H''}}|&}} after{{repeat|2|{{nl}}{{repeat|5|yadda{{nbsp}}}}}}
yields the text style HTML+CSS
- yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda
before
afterH =
⋯∫
d H∫ n-ball
yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda
The code
: {{repeat|2|{{repeat|5|yadda{{nbsp}}}}{{nl}}}}before {{math|''H'' {{=}} {{idotsint|''n''\text{-ball}||tex}} {{d|''H''|tex}}|$}} after{{repeat|2|{{nl}}{{repeat|5|yadda{{nbsp}}}}}}
yields the text style LaTeX
- yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda
before after
yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda
The code
: {{math|''H'' {{=}} {{idotsint|''n''-ball||HTM}} {{d|''H''}}|&&}}
yields the display style HTML+CSS
H =
⋯∫
d H∫ n-ball
The code
: {{math|''H'' {{=}} {{idotsint|''n''\text{-ball}||TEX}} {{d|''H''|tex}}|$$}}
yields the display style LaTeX
Tests
The code
: <math>\int_{0}^{1} x^3 dx</math> and {{math|\int_{0}^{1} x^3 dx|$$}}
yields the display style LaTeX (Not the fault of the {{math}} template: MS Edge chops LaTeX PNG's, whether or not we use the {{math}} template!)
- and
The code
: <math>\Gamma(z) = \int_{0}^{\infty} e^{-t} t^{z-1} dt</math> and {{math|\Gamma(z) {{=}} \int_{0}^{\infty} e^{-t} t^{z-1} dt|$$}}
yields the display style LaTeX (Not the fault of the {{math}} template: MS Edge chops LaTeX PNG's, whether or not we use the {{math}} template!)
- and
See also
- {{integral}} (type argument: int, iint, iiint, iiiint, idotsint, oint, varointclockwise, ointctrclockwise, oiint, oiiint)
- {{int}} (simple integral: {{integral}} with int as type argument)
- {{iint}} (double integral: {{integral}} with iint as type argument)
- {{iiint}} (triple integral: {{integral}} with iiint as type argument)
- {{iiiint}} (quadruple integral: {{integral}} with iiiint as type argument)
- {{idotsint}} (multiple integral: {{integral}} with idotsint as type argument)
- {{oint}} ([closed] path integral: {{integral}} with oint as type argument)
- {{varointclockwise}} ([closed] clockwise path integral: {{integral}} with varointclockwise as type argument)
- {{ointctrclockwise}} ([closed] counterclockwise path integral: {{integral}} with ointctrclockwise as type argument)
- {{oiint}} ([closed] surface integral: {{integral}} with oiint as type argument)
- {{oiiint}} ([closed] hypersurface integral: {{integral}} with oiiint as type argument)
External links