# Help:Math Help part 7

(Redirected from Math Help part 7)

Please note that non standard characters will probably not render properly

The complete helpfile is over 50kB in size. Some browsers may have difficulty in rendering the page, because many have a notional upper limit of 32kB per page. Please choose from one of the following options to access the help file:

• Math Help part 1 - contains information on Syntax, Rendering and Pros and Cons of TeX and HTML for math functions
• Math Help part 2 - contains information on Functions, Symbols and Special characters
• Math Help part 3 - contains information on Subscripts, Superscripts and Integrals
• Math Help part 6 - contains information on Parenthesising big exprssions, Brackets and Bars

This wiki uses a subset of TeX markup, including some extensions from LaTeX and AMS-LaTeX, for mathematical formulae. It generates either PNG images or simple HTML markup, depending on user preferences and the complexity of the expression. In the future, as more browsers are smarter, it will be able to generate enhanced HTML or even MathML in many cases.

More precisely, MediaWiki filters the markup through Texvc, which in turn passes the commands to TeX for the actual rendering. Thus, only a limited part of the full TeX language is supported; see below for details.

## Spacing

Note that TeX handles most spacing automatically, but you may sometimes want manual control.

Feature Syntax How it looks rendered
double quad space a \qquad b $a \qquad b$
quad space a \quad b $a \quad b$
text space a\ b $a\ b$
text space without PNG conversion a \mbox{ } b $a \mbox{ } b$
large space a\;b $a\;b$
medium space a\>b [not supported]
small space a\,b $a\,b$
no space ab $ab\,$
small negative space a\!b $a\!b$

## Align with normal text flow

Due to the default css

img.tex { vertical-align: middle; }

an inline expression like $\int_{-N}^{N} e^x\, dx = 2 \sinh N$ should look good.

If you need to align it otherwise, use <font style="vertical-align:-100%;">$...$</font> and play with the vertical-align argument until you get it right; however, how it looks may depend on the browser and the browser settings.

Also note that if you rely on this workaround, if/when the rendering on the server gets fixed in future releases, as a result of this extra manual offset your formulae will suddenly be aligned incorrectly. So use it sparingly, if at all.

## Forced PNG rendering

To force the formula to render as PNG, add \, (small space) at the end of the formula (where it is not rendered). This will force PNG if the user is in "HTML if simple" mode, but not for "HTML if possible" mode (math rendering settings in preferences.

You can also use \,\! (small space and negative space, which cancel out) anywhere inside the math tags. This does force PNG even in "HTML if possible" mode, unlike \,.

This could be useful to keep the rendering of formulae in a proof consistent, for example, or to fix formulae that render incorrectly in HTML (at one time, a^{2+2} rendered with an extra underscore), or to demonstrate how something is rendered when it would normally show up as HTML (as in the examples above).

For instance:

Syntax How it looks rendered
a^{c+2} $a^{c+2}$
a^{c+2} \, $a^{c+2} \,$
a^{\,\!c+2} $a^{\,\!c+2}$
a^{b^{c+2}} $a^{b^{c+2}}$ (WRONG with option "HTML if possible or else PNG"!)
a^{b^{c+2}} \, $a^{b^{c+2}} \,$ (WRONG with option "HTML if possible or else PNG"!)
a^{b^{c+2}}\approx 5 $a^{b^{c+2}}\approx 5$ (due to "$\approx$" correctly displayed, no code "\,\!" needed)
a^{b^{\,\!c+2}} $a^{b^{\,\!c+2}}$
\int_{-N}^{N} e^x\, dx $\int_{-N}^{N} e^x\, dx$

This has been tested with most of the formulae on this page, and seems to work perfectly.

You might want to include a comment in the HTML so people don't "correct" the formula by removing it:

<!-- The \,\! is to keep the formula rendered as PNG instead of HTML. Please don't remove it.-->

## Examples

$ax^2 + bx + c = 0$

$ax^2 + bx + c = 0$


### Quadratic Polynomial (Force PNG Rendering)

$ax^2 + bx + c = 0\,\!$

$ax^2 + bx + c = 0\,\!$


$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$

$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$


### Tall Parentheses and Fractions

$2 = \left( \frac{\left(3-x\right) \times 2}{3-x} \right)$

$2 = \left( \frac{\left(3-x\right) \times 2}{3-x} \right)$

$S_{new} = S_{old} + \frac{ \left( 5-T \right) ^2} {2}$

$S_{new} = S_{old} + \frac{ \left( 5-T \right) ^2} {2}$


### Integrals

$\int_a^x \int_a^s f(y)\,dy\,ds = \int_a^x f(y)(x-y)\,dy$

$\int_a^x \int_a^s f(y)\,dy\,ds = \int_a^x f(y)(x-y)\,dy$


### Summation

$\sum_{m=1}^\infty\sum_{n=1}^\infty\frac{m^2\,n}{3^m\left(m\,3^n+n\,3^m\right)}$

$\sum_{m=1}^\infty\sum_{n=1}^\infty\frac{m^2\,n} {3^m\left(m\,3^n+n\,3^m\right)}$


### Differential Equation

$u + p(x)u' + q(x)u=f(x),\quad x>a$

$u'' + p(x)u' + q(x)u=f(x),\quad x>a$


### Complex numbers

$|\bar{z}| = |z|, |(\bar{z})^n| = |z|^n, \arg(z^n) = n \arg(z)$

$|\bar{z}| = |z|, |(\bar{z})^n| = |z|^n, \arg(z^n) = n \arg(z)$


### Limits

$\lim_{z\rightarrow z_0} f(z)=f(z_0)$

$\lim_{z\rightarrow z_0} f(z)=f(z_0)$


### Integral Equation

$\phi_n(\kappa) = \frac{1}{4\pi^2\kappa^2} \int_0^\infty \frac{\sin(\kappa R)}{\kappa R} \frac{\partial}{\partial R} \left[R^2\frac{\partial D_n(R)}{\partial R}\right]\,dR$

$\phi_n(\kappa) = \frac{1}{4\pi^2\kappa^2} \int_0^\infty \frac{\sin(\kappa R)}{\kappa R} \frac{\partial}{\partial R} \left[R^2\frac{\partial D_n(R)}{\partial R}\right]\,dR$


### Continuation and cases

$f(x) = \begin{cases}1 & -1 \le x < 0 \\ \frac{1}{2} & x = 0 \\ 1 - x^2 & 0 < x \le 1\end{cases}$

$f(x) = \begin{cases} 1 & -1 \le x < 0 \\ \frac{1}{2} & x = 0 \\ 1 - x^2 & 0 < x\le 1 \end{cases}$


### Prefixed subscript

${}_pF_q(a_1,\dots,a_p;c_1,\dots,c_q;z) = \sum_{n=0}^\infty \frac{(a_1)_n\cdot\cdot\cdot(a_p)_n}{(c_1)_n\cdot\cdot\cdot(c_q)_n}\frac{z^n}{n!}$

${}_pF_q(a_1,\dots,a_p;c_1,\dots,c_q;z) = \sum_{n=0}^\infty \frac{(a_1)_n\cdot\cdot\cdot(a_p)_n}{(c_1)_n\cdot\cdot\cdot(c_q)_n} \frac{z^n}{n!}$