Template:Intmath/testcases

From blackwiki
< Template:Intmath
Revision as of 23:03, 1 April 2016 by imported>Tentacles (→‎Quotient of integrals: tests)
Jump to navigation Jump to search
Script error: No such module "Purge".

Note: the {{intmath/sandbox}} code is tweaked and/or optimized for use inside the {{math}} template.

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

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
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
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 = Template:Sfrac
Ω
ρ dV
Gauss's law for magnetism
∂Ω
BdS = 0
Maxwell–Faraday equation
∂Σ
Ed = −
Σ
Template:SfracdS
Ampère's circuital law
∂Σ
Bd =
Σ
(μ0J + Template:SfracTemplate:Sfrac) ∙ dS

Current

Gauss's law
∂Ω
EdS = Template:Sfrac
Ω
ρ dV
Gauss's law for magnetism
∂Ω
BdS = 0
Maxwell–Faraday equation
∂Σ
Ed = −
Σ
Template:SfracdS
Ampère's circuital law
∂Σ
Bd =
Σ
(μ0J + Template:SfracTemplate:Sfrac) ∙ 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|Σ}} (''μ''<sub>0</sub>'''J''' + {{sfrac|1|''c''<sup>2</sup>}}{{sfrac|∂'''E'''|∂''t''}}) ∙ ''d'''''S'''

{{math}}

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 = Template:Sfrac
Ω
ρ dV
Gauss's law for magnetism
∂Ω
BdS = 0
Maxwell–Faraday equation
∂Σ
Ed = −
Σ
Template:SfracdS
Ampère's circuital law
∂Σ
Bd =
Σ
(μ0J + Template:SfracTemplate:Sfrac) ∙ dS

Current

Gauss's law
∂Ω
EdS = Template:Sfrac
Ω
ρ dV
Gauss's law for magnetism
∂Ω
BdS = 0
Maxwell–Faraday equation
∂Σ
Ed = −
Σ
Template:SfracdS
Ampère's circuital law
∂Σ
Bd =
Σ
(μ0J + Template:SfracTemplate:Sfrac) ∙ 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|Σ}} (''μ''<sub>0</sub>'''J''' + {{sfrac|1|''c''<sup>2</sup>}}{{sfrac|∂'''E'''|∂''t''}}) ∙ ''d'''''S'''}}

Display style standalone formulae

{{Bigmath}}

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

<math>\Gamma(z) = \int_0^\infty e^{-t} t^{z-1} \, dt.</math>

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:

Template:Oiint

Gauss's law for magnetism:

Template:Oiint

Maxwell–Faraday equation:

<math>\oint_{\partial \Sigma} \mathbf{E} \cdot d\boldsymbol{\ell} = - \iint_{\Sigma} \frac{\partial \mathbf{B}}{\partial t} \cdot d\mathbf{S} </math>

Ampère's circuital law:

<math>\oint_{\partial \Sigma} \mathbf{B} \cdot d\boldsymbol{\ell} = \iint_{\Sigma} \left( \mu_0 \mathbf{J} + \frac{1}{c^2} \frac{\partial \mathbf{E}}{\partial t} \right) \cdot d\mathbf{S} </math>

Sandbox

Gauss's law:


∂Ω
EdS = Template:Sfrac
Ω
ρ dV

Gauss's law for magnetism:


∂Ω
BdS = 0

Maxwell–Faraday equation:


∂Σ
Ed = −
Σ
Template:SfracdS

Ampère's circuital law:


∂Σ
Bd =
Σ
(μ0J + Template:SfracTemplate:Sfrac)dS

Current

Gauss's law:


∂Ω
EdS = Template:Sfrac
Ω
ρ dV

Gauss's law for magnetism:


∂Ω
BdS = 0

Maxwell–Faraday equation:


∂Σ
Ed = −
Σ
Template:SfracdS

Ampère's circuital law:


∂Σ
Bd =
Σ
(μ0J + Template:SfracTemplate:Sfrac)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|(}}''μ''<sub>0</sub>'''J''' + {{sfrac|1|''c''<sup>2</sup>}}{{sfrac|∂'''E'''|∂''t''}}{{big|)}} ∙ ''d'''''S'''}}

\iiiint and \idotsint

LaTeX

<math>H {{=}} \iiiint_{\rm 4\mbox{-}ball} dH</math> yields

<math>H = \iiiint_{\rm 4\mbox{-}ball} dH</math>

<math>H {{=}} \idotsint_{n{\rm \mbox{-}ball}} dH</math> yields

<math>H = \idotsint_{n{\rm \mbox{-}ball}} dH</math>

<math>H {{=}} \int \cdots \int_{n{\rm \mbox{-}ball}} dH</math> yields

<math>H = \int \cdots \int_{n{\rm \mbox{-}ball}} dH</math>

<math>H {{=}} \int \!\cdots\! \int_{n{\rm \mbox{-}ball}} dH</math> yields (the better spaced)

<math>H = \int \!\cdots\! \int_{n{\rm \mbox{-}ball}} dH</math>

HTML

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

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

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

HTML sandbox

:{{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 (should I create a tint option to get a tiny integral?)

Template:Sfrac = Template:Sfrac

HTML sandbox (testing extra code for tiny integral)

:{{bigmath|
<div style{{=}}"vertical-align: middle;"><!-- 
-->{{sfrac
   | <span style{{=}}"font-size: 0.75em; vertical-align: 0.3em;">{{intmath/sandbox|int|0|∞}}</span> ''x''<sup>2''n''</sup> ''e''<sup>−''ax''<sup>2</sup></sup> ''dx''<!-- 
-->| <span style{{=}}"font-size: 0.75em; vertical-align: 0.3em;">{{intmath/sandbox|int|0|∞}}</span> ''x''<sup>2(''n''−1)</sup>  ''e''<sup>−''ax''<sup>2</sup></sup> ''dx''<!-- 
-->}} {{=}} {{sfrac|2''n'' − 1|2''a''}}
</div> 
}}

yields (should I create a tint option to get a tiny integral?) ({{bigmath}} should have vertical-align: middle;)

Template:Sfrac = Template:Sfrac

HTML 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

Template:Sfrac = Template:Sfrac