Summary

Sample content generated by AI

Content

Mathematics with MathJax in Hugo

1. Inline Math Examples

Inline math allows you to include mathematical expressions within your sentences, using $ ... $ or ( ... ).

  • Example 1: The Pythagorean theorem states that $a^2 + b^2 = c^2$.
  • Example 2: The derivative of a function $f(x)$ is denoted as $f'(x) = \frac{d}{dx}f(x)$.
  • Example 3: Euler's formula can be written inline as $e^{i\pi} + 1 = 0$.

2. Display (Block) Math Examples

Block math is rendered separately using $$ ... $$ or [ ... ]. These are ideal for longer derivations.

2.1 Quadratic Formula

Consider the quadratic equation:

$$ ax^2 + bx + c = 0 $$

To find the roots, complete the square:

$$ ax^2 + bx + c = 0 \implies x^2 + \frac{b}{a}x + \frac{c}{a} = 0 $$ $$ x^2 + \frac{b}{a}x = -\frac{c}{a} $$ $$ x^2 + \frac{b}{a}x + \left(\frac{b}{2a}\right)^2 = \left(\frac{b}{2a}\right)^2 - \frac{c}{a} $$ $$ \left(x + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2} $$ $$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$

2.2 Integral Example

The integral of an exponential function:

$$ \int e^{kx} , dx = \frac{1}{k} e^{kx} + C $$

2.3 Summation Example

A series example using summation notation:

$$ S_n = \sum_{k=1}^{n} k = 1 + 2 + \dots + n = \frac{n(n+1)}{2} $$

2.4 Trigonometric Identity

The derivation of the sine addition formula:

$$ \sin(a + b) = \sin a \cos b + \cos a \sin b $$

This can be verified using the unit circle or Euler's formula:

$$ e^{i(a+b)} = e^{ia} e^{ib} \implies \cos(a+b) + i\sin(a+b) = (\cos a + i\sin a)(\cos b + i\sin b) $$

2.5 Matrix Example

A simple 2x2 matrix multiplication:

$$ \begin{pmatrix} a & b \ c & d \end{pmatrix} \begin{pmatrix} x \ y \end{pmatrix} = \begin{pmatrix} ax + by \ cx + dy \end{pmatrix} $$