test_formula

  • ~2.93K 字
  1. 1. Latex tests
    1. 1.1. Inline Formulas
    2. 1.2. Centered Equations
    3. 1.3. Begin/End Blocks
    4. 1.4. Left/Right Delimiters
    5. 1.5. Complex Expressions

Latex tests

Here are various LaTeX formulas to test rendering capabilities:

Inline Formulas

Einstein’s famous equation: E=mc2E = mc^2 shows the relationship between energy and mass.

The quadratic formula x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} solves ax2+bx+c=0ax^2 + bx + c = 0.

The Pythagorean theorem states that a2+b2=c2 a^2 + b^2 = c^2 for right triangles.

Centered Equations

Newton’s second law of motion:

F=ma F = m \cdot a

Euler’s identity, often considered the most beautiful equation in mathematics:

eiπ+1=0 e^{i\pi} + 1 = 0

The Gaussian integral:

ex2dx=π\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}

Begin/End Blocks

A matrix representation:

abcdefghi \begin{array}{ccc} a & b & c \\ d & e & f \\ g & h & i \end{array}

A system of linear equations:

3x+2yz=12x2y+4z=2x+12yz=0 \begin{aligned} 3x + 2y - z &= 1 \\ 2x - 2y + 4z &= -2 \\ -x + \frac{1}{2}y - z &= 0 \end{aligned}

A piecewise function definition:

{x2if x0x2if x<0 \begin{cases} x^2 & \text{if } x \geq 0 \\ -x^2 & \text{if } x < 0 \end{cases}

Left/Right Delimiters

The expectation value in quantum mechanics:

ψA^ψ\left\langle \psi \right| \hat{A} \left| \psi \right\rangle

A binomial coefficient:

(nk)=(nk)=n!k!(nk)!\binom{n}{k} = \left( \begin{array}{c} n \\ k \end{array} \right) = \frac{n!}{k!(n-k)!}

The Legendre symbol:

(ap)={1if a is a quadratic residue modulo p and a≢0(modp)1if a is a quadratic non-residue modulo p0if a0(modp) \left( \frac{a}{p} \right) = \begin{cases} 1 & \text{if } a \text{ is a quadratic residue modulo } p \text{ and } a \not\equiv 0 \pmod{p} \\ -1 & \text{if } a \text{ is a quadratic non-residue modulo } p \\ 0 & \text{if } a \equiv 0 \pmod{p} \end{cases}

Complex Expressions

The Fourier transform:

F[f(t)]=f(t)eiωtdt\mathcal{F}[f(t)] = \int_{-\infty}^{\infty} f(t) e^{-i\omega t} dt

Schrödinger’s equation:

itΨ(r,t)=[22m2+V(r,t)]Ψ(r,t)i\hbar\frac{\partial}{\partial t}\Psi(\mathbf{r},t) = \left [ -\frac{\hbar^2}{2m}\nabla^2 + V(\mathbf{r},t)\right ] \Psi(\mathbf{r},t)

Maxwell’s equations in differential form:

E=ρε0B=0×E=Bt×B=μ0J+μ0ε0Et \begin{aligned} \nabla \cdot \mathbf{E} &= \frac{\rho}{\varepsilon_0} \\ \nabla \cdot \mathbf{B} &= 0 \\ \nabla \times \mathbf{E} &= -\frac{\partial\mathbf{B}}{\partial t} \\ \nabla \times \mathbf{B} &= \mu_0\mathbf{J} + \mu_0\varepsilon_0\frac{\partial\mathbf{E}}{\partial t} \end{aligned}

More info: Deployment

分享这一刻
让朋友们也来瞅瞅!