Latex how to write a fraction: \frac

Latex fraction symbol a over b

$$\frac{a}{b}$$
\[\frac{a}{b}\]

Example: Latex limit with fraction

$$\lim_{x \to a} \frac{f(x)-f(a)}{x-a}$$
\[\lim_{x \to a} \frac{f(x)-f(a)}{x-a}\]

Example: Latex sum with fraction

$$\sum_{n=0}^{\infty} \frac{1}{n^2+1}$$
\[\sum_{n=0}^{\infty} \frac{1}{n^2+1}\]