Jump to content

Template:Intmath/testcases

From Wikipedia, the free encyclopedia
Purge this page's server cache.

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)

No {{math}}

[edit]

Compare vertical alignment and obliqueness of [rotated] int with other [italic] integral symbols:




{{intmath/sandbox|int}}&#x200A;<!-- 1 hair space -->{{intmath/sandbox|oiint}}&#x200A;<!-- 1 hair space -->{{intmath/sandbox|int}}

Gamma function (non-italic int as default)

Sandbox: Γ(z) =
0
ettz − 1dt    (With the {{math}} template, the limits have a much better alignment with the integral symbol.)
Current: Γ(z) =
0
ettz − 1dt
Γ(''z'') = {{intmath||0|∞}} ''e''<sup>−''t''</sup>&#x200A;<!-- hair space -->''t''&#x200A;<!-- hair space --><sup>''z''&#x200A;<!-- hair space -->−&#x200A;<!-- hair space -->1</sup>''dt''

Gamma function

Sandbox: Γ(z) =
0
ettz − 1dt    (With the {{math}} template, the limits have a much better alignment with the integral symbol.)
Current: Γ(z) =
0
ettz − 1dt
Γ(''z'') = {{intmath|int|0|∞}} ''e''<sup>−''t''</sup>&#x200A;<!-- hair space -->''t''&#x200A;<!-- hair space --><sup>''z''&#x200A;<!-- hair space -->−&#x200A;<!-- hair space -->1</sup>''dt''

Line integral

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'''

Maxwell's equations

Sandbox:

Gauss's law
∂Ω
EdS = 1/ε0
Ω
ρ dV
Gauss's law for magnetism
∂Ω
BdS = 0
Maxwell–Faraday equation
∂Σ
Ed = −
Σ
B/tdS
Ampère's circuital law
∂Σ
Bd =
Σ
(μ0J + 1/c2E/t)dS

Current:

Gauss's law
∂Ω
EdS = 1/ε0
Ω
ρ dV
Gauss's law for magnetism
∂Ω
BdS = 0
Maxwell–Faraday equation
∂Σ
Ed = −
Σ
B/tdS
Ampère's circuital law
∂Σ
Bd =
Σ
(μ0J + 1/c2E/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'''

{{math}}

[edit]

Compare vertical alignment and obliqueness of [rotated] int with other [italic] integral symbols:




{{math| {{intmath/sandbox|int}}&#x200A;<!-- 1 hair space -->{{intmath/sandbox|oiint}}&#x200A;<!-- 1 hair space -->{{intmath/sandbox|int}} }}

Gamma function (non-italic int as default)

Sandbox: Γ(z) =
0
ettz − 1dt
Current: Γ(z) =
0
ettz − 1dt
{{math|Γ(''z'') {{=}} {{intmath||0|∞}} ''e''<sup>−''t''</sup>&#x200A;<!-- hair space -->''t''&#x200A;<!-- hair space --><sup>''z''&#x200A;<!-- hair space -->−&#x200A;<!-- hair space -->1</sup>''dt''}}

Gamma function

Sandbox: Γ(z) =
0
ettz − 1dt
Current: Γ(z) =
0
ettz − 1dt
{{math|Γ(''z'') {{=}} {{intmath|int|0|∞}} ''e''<sup>−''t''</sup>&#x200A;<!-- hair space -->''t''&#x200A;<!-- hair space --><sup>''z''&#x200A;<!-- hair space -->−&#x200A;<!-- hair space -->1</sup>''dt''}}

Line integral

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'''}}

Maxwell's equations

Sandbox:

Gauss's law
∂Ω
EdS = 1/ε0
Ω
ρ dV
Gauss's law for magnetism
∂Ω
BdS = 0
Maxwell–Faraday equation
∂Σ
Ed = −
Σ
B/tdS
Ampère's circuital law
∂Σ
Bd =
Σ
(μ0J + 1/c2E/t)dS

Current:

Gauss's law
∂Ω
EdS = 1/ε0
Ω
ρ dV
Gauss's law for magnetism
∂Ω
BdS = 0
Maxwell–Faraday equation
∂Σ
Ed = −
Σ
B/tdS
Ampère's circuital law
∂Σ
Bd =
Σ
(μ0J + 1/c2E/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]

{{math}}

[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
∂Ω
EdS=
Ω
ρ 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
ettz − 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
∂Ω
EdS=
Ω
ρ 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
ettz − 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}}&#x200A;<!-- 1 hair space -->{{intmath/sandbox|oiint}}&#x200A;<!-- 1 hair space -->{{intmath/sandbox|int}} }}

Gamma function

LaTeX:

The Gamma function is defined as

Sandbox:

The Gamma function is defined as

Γ(z) =
0
ettz − 1dt.

Current:

The Gamma function is defined as

Γ(z) =
0
ettz − 1dt.
{{Bigmath|Γ(''z'') {{=}} {{intmath|int|0|∞}} ''e''<sup>−''t''</sup>&#x200A;<!-- hair space -->''t''&#x200A;<!-- hair space --><sup>''z''&#x200A;<!-- hair space -->−&#x200A;<!-- hair space -->1</sup>''dt''.}}

Maxwell's equations

LaTeX:

Gauss's law:

\oiint

Gauss's law for magnetism:

\oiint

Maxwell–Faraday equation:

Ampère's circuital law:

Sandbox:

Gauss's law:


∂Ω
EdS = 1/ε0
Ω
ρ dV

Gauss's law for magnetism:


∂Ω
BdS = 0

Maxwell–Faraday equation:


∂Σ
Ed = −
Σ
B/tdS

Ampère's circuital law:


∂Σ
Bd =
Σ
(μ0J + 1/c2E/t)dS

Current:

Gauss's law:


∂Ω
EdS = 1/ε0
Ω
ρ dV

Gauss's law for magnetism:


∂Ω
BdS = 0

Maxwell–Faraday equation:


∂Σ
Ed = −
Σ
B/tdS

Ampère's circuital law:


∂Σ
Bd =
Σ
(μ0J + 1/c2E/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 eax2 dx
/
0
x2(n−1) eax2 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 eax2 dx
/
0
x2(n−1) eax2 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 eax2 dx
/
0
x2(n−1) eax2 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;)


∂Ω
EdS
/
Ω
ρ 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;)


∂Ω
EdS
/
Ω
ρ dV
= 1/ε0