skip to content
Astro Cactus

數學公式測試 - Math Formula Test

/ 1 min read

Table of Contents

Math Formula Test

This post demonstrates how to use LaTeX math formulas in Astro Cactus blog.

Inline Math

Here is an inline formula: E=mc2E = mc^2, also known as Einstein’s mass-energy equivalence.

The quadratic formula is x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.

Block Math

Here is a display formula:

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

Maxwell’s Equations

The four fundamental equations of electromagnetism:

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 Examples

The Pythagorean theorem: a2+b2=c2a^2 + b^2 = c^2

The sum of a geometric series:

Sn=a1rn1r,r1S_n = a\frac{1-r^n}{1-r}, \quad r \neq 1

Euler’s identity (the most beautiful equation in mathematics):

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