⧼Purge⧽ Template:Integral/testcases
Test cases for the {{integral}} template.
The code
: {{repeat|2|{{repeat|5|yadda{{nbsp}}}}{{nl}}}}before {{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''}}}}|&}} 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
yadda yadda yadda yadda yadda
yadda yadda yadda yadda yadda
The code
: {{repeat|2|{{repeat|5|yadda{{nbsp}}}}{{nl}}}}before {{math|{{Gr|Gamma|tex}}(''z'') {{=}} {{int|0|infty|''e''{{^|{{op|-}}{{sp|1|tex}}''t''|tex}}{{sp|2|tex}}''t''{{^|{{sp|1|tex}}''z''{{op|-}}1|tex}}{{sp|3|tex}}{{d|''t''|tex}}|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|{{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''}}|HTM}}|&&}}
yields the display style HTML+CSS
The code
{{indent}}{{math|{{Gr|Gamma|tex}}(''z'') {{=}} {{int|0|infty|''e''{{^|{{op|-}}{{sp|1|tex}}''t''|tex}}{{sp|2|tex}}''t''{{^|{{sp|1|tex}}''z''{{op|-}}1|tex}}{{sp|3|tex}}{{d|''t''|tex}}|TEX}}|$$}}
yields the display style LaTeX
The code
{{indent}}{{math|
{{begin|align}}
{{oiint|{{d|''V''|part}}||{{vec|E|b}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|S|b}}}}|HTM}} {{&=}} <!--
-->{{frac|1|''{{Gr|epsilon}}''{{sub|0}}|HTM}} {{iiint|''V''||''{{Gr|rho}}''{{sp|3}}{{d|''V''}}|HTM}} {{\\}}
{{oiint|{{d|''V''|part}}||{{vec|B|b}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|S|b}}}}|HTM}} {{&=}} 0 {{\\}}
{{oint|{{d|''S''|part}}||{{vec|E|b}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|x|b}}}}|HTM}} {{&=}} <!--
-->{{op|−}}{{iint|''S''||{{partial|{{vec|B|b}}|''t''|HTM}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|S|b}}}}|HTM}} {{\\}}
{{oint|{{sym|partial}}''S''||{{vec|B|b}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|x|b}}}}|HTM}} {{&=}} <!--
-->{{iint|''S''||{{(|''{{Gr|mu}}''{{sub|0}}{{sp|1}}{{vec|J|b}} + {{frac|1|''c''{{^|2}}|HTM}} <!--
-->{{partial|{{vec|E|b}}|''t''|HTM}}|)|Big}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|S|b}}}}|HTM}} {{\\}}
{{end|align}}
|tex =
\begin{align}
\mathit{\oiint}_{\partial V} \ \mathbf{E} \sdot d\mathbf{S} &= <!--
-->\frac{1}{\epsilon_0} \iiint_V \rho \, dV \\
\mathit{\oiint}_{\partial V} \ \mathbf{B} \sdot d\mathbf{S} &= 0 \\
\oint_{\!\!\!\!\! \partial S} \mathbf{E} \sdot d\mathbf{x} &= <!--
-->- \iint_S \frac{ \partial \mathbf{B} }{ \partial t } \sdot d\mathbf{S} \\
\oint_{\!\!\!\!\! \partial S} \mathbf{B} \sdot d\mathbf{x} &= <!--
-->\iint_S \left( \mu_0 \, \mathbf{J} + \frac{1}{c^2} <!--
-->\frac{ \partial \mathbf{E} }{ \partial t } \right) \sdot d\mathbf{S} \\
\end{align}
|&&}}
yields the display style HTML+CSS
Error: String exceeds 10,000 character limit. |
and with the $$
option, yields the display style LaTeX
The code (now with one equation per {{math}} template call, with manual horizontal alignment of equal signs)
{{indent}}{{math|
{{oiint|{{d|''V''|part}}||{{vec|E|b}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|S|b}}}}|HTM}} {{=}} <!--
-->{{frac|1|''{{Gr|epsilon}}''{{sub|0}}|HTM}} {{iiint|''V''||''{{Gr|rho}}''{{sp|3}}{{d|''V''}}|HTM}}
|tex = \mathit{\oiint}_{\partial V} \ \mathbf{E} \sdot d\mathbf{S} = <!--
-->\frac{1}{\epsilon_0} \iiint_V \rho \, dV
|&&}}{{clear}}
{{indent}}{{math|
{{oiint|{{d|''V''|part}}||{{vec|B|b}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|S|b}}}}|HTM}} {{=}} 0
|tex = \mathit{\oiint}_{\partial V} \ \mathbf{B} \sdot d\mathbf{S} = 0
|&&}}{{clear}}
{{indent}}{{sp|9}}{{sp|4}}{{math|
{{oint|{{d|''S''|part}}||{{vec|E|b}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|x|b}}}}|HTM}} {{=}} <!--
-->{{op|−}}{{iint|''S''||{{partial|{{vec|B|b}}|''t''|HTM}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|S|b}}}}|HTM}}
|tex = {{sp|6|tex}} \oint_{\!\!\!\!\! \partial S} \mathbf{E} \sdot d\mathbf{x} = <!--
-->- \iint_S \frac{ \partial \mathbf{B} }{ \partial t } \sdot d\mathbf{S}
|&&}}{{clear}}
{{indent}}{{sp|9}}{{sp|4}}{{math|
{{oint|{{sym|partial}}''S''||{{vec|B|b}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|x|b}}}}|HTM}} {{=}} <!--
-->{{iint|''S''||{{(|''{{Gr|mu}}''{{sub|0}}{{sp|1}}{{vec|J|b}} + {{frac|1|''c''{{^|2}}|HTM}} <!--
-->{{partial|{{vec|E|b}}|''t''|HTM}}|)|Big}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|S|b}}}}|HTM}}
|tex = {{sp|6|tex}} \oint_{\!\!\!\!\! \partial S} \mathbf{B} \sdot d\mathbf{x} = <!--
-->\iint_S \left( \mu_0 \, \mathbf{J} + \frac{1}{c^2} <!--
-->\frac{ \partial \mathbf{E} }{ \partial t } \right) \sdot d\mathbf{S}
|&&}}
yields the display style HTML+CSS
and with the $$
option, yields the display style LaTeX
The code (using the {{integral/nicer}} template) (now with one equation per {{math}} template call, with manual horizontal alignment of equal signs)
{{indent}}{{math|
{{integral/nicer|oiint|{{d|''V''|part}}||{{vec|E|b}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|S|b}}}}|HTM}} {{=}} <!--
-->{{frac|1|''{{Gr|epsilon}}''{{sub|0}}|HTM}} {{integral/nicer|iiint|''V''||''{{Gr|rho}}''{{sp|3}}{{d|''V''}}|HTM}}
|tex = \mathit{\oiint}_{\partial V} \ \mathbf{E} \sdot d\mathbf{S} = <!--
-->\frac{1}{\epsilon_0} \iiint_V \rho \, dV
|&&}}{{clear}}
{{indent}}{{math|
{{integral/nicer|oiint|{{d|''V''|part}}||{{vec|B|b}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|S|b}}}}|HTM}} {{=}} 0
|tex = \mathit{\oiint}_{\partial V} \ \mathbf{B} \sdot d\mathbf{S} = 0
|&&}}{{clear}}
{{indent}}{{sp|9}}{{sp|5}}{{math|
{{integral/nicer|oint|{{d|''S''|part}}||{{vec|E|b}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|x|b}}}}|HTM}} {{=}} <!--
-->{{op|−}}{{integral/nicer|iint|''S''||{{partial|{{vec|B|b}}|''t''|HTM}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|S|b}}}}|HTM}}
|tex = {{sp|6|tex}} \oint_{\!\!\!\!\! \partial S} \mathbf{E} \sdot d\mathbf{x} = <!--
-->- \iint_S \frac{ \partial \mathbf{B} }{ \partial t } \sdot d\mathbf{S}
|&&}}{{clear}}
{{indent}}{{sp|9}}{{sp|5}}{{math|
{{integral/nicer|oint|{{sym|partial}}''S''||{{vec|B|b}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|x|b}}}}|HTM}} {{=}} <!--
-->{{integral/nicer|iint|''S''||{{(|''{{Gr|mu}}''{{sub|0}}{{sp|1}}{{vec|J|b}} + {{frac|1|''c''{{^|2}}|HTM}} <!--
-->{{partial|{{vec|E|b}}|''t''|HTM}}|)|Big}}{{sp|1}}{{op|sdot}}{{sp|1}}{{d|{{vec|S|b}}}}|HTM}}
|tex = {{sp|6|tex}} \oint_{\!\!\!\!\! \partial S} \mathbf{B} \sdot d\mathbf{x} = <!--
-->\iint_S \left( \mu_0 \, \mathbf{J} + \frac{1}{c^2} <!--
-->\frac{ \partial \mathbf{E} }{ \partial t } \right) \sdot d\mathbf{S}
|&&}}
yields the display style HTML+CSS ({{integral/nicer|oiint}} needs tweaking: lower limit must be a little higher)
Quotient of integrals
The code
: {{math|<!--
-->{{frac
| {{int|0|infty|''x''{{^|2{{sp|1}}''n''}}{{sp|1}}''e''{{^|{{op|-}}''a''{{sp|1}}''x''{{^|2}}}}{{sp|3}}{{d|''x''}}}}<!--
-->| {{int|0|infty|''x''{{^|2{{sp|1}}(''n''{{sp|1}}{{op|-}}1)}}{{sp|1}}''e''{{^|{{op|-}}''a''{{sp|1}}''x''{{^|2}}}}{{sp|3}}{{d|''x''}}}}<!--
-->|HTM}} {{=}} {{frac|2{{sp|1}}''n'' {{op|-}} 1|2{{sp|1}}''a''|HTM}}
|tex = \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}
|&&}}
yields the display style HTML+CSS
-
x 2 n e − a x 2 d x | x 2 (n − 1) e − a x 2 d x | = |
and with the $$
option, yields the display style LaTeX
-
The code
: {{math|<!--
-->{{frac
| {{oiint|{{sym|partial}}{{sp|1}}{{Gr|Omega}}| |{{vec|E|b}}{{op|sdot}}{{d|{{vec|S|b}}}}}}<!--
-->| {{iiint|{{Gr|Omega}}| |''{{Gr|rho}}''{{sp|3}}{{d|''V''}}}}<!--
-->|HTM}} {{=}} {{frac|1|''{{Gr|epsilon}}''{{sub|0}}|HTM}}
|tex = \frac{ \oiint_{\partial \Omega} {{vec|E|b|tex}} \sdot d{{vec|S|b|tex}} }{ \iiint_{\Omega} \rho \, dV } = \frac{1}{\epsilon_0}
|&&}}
yields the display style HTML+CSS
-
and with the $$
option, yields the display style LaTeX
-