在Markdown中测试数学公式

在Markdown中测试数学公式

在Markdown中测试数学公式

2025-12-06
287 字 · 2 分钟

本文档用于测试在 Markdown 中使用 $$ 符号渲染数学公式。

基础代数

让我们从一些基本的代数表达式开始。

二次方程的求根公式为: x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2-4ac}}{2a}

一个简单的线性方程: y=mx+cy = mx + c

二项式平方的展开: (a+b)2=a2+2ab+b2(a+b)^2 = a^2 + 2ab + b^2


微积分

Here are some common expressions from calculus.

The limit definition of a derivative: f(x)=limh0f(x+h)f(x)hf'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}

A definite integral: abf(x)dx\int_{a}^{b} f(x) dx

The Taylor series expansion of exe^x around x=0x=0: ex=n=0xnn!=1+x+x22!+x33!+e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!} = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots


三角函数

Some basic trigonometric identities.

Pythagorean identity: sin2θ+cos2θ=1\sin^2\theta + \cos^2\theta = 1

Angle addition formula for sine: sin(α+β)=sinαcosβ+cosαsinβ\sin(\alpha + \beta) = \sin\alpha\cos\beta + \cos\alpha\sin\beta

Euler’s formula: eiθ=cosθ+isinθe^{i\theta} = \cos\theta + i\sin\theta


统计和概率

Formulas commonly used in statistics and probability.

The formula for the mean (μ\mu) of a set of nn numbers x1,x2,,xnx_1, x_2, \ldots, x_n: μ=1ni=1nxi\mu = \frac{1}{n} \sum_{i=1}^{n} x_i

The probability density function of a normal distribution: f(xμ,σ2)=12πσ2e(xμ)22σ2f(x | \mu, \sigma^2) = \frac{1}{\sqrt{2\pi\sigma^2}} e^{-\frac{(x-\mu)^2}{2\sigma^2}}

Bayes’ theorem: P(AB)=P(BA)P(A)P(B)P(A|B) = \frac{P(B|A)P(A)}{P(B)}


线性代数

Examples from linear algebra.

A 2x2 matrix: A=(abcd)A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}

The determinant of a 2x2 matrix: det(A)=adbc\det(A) = ad - bc

Matrix multiplication of two matrices A and B: C=ABC = AB


物理学

A couple of well-known physics equations.

Einstein’s mass-energy equivalence: E=mc2E = mc^2

Newton’s second law of motion: F=maF = ma

This should provide a good test of how various mathematical formulas are rendered.


Thanks for reading!

在Markdown中测试数学公式

2025-12-06
287 字 · 2 分钟
已复制链接

Comments