Payload LogoOctree

Integrals, Sums, and Limits in LaTeX: Complete Guide

Date Published

Integrals, Sums, and Limits in LaTeX

Master the notation for calculus and analysis in LaTeX.

Basic Integrals

Indefinite Integral

$\int f(x)\,dx$

Always include \, before dx for proper spacing.

Definite Integral

$\int_a^b f(x)\,dx$

Limits go in subscript and superscript.

Display Mode

In display mode, limits appear above and below:

$\displaystyle \int_0^\infty e^{-x}\,dx$

Multiple Integrals

Double Integral

$\iint_D f(x,y)\,dA$

Or with limits:

$\int_0^1 \int_0^1 f(x,y)\,dx\,dy$

Triple Integral

$\iiint_V f(x,y,z)\,dV$

Higher Integrals

$\idotsint f\,dx_1 \cdots dx_n$

Contour and Surface Integrals

Contour Integral

$\oint_C f(z)\,dz$

Surface Integral

$\oiint_S \vec{F} \cdot d\vec{A}$

Requires \usepackage{esint} for \oiint.

Summations

Basic Sum

$\sum_{i=1}^{n} a_i$

Display Mode

$\displaystyle \sum_{k=0}^{\infty} \frac{x^k}{k!}$

Double Sum

$\sum_{i=1}^{m} \sum_{j=1}^{n} a_{ij}$

Products

Basic Product

$\prod_{i=1}^{n} a_i$

Factorial as Product

$n! = \prod_{k=1}^{n} k$

Limits

Basic Limit

$\lim_{x \to a} f(x)$

Limit at Infinity

$\lim_{n \to \infty} a_n$

One-Sided Limits

$\lim_{x \to 0^+} f(x)$ — right limit

$\lim_{x \to 0^-} f(x)$ — left limit

Limit Superior/Inferior

$\limsup_{n \to \infty} a_n$

$\liminf_{n \to \infty} a_n$

Common Formulas

Fundamental Theorem of Calculus

$\int_a^b f'(x)\,dx = f(b) - f(a)$

Geometric Series

$\sum_{n=0}^{\infty} r^n = \frac{1}{1-r}$

Taylor Series

$f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^n$

Euler's Formula

$e^{ix} = \sum_{n=0}^{\infty} \frac{(ix)^n}{n!}$

Gaussian Integral

$\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}$

Styling Options

Inline vs Display Limits

Force display style limits inline:

$\sum\limits_{i=1}^n$

Force inline style limits in display:

$\displaystyle \sum\nolimits_{i=1}^n$

Multiple Conditions

$\sum_{\substack{i=1 \\ i \neq j}}^{n}$

Differential Operators

Derivatives

$\frac{d}{dx}$, $\frac{d^2}{dx^2}$

Partial Derivatives

$\frac{\partial f}{\partial x}$

$\frac{\partial^2 f}{\partial x \partial y}$

Spacing in Integrals

Use thin space before differentials:

$\int f(x)\,dx$ — correct

$\int f(x)dx$ — too tight

Write Calculus with Octree

Octree simplifies mathematical notation:

- Smart autocomplete for integrals - Preview complex formulas instantly - AI suggests proper notation - Export publication-ready PDFs

Try it at https://useoctree.com