Testing Mathematical Formulas in Markdown

A demonstration of various mathematical formulas rendered using LaTeX within Markdown.

周二 5月 31 2022 LaTeX
217 字 · 2 分钟

This document serves as a test for rendering mathematical formulas in Markdown using $$ delimiters.

Basic Algebra

Let’s start with some fundamental algebraic expressions.

The quadratic formula is given by:

x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2-4ac}}{2a}

A simple linear equation:

y=mx+cy = mx + c

Expansion of a binomial square:

(a+b)2=a2+2ab+b2(a+b)^2 = a^2 + 2ab + b^2

Calculus

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

Trigonometry

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

Statistics and Probability

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)}

Linear Algebra

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

Physics

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!

Testing Mathematical Formulas in Markdown

周二 5月 31 2022 LaTeX
217 字 · 2 分钟