KaTeX and MathJax Comparison Demo, currently processed as KaTex
1 ( ϕ 5 − ϕ ) e 2 5 π ≡ 1 + e − 2 π 1 + e − 4 π 1 + e − 6 π 1 + e − 8 π 1 + ⋯
\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} \equiv 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }
( ϕ 5 − ϕ ) e 5 2 π 1 ≡ 1 + 1 + 1 + 1 + 1 + ⋯ e − 8 π e − 6 π e − 4 π e − 2 π
( ∑ k = 1 n a k b k ) 2 ≤ ( ∑ k = 1 n a k 2 ) ( ∑ k = 1 n b k 2 )
\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)
( k = 1 ∑ n a k b k ) 2 ≤ ( k = 1 ∑ n a k 2 ) ( k = 1 ∑ n b k 2 )
I broke up the next two examples into separate lines so it behaves better on a mobile phone. That’s why they include \displaystyle.
∑ i = 1 k + 1 i
\displaystyle\sum_{i=1}^{k+1}i
i = 1 ∑ k + 1 i
= ( ∑ i = 1 k i ) + ( k + 1 )
\displaystyle= \left(\sum_{i=1}^{k}i\right) +(k+1)
= ( i = 1 ∑ k i ) + ( k + 1 )
= k ( k + 1 ) 2 + k + 1
\displaystyle= \frac{k(k+1)}{2}+k+1
= 2 k ( k + 1 ) + k + 1
= k ( k + 1 ) + 2 ( k + 1 ) 2
\displaystyle= \frac{k(k+1)+2(k+1)}{2}
= 2 k ( k + 1 ) + 2 ( k + 1 )
= ( k + 1 ) ( k + 2 ) 2
\displaystyle= \frac{(k+1)(k+2)}{2}
= 2 ( k + 1 ) ( k + 2 )
= ( k + 1 ) ( ( k + 1 ) + 1 ) 2
\displaystyle= \frac{(k+1)((k+1)+1)}{2}
= 2 ( k + 1 ) ( ( k + 1 ) + 1 )
1 + q 2 ( 1 − q ) + q 6 ( 1 − q ) ( 1 − q 2 ) + ⋯ = ∏ j = 0 ∞ 1 ( 1 − q 5 j + 2 ) ( 1 − q 5 j + 3 ) , for ∣ q ∣ < 1.
\displaystyle 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \displaystyle \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \displaystyle\text{ for }\lvert q\rvert < 1.
1 + ( 1 − q ) q 2 + ( 1 − q ) ( 1 − q 2 ) q 6 + ⋯ = j = 0 ∏ ∞ ( 1 − q 5 j + 2 ) ( 1 − q 5 j + 3 ) 1 , for ∣ q ∣ < 1 .
And here is some in-line math: k n + 1 = n 2 + k n 2 − k n − 1 k_{n+1} = n^2 + k_n^2 - k_{n-1} k n + 1 = n 2 + k n 2 − k n − 1 , followed by some more text.
Γ Δ Θ Λ Ξ Π Σ Υ Φ Ψ Ω α β γ δ ϵ ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ ϕ χ ψ ω ε ϑ ϖ ϱ ς φ
\Gamma\ \Delta\ \Theta\ \Lambda\ \Xi\ \Pi\ \Sigma\ \Upsilon\ \Phi\ \Psi\ \Omega
\alpha\ \beta\ \gamma\ \delta\ \epsilon\ \zeta\ \eta\ \theta\ \iota\ \kappa\ \lambda\ \mu\ \nu\ \xi \ \omicron\ \pi\ \rho\ \sigma\ \tau\ \upsilon\ \phi\ \chi\ \psi\ \omega\ \varepsilon\ \vartheta\ \varpi\ \varrho\ \varsigma\ \varphi
Γ Δ Θ Λ Ξ Π Σ Υ Φ Ψ Ω α β γ δ ϵ ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ ϕ χ ψ ω ε ϑ ϖ ϱ ς φ
← → ← → ↑ ⇑ ↓ ⇓ ↕ ⇕
\gets\ \to\ \leftarrow\ \rightarrow\ \uparrow\ \Uparrow\ \downarrow\ \Downarrow\ \updownarrow\ \Updownarrow
← → ← → ↑ ⇑ ↓ ⇓ ↕ ⇕
⇐ ⇒ ↔ ⇔ ↦ ↩ ↼ ↽ ⇌ ⟵ ⟸ ⟶
\Leftarrow\ \Rightarrow\ \leftrightarrow\ \Leftrightarrow\ \mapsto\ \hookleftarrow
\leftharpoonup\ \leftharpoondown\ \rightleftharpoons\ \longleftarrow\ \Longleftarrow\ \longrightarrow
⇐ ⇒ ↔ ⇔ ↦ ↩ ↼ ↽ ⇌ ⟵ ⟸ ⟶
⟹ ⟷ ⟺ ⟼ ↪ ⇀
\Longrightarrow\ \longleftrightarrow\ \Longleftrightarrow\ \longmapsto\ \hookrightarrow\ \rightharpoonup
⟹ ⟷ ⟺ ⟼ ↪ ⇀
⇁ ⇝ ↗ ↘ ↙ ↖
\rightharpoondown\ \leadsto\ \nearrow\ \searrow\ \swarrow\ \nwarrow
⇁ ⇝ ↗ ↘ ↙ ↖
√ ⊼ ⊻ ⊙ ⊕ ⊗ ⊘ ⊚ ⊡ △
\surd\ \barwedge\ \veebar\ \odot\ \oplus\ \otimes\ \oslash\ \circledcirc\ \boxdot\ \bigtriangleup
√ ⊼ ⊻ ⊙ ⊕ ⊗ ⊘ ⊚ ⊡ △
▽ † ⋄ ⋆ ◃ ▹ ∠ ∞ ′ △
\bigtriangledown\ \dagger\ \diamond\ \star\ \triangleleft\ \triangleright\ \angle\ \infty\ \prime\ \triangle
▽ † ⋄ ⋆ ◃ ▹ ∠ ∞ ′ △
∫ u d v d x , d x = u v − ∫ d u d x v , d x
\int u \frac{dv}{dx},dx=uv-\int \frac{du}{dx}v,dx
∫ u d x d v , d x = u v − ∫ d x d u v , d x
f ( x ) = ∫ − ∞ ∞ f ^ ( ξ ) , e 2 π i ξ x
f(x) = \int_{-\infty}^\infty \hat f(\xi),e^{2 \pi i \xi x}
f ( x ) = ∫ − ∞ ∞ f ^ ( ξ ) , e 2 π i ξ x
∮ F ⃗ ⋅ d s ⃗ = 0
\oint \vec{F} \cdot d\vec{s}=0
∮ F ⋅ d s = 0
x ˙ = σ ( y − x ) y ˙ = ρ x − y − x z z ˙ = − β z + x y
\begin{aligned} \dot{x} & = \sigma(y-x) \ \dot{y} & = \rho x - y - xz \ \dot{z} & = -\beta z + xy \end{aligned}
x ˙ = σ ( y − x ) y ˙ = ρ x − y − x z z ˙ = − β z + x y
This works in KaTeX, but the separation of fractions in this environment is not so good.
V 1 × V 2 = ∣ i j k ∂ X ∂ u ∂ Y ∂ u 0 ∂ X ∂ v ∂ Y ∂ v 0 ∣
\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \ \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \ \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \end{vmatrix}
V 1 × V 2 = ∣ ∣ ∣ i j k ∂ u ∂ X ∂ u ∂ Y 0 ∂ v ∂ X ∂ v ∂ Y 0 ∣ ∣ ∣
Here’s a workaround: make the fractions smaller with an extra class that targets the spans with “mfrac” class (makes no difference in the MathJax case):
V 1 × V 2 = ∣ i j k ∂ X ∂ u ∂ Y ∂ u 0 ∂ X ∂ v ∂ Y ∂ v 0 ∣
\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \ \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \ \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \end{vmatrix}
V 1 × V 2 = ∣ ∣ ∣ i j k ∂ u ∂ X ∂ u ∂ Y 0 ∂ v ∂ X ∂ v ∂ Y 0 ∣ ∣ ∣
x ^ x ⃗ x ¨
\hat{x}\ \vec{x}\ \ddot{x}
x ^ x x ¨
( x 2 y 3 )
\left(\frac{x^2}{y^3}\right)
( y 3 x 2 )
x 3 3 ∣ 0 1
\left.\frac{x^3}{3}\right|_0^1
3 x 3 ∣ ∣ ∣ ∣ ∣ 0 1
f ( n ) = { n 2 , if n is even 3 n + 1 , if n is odd
f(n) = \begin{cases} \frac{n}{2}, & \text{if } n\text{ is even} \ 3n+1, & \text{if } n\text{ is odd} \end{cases}
f ( n ) = { 2 n , if n is even 3 n + 1 , if n is odd
∇ × B ⃗ − , 1 c , ∂ E ⃗ ∂ t = 4 π c j ⃗ ∇ ⋅ E ⃗ = 4 π ρ ∇ × E ⃗ , + , 1 c , ∂ B ⃗ ∂ t = 0 ⃗ ∇ ⋅ B ⃗ = 0
\begin{aligned} \nabla \times \vec{\mathbf{B}} -, \frac1c, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \ \nabla \times \vec{\mathbf{E}}, +, \frac1c, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \ \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned}
∇ × B − , c 1 , ∂ t ∂ E = c 4 π j ∇ ⋅ E = 4 π ρ ∇ × E , + , c 1 , ∂ t ∂ B = 0 ∇ ⋅ B = 0
These equations are quite cramped. We can add vertical spacing using (for example) [1em] after each line break (\). as you can see here:
$$
\begin{aligned} \nabla \times \vec{\mathbf{B}} -, \frac1c, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \[1em] \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \[0.5em] \nabla \times \vec{\mathbf{E}}, +, \frac1c, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \[1em] \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned}
$$
Definition of combination:
n ! k ! ( n − k ) ! = n C k ( n k )
\frac{n!}{k!(n-k)!} = {^n}C_k
{n \choose k}
k ! ( n − k ) ! n ! = n C k ( k n )
1 x + 1 y y − z
\frac{\frac{1}{x}+\frac{1}{y}}{y-z}
y − z x 1 + y 1
1 + x + x 2 + x 3 + … n
\sqrt[n]{1+x+x^2+x^3+\ldots}
n 1 + x + x 2 + x 3 + …
( a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 ) [ 0 ⋯ 0 ⋮ ⋱ ⋮ 0 ⋯ 0 ]
\begin{pmatrix} a_{11} & a_{12} & a_{13}\ a_{21} & a_{22} & a_{23}\ a_{31} & a_{32} & a_{33} \end{pmatrix}
\begin{bmatrix} 0 & \cdots & 0 \ \vdots & \ddots & \vdots \ 0 & \cdots & 0 \end{bmatrix}
( a 1 1 a 1 2 a 1 3 a 2 1 a 2 2 a 2 3 a 3 1 a 3 2 a 3 3 ) [ 0 ⋯ 0 ⋮ ⋱ ⋮ 0 ⋯ 0 ]
f ( x ) = 1 + x ( x ≥ − 1 ) f ( x ) ∼ x 2 ( x → ∞ )
f(x) = \sqrt{1+x} \quad (x \ge -1)
f(x) \sim x^2 \quad (x\to\infty)
f ( x ) = 1 + x ( x ≥ − 1 ) f ( x ) ∼ x 2 ( x → ∞ )
Now with punctuation:
f ( x ) = 1 + x , x ≥ − 1 f ( x ) ∼ x 2 , x → ∞
f(x) = \sqrt{1+x}, \quad x \ge -1
f(x) \sim x^2, \quad x\to\infty
f ( x ) = 1 + x , x ≥ − 1 f ( x ) ∼ x 2 , x → ∞