Template:Intmath/testcases
This is the template test cases page for the sandbox of Template:Intmath. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
Note: the {{intmath/sandbox}}
code is tweaked and/or optimized for use inside the {{math}}
and {{bigmath}}
templates.
In IE, except for int
, all the integrals seem to render in the beautiful font 'Lucida Sans Unicode', but in Firefox we get this ugly font (it is passable for text style, but would be really ugly in display style)! In which [ugly] font do the integral symbols, other than int
, render? Also, in which font does int
render? — TentaclesTalk or ✉ mailto:
Tentacles 17:50, 22 March 2016 (UTC)
Compare vertical alignment and obliqueness of [rotated] int with other [italic] integral symbols:
- ∫
∯
∫
{{intmath/sandbox|int}} <!-- 1 hair space -->{{intmath/sandbox|oiint}} <!-- 1 hair space -->{{intmath/sandbox|int}}
Gamma function (non-italic int as default)
- Sandbox: Γ(z) = ∫∞
0 e−t t z − 1dt (With the {{math}} template, the limits have a much better alignment with the integral symbol.) - Current: Γ(z) = ∫∞
0 e−t t z − 1dt
Γ(''z'') = {{intmath||0|∞}} ''e''<sup>−''t''</sup> <!-- hair space -->''t'' <!-- hair space --><sup>''z'' <!-- hair space -->− <!-- hair space -->1</sup>''dt''
- Sandbox: Γ(z) = ∫∞
0 e−t t z − 1dt (With the {{math}} template, the limits have a much better alignment with the integral symbol.) - Current: Γ(z) = ∫∞
0 e−t t z − 1dt
Γ(''z'') = {{intmath|int|0|∞}} ''e''<sup>−''t''</sup> <!-- hair space -->''t'' <!-- hair space --><sup>''z'' <!-- hair space -->− <!-- hair space -->1</sup>''dt''
- Sandbox: ∲
C F(x) ∙ dx = −∳
C F(x) ∙ dx - Current: ∲
C F(x) ∙ dx = −∳
C F(x) ∙ dx
{{intmath|varointclockwise|''C''}} ''F''('''x''') ∙ ''d'''''x''' = −{{intmath|ointctrclockwise|''C''}} ''F''('''x''') ∙ ''d'''''x'''
Sandbox:
- Gauss's law ∯
∂Ω E ∙ dS = 1/ε0∭
Ω ρ dV - Gauss's law for magnetism ∯
∂Ω B ∙ dS = 0 - Maxwell–Faraday equation ∮
∂Σ E ∙ dℓ = −∬
Σ ∂B/∂t ∙ dS - Ampère's circuital law ∮
∂Σ B ∙ dℓ = ∬
Σ ( μ0J + 1/c2∂E/∂t) ∙ dS
Current:
- Gauss's law ∯
∂Ω E ∙ dS = 1/ε0∭
Ω ρ dV - Gauss's law for magnetism ∯
∂Ω B ∙ dS = 0 - Maxwell–Faraday equation ∮
∂Σ E ∙ dℓ = −∬
Σ ∂B/∂t ∙ dS - Ampère's circuital law ∮
∂Σ B ∙ dℓ = ∬
Σ ( μ0J + 1/c2∂E/∂t) ∙ dS
{{intmath|oiint|∂Ω}} '''E''' ∙ ''d'''''S''' = {{sfrac|1|''ε''<sub>0</sub>}}{{intmath|iiint|Ω}} ''ρ'' ''dV''
{{intmath|oiint|∂Ω}} '''B''' ∙ ''d'''''S''' = 0
{{intmath|oint|∂Σ}} '''E''' ∙ ''d''<nowiki />'''''ℓ<!-- ℓ -->''''' = −{{intmath|iint|Σ}} {{sfrac|∂'''B'''|∂''t''}} ∙ ''d'''''S'''
{{intmath|oint|∂Σ}} '''B''' ∙ ''d''<nowiki />'''''ℓ<!-- ℓ -->''''' = {{intmath|iint|Σ}} {{big|(}} <!-- hair space -->''μ''<sub>0</sub>'''J''' + {{sfrac|1|''c''<sup>2</sup>}}{{sfrac|∂'''E'''|∂''t''}}{{big|)}} ∙ ''d'''''S'''
Compare vertical alignment and obliqueness of [rotated] int with other [italic] integral symbols:
- ∫
∯
∫
{{math| {{intmath/sandbox|int}} <!-- 1 hair space -->{{intmath/sandbox|oiint}} <!-- 1 hair space -->{{intmath/sandbox|int}} }}
Gamma function (non-italic int as default)
- Sandbox: Γ(z) = ∫∞
0 e−t t z − 1dt - Current: Γ(z) = ∫∞
0 e−t t z − 1dt
{{math|Γ(''z'') {{=}} {{intmath||0|∞}} ''e''<sup>−''t''</sup> <!-- hair space -->''t'' <!-- hair space --><sup>''z'' <!-- hair space -->− <!-- hair space -->1</sup>''dt''}}
- Sandbox: Γ(z) = ∫∞
0 e−t t z − 1dt - Current: Γ(z) = ∫∞
0 e−t t z − 1dt
{{math|Γ(''z'') {{=}} {{intmath|int|0|∞}} ''e''<sup>−''t''</sup> <!-- hair space -->''t'' <!-- hair space --><sup>''z'' <!-- hair space -->− <!-- hair space -->1</sup>''dt''}}
- Sandbox: ∲
C F(x) ∙ dx = −∳
C F(x) ∙ dx - Current: ∲
C F(x) ∙ dx = −∳
C F(x) ∙ dx
{{math|{{intmath|varointclockwise|''C''}} ''F''('''x''') ∙ ''d'''''x''' {{=}} −{{intmath|ointctrclockwise|''C''}} ''F''('''x''') ∙ ''d'''''x'''}}
Sandbox:
- Gauss's law ∯
∂Ω E ∙ dS = 1/ε0∭
Ω ρ dV - Gauss's law for magnetism ∯
∂Ω B ∙ dS = 0 - Maxwell–Faraday equation ∮
∂Σ E ∙ dℓ = −∬
Σ ∂B/∂t ∙ dS - Ampère's circuital law ∮
∂Σ B ∙ dℓ = ∬
Σ ( μ0J + 1/c2∂E/∂t) ∙ dS
Current:
- Gauss's law ∯
∂Ω E ∙ dS = 1/ε0∭
Ω ρ dV - Gauss's law for magnetism ∯
∂Ω B ∙ dS = 0 - Maxwell–Faraday equation ∮
∂Σ E ∙ dℓ = −∬
Σ ∂B/∂t ∙ dS - Ampère's circuital law ∮
∂Σ B ∙ dℓ = ∬
Σ ( μ0J + 1/c2∂E/∂t) ∙ dS
{{math|{{intmath|oiint|∂Ω}} '''E''' ∙ ''d'''''S''' {{=}} {{sfrac|1|''ε''<sub>0</sub>}}{{intmath|iiint|Ω}} ''ρ'' ''dV''}}
{{math|{{intmath|oiint|∂Ω}} '''B''' ∙ ''d'''''S''' {{=}} 0}}
{{math|{{intmath|oint|∂Σ}} '''E''' ∙ ''d''<nowiki />'''''ℓ<!-- ℓ -->''''' {{=}} −{{intmath|iint|Σ}} {{sfrac|∂'''B'''|∂''t''}} ∙ ''d'''''S'''}}
{{math|{{intmath|oint|∂Σ}} '''B''' ∙ ''d''<nowiki />'''''ℓ<!-- ℓ -->''''' {{=}} {{intmath|iint|Σ}} {{big|(}} <!-- 1 hair space -->''μ''<sub>0</sub>'''J''' + {{sfrac|1|''c''<sup>2</sup>}}{{sfrac|∂'''E'''|∂''t''}}{{big|)}} ∙ ''d'''''S'''}}
Text style inline formulae
[edit]Sandbox: 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 ∙ dS = ∭
Ω ρ 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.
Current: Messes up the line spacing.
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 ∙ dS = ∭
Ω ρ 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.
Display style standalone formulae
[edit]Compare vertical alignment and obliqueness of [rotated] int with other [italic] integral symbols:
- ∫
∯
∫
{{Bigmath| {{intmath/sandbox|int}} <!-- 1 hair space -->{{intmath/sandbox|oiint}} <!-- 1 hair space -->{{intmath/sandbox|int}} }}
LaTeX:
The Gamma function is defined as
Sandbox:
The Gamma function is defined as
- Γ(z) = ∫∞
0 e−t t z − 1dt.
Current:
The Gamma function is defined as
- Γ(z) = ∫∞
0 e−t t z − 1dt.
{{Bigmath|Γ(''z'') {{=}} {{intmath|int|0|∞}} ''e''<sup>−''t''</sup> <!-- hair space -->''t'' <!-- hair space --><sup>''z'' <!-- hair space -->− <!-- hair space -->1</sup>''dt''.}}
LaTeX:
Gauss's law:
Gauss's law for magnetism:
Maxwell–Faraday equation:
Ampère's circuital law:
Sandbox:
Gauss's law:
- ∯
∂Ω E ∙ dS = 1/ε0∭
Ω ρ dV
Gauss's law for magnetism:
- ∯
∂Ω B ∙ dS = 0
Maxwell–Faraday equation:
- ∮
∂Σ E ∙ dℓ = −∬
Σ ∂B/∂t ∙ dS
Ampère's circuital law:
- ∮
∂Σ B ∙ dℓ = ∬
Σ ( μ0J + 1/c2∂E/∂t) ∙ dS
Current:
Gauss's law:
- ∯
∂Ω E ∙ dS = 1/ε0∭
Ω ρ dV
Gauss's law for magnetism:
- ∯
∂Ω B ∙ dS = 0
Maxwell–Faraday equation:
- ∮
∂Σ E ∙ dℓ = −∬
Σ ∂B/∂t ∙ dS
Ampère's circuital law:
- ∮
∂Σ B ∙ dℓ = ∬
Σ ( μ0J + 1/c2∂E/∂t) ∙ dS
Gauss's law: :{{Bigmath|{{intmath|oiint|∂Ω}} '''E''' ∙ ''d'''''S''' {{=}} {{sfrac|1|''ε''<sub>0</sub>}}{{intmath|iiint|Ω}} ''ρ'' ''dV''}}
Gauss's law for magnetism: :{{Bigmath|{{intmath|oiint|∂Ω}} '''B''' ∙ ''d'''''S''' {{=}} 0}}
Maxwell–Faraday equation: :{{Bigmath|{{intmath|oint|∂Σ}} '''E''' ∙ ''d''<nowiki />'''''ℓ<!-- ℓ -->''''' {{=}} −{{intmath|iint|Σ}} {{sfrac|∂'''B'''|∂''t''}} ∙ ''d'''''S'''}}
Ampère's circuital law: :{{Bigmath|{{intmath|oint|∂Σ}} '''B''' ∙ ''d''<nowiki />'''''ℓ<!-- ℓ -->''''' {{=}} {{intmath|iint|Σ}} {{big|(}} <!-- 1 hair space -->''μ''<sub>0</sub>'''J''' + {{sfrac|1|''c''<sup>2</sup>}}{{sfrac|∂'''E'''|∂''t''}}{{big|)}} ∙ ''d'''''S'''}}
\iiiint and \idotsint
[edit]LaTeX:
<math>H {{=}} \iiiint_{\rm 4\mbox{-}ball} dH</math>
yields
<math>H {{=}} \idotsint_{n{\rm \mbox{-}ball}} dH</math>
yields
- Failed to parse (unknown function "\idotsint"): {\displaystyle H {{=}} \idotsint_{n{\rm \mbox{-}ball}} dH}
<math>H {{=}} \int \cdots \int_{n{\rm \mbox{-}ball}} dH</math>
yields
<math>H {{=}} \int \!\cdots\! \int_{n{\rm \mbox{-}ball}} dH</math>
yields (the better spaced)
Sandbox:
{{math| H {{=}} {{intmath/sandbox|iiiint|4-ball}} ''dH'' }}
yields the HTML text style H = ∫
4-ball dH
{{math| H {{=}} {{intmath/sandbox|idotsint|''n''-ball}} ''dH'' }}
yields the HTML text style H = ∫
n-ball dH
{{bigmath| H {{=}} {{intmath/sandbox|iiiint|4-ball}} ''dH'' }}
yields the HTML display style
- H = ∫
4-ball dH
{{bigmath| H {{=}} {{intmath/sandbox|idotsint|''n''-ball}} ''dH'' }}
yields the HTML display style
- H = ∫
n-ball dH
Quotient of integrals
[edit]LaTeX:
<math>\frac{ \int_0^\infty x^{2n} e^{-a x^2}\,dx }{ \int_0^\infty x^{2(n-1)} e^{-a x^2}\,dx } = \frac{2n-1}{2a}</math>
yields
Sandbox (without the tiny
[fourth parameter] option):
:{{bigmath|<!-- -->{{sfrac | {{intmath/sandbox|int|0|∞}} ''x''<sup>2''n''</sup> ''e''<sup>−''ax''<sup>2</sup></sup> ''dx''<!-- -->| {{intmath/sandbox|int|0|∞}} ''x''<sup>2(''n''−1)</sup> ''e''<sup>−''ax''<sup>2</sup></sup> ''dx''<!-- -->}} {{=}} {{sfrac|2''n'' − 1|2''a''}} }}
yields ({{bigmath}} should have vertical-align: middle;
)
- ∫∞
0 x2n e−ax2 dx/ ∫∞
0 x2(n−1) e−ax2 dx = 2n − 1/2a
Sandbox (with the tiny
[fourth parameter] option):
:{{bigmath|<!-- -->{{sfrac | {{intmath/sandbox|int|0|∞|tiny}} ''x''<sup>2''n''</sup> ''e''<sup>−''ax''<sup>2</sup></sup> ''dx''<!-- -->| {{intmath/sandbox|int|0|∞|tiny}} ''x''<sup>2(''n''−1)</sup> ''e''<sup>−''ax''<sup>2</sup></sup> ''dx''<!-- -->}} {{=}} {{sfrac|2''n'' − 1|2''a''}} }}
yields ({{bigmath}} should have vertical-align: middle;
)
- ∫∞
0 x2n e−ax2 dx/ ∫∞
0 x2(n−1) e−ax2 dx = 2n − 1/2a
Current:
:{{bigmath|<!-- -->{{sfrac | {{intmath|int|0|∞}} ''x''<sup>2''n''</sup> ''e''<sup>−''ax''<sup>2</sup></sup> ''dx''<!-- -->| {{intmath|int|0|∞}} ''x''<sup>2(''n''−1)</sup> ''e''<sup>−''ax''<sup>2</sup></sup> ''dx''<!-- -->}} {{=}} {{sfrac|2''n'' − 1|2''a''}} }}
yields
- ∫∞
0 x2n e−ax2 dx/ ∫∞
0 x2(n−1) e−ax2 dx = 2n − 1/2a
Sandbox (without the tiny
[fourth parameter] option):
:{{bigmath|<!-- -->{{sfrac | {{intmath/sandbox|oiint|∂Ω}} '''E''' ∙ ''d'''''S'''<!-- -->| {{intmath/sandbox|iiint|Ω}} ''ρ'' ''dV''<!-- -->}} {{=}} {{sfrac|1|''ε''<sub>0</sub>}} }}
yields ({{bigmath}} should have vertical-align: middle;
)
- ∯
∂Ω E ∙ dS/ ∭
Ω ρ dV = 1/ε0
Sandbox (with the tiny
[fourth parameter] option):
:{{bigmath|<!-- -->{{sfrac | {{intmath/sandbox|oiint|∂Ω||tiny}} '''E''' ∙ ''d'''''S'''<!-- -->| {{intmath/sandbox|iiint|Ω||tiny}} ''ρ'' ''dV''<!-- -->}} {{=}} {{sfrac|1|''ε''<sub>0</sub>}} }}
yields ({{bigmath}} should have vertical-align: middle;
)
- ∯
∂Ω E ∙ dS/ ∭
Ω ρ dV = 1/ε0