User:Sbb/Sandbox/Maths

Does anyone know precisely what causes phantom scrollbars in &lt;math display=block>?
$$1.\qquad J^{-1} = \begin{pmatrix} \dfrac{x}{r}&\dfrac{y}{r}&\dfrac{z}{r}\\\\ \dfrac{xz}{r^2\sqrt{x^2+y^2}}&\dfrac{yz}{r^2\sqrt{x^2+y^2}}&\dfrac{-(x^2+y^2)}{r^2\sqrt{x^2+y^2}}\\\\ \dfrac{-y}{x^2+y^2}&\dfrac{x}{x^2+y^2}&0 \end{pmatrix}.$$

$$2.\qquad \begin{align} \frac{d}{dx}[\sin(x) + C] &= \frac{d}{dx} \sin(x) + \frac{d}{dx}C \\ &= \cos(x) + 0 \\ &= \cos(x) \end{align}$$

$$3.\qquad \begin{align} \langle -\Delta f, f \rangle_{L^2} &= -\int_{-\infty}^\infty f''(x)\overline{f(x)}\,dx \\[5pt] &=-\left[f'(x)\overline{f(x)}\right]_{-\infty}^\infty + \int_{-\infty}^\infty f'(x)\overline{f'(x)}\,dx \\[5pt] &=\int_{-\infty}^\infty \vert f'(x)\vert^2\,dx \geq 0. \end{align}$$

$$ 4.\qquad \begin{align}\ln (z) &= \frac{(z-1)^1}{1} - \frac{(z-1)^2}{2} + \frac{(z-1)^3}{3} - \frac{(z-1)^4}{4} + \cdots \\ &= \sum_{k=1}^\infty (-1)^{k+1}\frac{(z-1)^k}{k} \end{align} $$

$$5.\qquad \begin{align} t' &= \gamma \left( t - \frac{vx}{c^2} \right ), \\[2pt] x' &= \gamma \left( x - vt \right ). \end{align}$$

$$ 6.\qquad n!_{(\alpha)} = \begin{cases} n \cdot (n-\alpha)!_{(\alpha)} & \text{ if } n > \alpha \,; \\ n & \text{ if } 1 \leq n \leq \alpha \,; \text{and} \\ (n+\alpha)!_{(\alpha)} / (n+\alpha) & \text{ if } n \leq 0 \text{ and is not a negative multiple of } \alpha \,; \end{cases} $$

$$7.\qquad \begin{align} \int_{0}^{\infty} \frac{\sin t}{t} \, dt &= \lim_{s \to 0} \int_{0}^{\infty} e^{-st} \frac{\sin t}{t} \, dt = \lim_{s \to 0} \mathcal{L} \left [ \frac{\sin t}{t} \right] \\[6pt] &= \lim_{s \to 0} \int_{s}^{\infty} \frac{du}{u^2 + 1} = \lim_{s \to 0} \arctan u \Biggr|_{s}^{\infty} \\[6pt] &= \lim_{s \to 0} \left[ \frac{\pi}{2} - \arctan (s)\right] = \frac{\pi}{2}. \end{align} $$

$$8.\qquad \begin{align} \int\sqrt{a^2+x^2}\,dx &= \frac{a^2}{2}(\sec\theta \tan\theta + \ln|\sec\theta+\tan\theta|)+C \\[6pt] &= \frac{a^2}{2}\left(\sqrt{1+\frac{x^2}{a^2}}\cdot\frac{x}{a} + \ln\left|\sqrt{1+\frac{x^2}{a^2}}+\frac{x}{a}\right|\right)+C \\[6pt] &= \frac{1}{2}\left(x\sqrt{a^2+x^2} + a^2\ln\left|\frac{x+\sqrt{a^2+x^2}}{a}\right|\right)+C. \end{align}$$

In my browser, they not only cause an eyesore, but also hijack my mouse scrollwheel/touchpad scoll gesture so that it only scrolls the math container box rather than the whole page. It's incredibly frustrating.

A: Eq 5, colon-indented w/out blank lines
 * $$5.\qquad \begin{align}

t' &= \gamma \left( t - \frac{vx}{c^2} \right ), \\[2pt] x' &= \gamma \left( x - vt \right ). \end{align}$$ before or after.

B: Eq 5, colon-indented w/ blank line after, close before:
 * $$5.\qquad \begin{align}

t' &= \gamma \left( t - \frac{vx}{c^2} \right ), \\[2pt] x' &= \gamma \left( x - vt \right ). \end{align}$$

C: Eq 5, colon-indented w/ blank line before...


 * $$5.\qquad \begin{align}

t' &= \gamma \left( t - \frac{vx}{c^2} \right ), \\[2pt] x' &= \gamma \left( x - vt \right ). \end{align}$$ ... and close after.

D: Eq 5, disp=block w/out blank lines $$5.\qquad \begin{align} t' &= \gamma \left( t - \frac{vx}{c^2} \right ), \\[2pt] x' &= \gamma \left( x - vt \right ). \end{align}$$ before or after.

E: Eq 5, disp=block w/ blank line after, close before: $$5.\qquad \begin{align} t' &= \gamma \left( t - \frac{vx}{c^2} \right ), \\[2pt] x' &= \gamma \left( x - vt \right ). \end{align}$$

F: Eq 5, disp=block w/ blank line before...

$$5.\qquad \begin{align} t' &= \gamma \left( t - \frac{vx}{c^2} \right ), \\[2pt] x' &= \gamma \left( x - vt \right ). \end{align}$$ ... and close after.