Calculus & Analyse

Afgeleiden, integralen, limieten en differentiaaloperatoren.

Calculus symbols in LaTeX: derivatives, integrals and limits

The core calculus symbols in LaTeX are all built in. A derivative in LaTeX is a fraction, \frac{dy}{dx}, or a prime, f'(x); a partial derivative uses \partial, as in \frac{\partial f}{\partial x}; an integral is \int_a^b f(x)\,dx; and a limit is \lim_{x \to 0}. Multiple integrals such as \iint and \iiint come from amsmath, and the physics package adds shortcuts like \dv and \pdv. The table lists the calculus symbols people use most, with the package each one needs; the full list follows below.

Quick reference: derivatives, integrals and limits

SymbolCommandUsePackageCopy
dydx\frac{dy}{dx}
\frac{dy}{dx}Derivative (Leibniz notation)built in
f′(x)f'(x)
f'(x)Derivative (prime notation); f''(x) for the secondbuilt in
d2ydx2\frac{d^2 y}{dx^2}
\frac{d^2 y}{dx^2}Second derivativebuilt in
∂f∂x\frac{\partial f}{\partial x}
\frac{\partial f}{\partial x}Partial derivativebuilt in
x˙\dot{x}
\dot{x}Time derivative (Newton dot); \ddot{x} for the secondbuilt in
∫abf(x) dx\int_a^b f(x)\,dx
\int_a^b f(x)\,dxDefinite integralbuilt in
∬Df dA\iint_D f\,dA
\iint_D f\,dADouble integral (\iiint for triple)amsmath
∮C\oint_C
\oint_CContour (closed line) integralbuilt in
lim⁡x→0\lim_{x \to 0}
\lim_{x \to 0}Limitbuilt in
∇f\nabla f
\nabla fGradientbuilt in
dfdx\frac{\mathrm{d}f}{\mathrm{d}x}
\dv{f}{x}Derivative shortcutphysics
∂f∂x\frac{\partial f}{\partial x}
\pdv{f}{x}Partial derivative shortcutphysics

Spacing and the upright d

Add a thin space \, before the differential so f(x)\,dx does not run together. Some style guides set the d upright; define \newcommand{\diff}{\mathop{}\!\mathrm{d}} once and write \int f(x) \diff x. Sums and series are on the summation symbols page, and the gradient and nabla are covered with the machine learning symbols.

Frequently asked questions about calculus in LaTeX

How do I write a derivative in LaTeX?
Write it as a fraction in math mode: $\frac{dy}{dx}$ for dy/dx and $\frac{d^2y}{dx^2}$ for the second derivative. Prime notation is f'(x) and f''(x), and Newton's dot notation is \dot{x} and \ddot{x}. All are built in; the physics package adds \dv{y}{x} as a shortcut.
How do I write a partial derivative in LaTeX?
Use the built-in \partial symbol inside a fraction: $\frac{\partial f}{\partial x}$, and $\frac{\partial^2 f}{\partial x \partial y}$ for a mixed second derivative. With \usepackage{physics}, \pdv{f}{x} and \pdv{f}{x}{y} produce the same output.
How do I write an integral with limits in LaTeX?
Use \int with a subscript and superscript: $\int_a^b f(x)\,dx$. Add \limits (\int\limits_a^b) to put the limits above and below the sign. For double and triple integrals load amsmath and use \iint and \iiint, which space the signs correctly; \oint gives a closed contour integral.
∂\partial
∇\nabla
∫\int
∫ab\int_{a}^{b}

Definite Integral

\int_{a}^{b}
∬\iint
∭\iiint
∮\oint
ddx\frac{d}{dx}

Derivative

\frac{d}{dx}
∂∂x\frac{\partial}{\partial x}

Partial Derivative Frac

\frac{\partial}{\partial x}
lim⁡x→a\lim_{x \to a}

Limit

\lim_{x \to a}
lim⁡x→∞\lim_{x \to \infty}

Limit to Infinity

\lim_{x \to \infty}
∞\infty

Infinity

\infty
∑n=1∞\sum_{n=1}^{\infty}

Summation

\sum_{n=1}^{\infty}
∏n=1∞\prod_{n=1}^{\infty}

Product

\prod_{n=1}^{\infty}
dxdx
f′(x)f'(x)
f′′(x)f''(x)
x˙\dot{x}
x¨\ddot{x}

Double Dot

\ddot{x}
→\to
∣ab\Big|_{a}^{b}

Evaluated At

\Big|_{a}^{b}