Examples
Inline math:
Block math:
More complex equations:
And the inverse transform is:
The Heat Equation
The heat equation in one dimension is:
where is the temperature at position and time , and is the thermal diffusivity.
The general solution can be written using Fourier series:
where are constants determined by the initial conditions.
I hope this post helps you test whether your site can properly render both inline math like and block equations like:
This mix of inline and block mathematics should give you a good test case for your website's LaTeX rendering capabilities!
Claude Math Rendering Test Document
This document contains various mathematical expressions in different formats to test the rendering capabilities of your markdown editor or website.
Inline Math
Inline math is typically written between single dollar signs $...$ in markdown.
The quadratic formula states that if , then .
The area of a circle is where is the radius.
Einstein's famous equation relates energy and mass.
Display Math
Display math (equations on their own line) typically uses double dollar signs $$...$$ or other delimiters.
The Pythagorean theorem:
The Gaussian integral:
Maxwell's equations in differential form:
\nabla \cdot \vec{E} &= \frac{\rho}{\varepsilon_0} \\ \nabla \cdot \vec{B} &= 0 \\ \nabla \times \vec{E} &= -\frac{\partial \vec{B}}{\partial t} \\ \nabla \times \vec{B} &= \mu_0 \vec{J} + \mu_0 \varepsilon_0 \frac{\partial \vec{E}}{\partial t} \end{align}$$ ## Advanced Math Formatting ### Matrices A 2×2 matrix: $$\begin{pmatrix} a & b \\ c & d \end{pmatrix}$$ A 3×3 matrix: $$\begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix}$$ ### Fractions and Binomials Nested fractions: $$\frac{1}{\frac{1}{a} + \frac{1}{b}} = \frac{ab}{a+b}$$ Binomial coefficient: $$\binom{n}{k} = \frac{n!}{k!(n-k)!}$$ ### Limits, Sums, and Integrals Limit: $$\lim_{x \to 0} \frac{\sin x}{x} = 1$$ Sum: $$\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$$ Double integral: $$\iint_D f(x,y) \, dx \, dy = \int_a^b \int_c^d f(x,y) \, dy \, dx$$ ### Greek Letters and Special Symbols Greek letters: $$\alpha, \beta, \gamma, \delta, \epsilon, \zeta, \eta, \theta, \iota, \kappa, \lambda, \mu, \nu, \xi, \pi, \rho, \sigma, \tau, \upsilon, \phi, \chi, \psi, \omega$$ $$\Gamma, \Delta, \Theta, \Lambda, \Xi, \Pi, \Sigma, \Upsilon, \Phi, \Psi, \Omega$$ Special symbols: $$\infty, \nabla, \partial, \exists, \forall, \in, \subset, \supset, \cup, \cap, \emptyset, \therefore, \because$$ ### Equations with Alignments Aligned equations: $$\begin{align} (a+b)^2 &= (a+b)(a+b) \\ &= a^2 + ab + ba + b^2 \\ &= a^2 + 2ab + b^2 \end{align}$$ ### Chemical Equations Chemical reaction: $$\ce{C6H12O6 + 6O2 -> 6CO2 + 6H2O}$$ ## Alternative Math Syntaxes Some markdown processors support alternative syntaxes. Here are examples: ### LaTeX-style Delimiters Inline math with `\(...\)`: The derivative of position is velocity: \(v = \frac{dx}{dt}\) Display math with `\[...\]`: \[\vec{F} = m\vec{a}\] ### MathML (if supported) <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mi>x</mi> <mo>=</mo> <mfrac> <mrow> <mo>−</mo> <mi>b</mi> <mo>±</mo> <msqrt> <mrow> <msup> <mi>b</mi> <mn>2</mn> </msup> <mo>−</mo> <mn>4</mn> <mi>a</mi> <mi>c</mi> </mrow> </msqrt> </mrow> <mrow> <mn>2</mn> <mi>a</mi> </mrow> </mfrac> </mrow> </math> ## Complex Mathematical Content ### A Proof **Theorem**: For any positive integer $n$, the sum of the first $n$ positive integers is $\frac{n(n+1)}{2}$. **Proof**: We proceed by induction. Base case: For $n = 1$, we have $\sum_{i=1}^{1} i = 1 = \frac{1(1+1)}{2} = 1$. ✓ Inductive step: Assume that for some positive integer $k$, we have $\sum_{i=1}^{k} i = \frac{k(k+1)}{2}$. Then for $n = k+1$: $$\begin{align} \sum_{i=1}^{k+1} i &= \sum_{i=1}^{k} i + (k+1) \\ &= \frac{k(k+1)}{2} + (k+1) \\ &= \frac{k(k+1)}{2} + \frac{2(k+1)}{2} \\ &= \frac{k(k+1) + 2(k+1)}{2} \\ &= \frac{(k+1)(k+2)}{2} \\ &= \frac{(k+1)((k+1)+1)}{2} \end{align}$$ This completes the induction step, proving that $\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$ for all positive integers $n$. ■ ### A Statistical Formula The probability density function of a normal distribution: $$f(x) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2}$$ Where $\mu$ is the mean and $\sigma$ is the standard deviation. ### A Physics Equation The Schrödinger equation in quantum mechanics: $$i\hbar \frac{\partial}{\partial t} \Psi(\mathbf{r},t) = \hat{H} \Psi(\mathbf{r},t)$$ Where $\Psi$ is the wave function, $\hat{H}$ is the Hamiltonian operator, and $\hbar$ is the reduced Planck constant. ## Testing Edge Cases Very long equation: $$\begin{align} \frac{d}{dx}\left( \int_{a(x)}^{b(x)} f(x,t) \, dt \right) = f(x,b(x)) \cdot \frac{d}{dx}b(x) - f(x,a(x)) \cdot \frac{d}{dx}a(x) + \int_{a(x)}^{b(x)} \frac{\partial}{\partial x}f(x,t) \, dt \end{align}$$ Nested subscripts and superscripts: $$S_{i_{j_{k_{l}}}} = x^{y^{z^{w}}}$$ Multi-line equation with cases: $$f(x) = \begin{cases} x^2, & \text{if } x \geq 0 \\ -x^2, & \text{if } x < 0 \end{cases}$$ ## Conclusion If your markdown editor or website correctly renders all or most of these mathematical expressions, it should be well-equipped to handle math content generated by LLMs. Different markdown processors support different subsets of LaTeX math syntax, so it's normal if some of the more complex examples don't render perfectly.