This site is supported by donations to The OEIS Foundation.

Template:Integral

From OeisWiki
Jump to: navigation, search

alt = This template is under construction...
This template is under construction.            

Please do not use this unfinished and/or still unreliable template.            


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.

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

HTML+CSS integral symbols rendered using the {{math}} template.
Integral symbols for text style (top two rows, italic for second row), and for display style (bottom two rows, italic for second row).
(See also:
{{integral/nicer}}, which uses font-family: 'Lucida Sans Unicode';.)
int iint iiint iiiint oint varointclockwise ointctrclockwise oiint oiiint


LaTeX integral symbols rendered using the {{math}} template.
Integral symbols for text style (top two rows, \mathit{...} for second row), and for display style (bottom two rows, \mathit{...} for second row).
Package amsmath is used for double/triple/quadruple integrals.
Package esint is used for [closed] oriented path integrals and [closed] boundary double/triple integrals.
int iint iiint iiiint oint varointclockwise ointctrclockwise oiint oiiint
Setting the background color [of a container span] to white (for testing purposes).

with description (these match the LaTeX definitions exactly, except for 2int, 3int and 4int)

  • int: simple integral 
    ∫,
  • iint: double integral 
    ∬,
  • 2int: double integral 
    ∫ ∫,
  • iiint: triple integral 
    ∭,
  • 3int: triple integral 
    ∫ ∫ ∫,
  • iiiint: 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: 
ϵ0
∂ Ω
∂ Ω
   E  ⋅   d  S =
Ω
Ω
ρdV
. 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) =
0
e  −  t  t  z  − 1dt
. 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.

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 
b
a
x 2dx =
b 3  −  a 3
3
after
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

     
b
a
x 2dx =
b 3a 3
3

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 
b
a
x 2dx =
b 3  −  a 3
3
after
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

     
b
a
x 2dx =
b 3a 3
3

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
C
C
  F (x)  ⋅   dx =  − 
C
C
  F (x)  ⋅   dx
after
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

     
C
C
F (x)  ⋅   dx = −
C
C
F (x)  ⋅   dx

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 =
2-ball
2-ball
dF
, 
G =
3-ball
3-ball
dG
, 
H =
4-ball
4-ball
dH
after
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 =
2-ball
2-ball
dF
, 
G =
3-ball
3-ball
dG
, 
H =
4-ball
4-ball
dH

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 
H =
n-ball
n-ball
dH
after
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 =
n-ball
n-ball
dH

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)




External links