Skip to content
All LaTeX symbols

Derivative notation (dy/dx, f′, ẋ)

Calculus

′

LaTeX command

\frac{dy}{dx}

Leibniz

Use inside math mode: $\frac{dy}{dx}$ — base LaTeX, KaTeX and MathJax

Four notations coexist. Leibniz fractions are the most explicit, primes the most compact, dots are physics shorthand for time derivatives, and D is the operator form. In LaTeX a prime is literally an apostrophe; \prime exists but is rarely needed.

All ways to write it

CommandUsePackageCopy
\frac{dy}{dx}Leibniznone
\frac{d^2 y}{dx^2}second derivativenone
f'(x)Lagrange prime (just an apostrophe)none
f''(x)second derivativenone
\dot{x}Newton dot, time derivativenone
\ddot{x}second time derivativenone
D_x fEuler operatornone

Example

m\ddot{x} + c\dot{x} + kx = 0

A damped oscillator in Newton notation.

Questions

Why does f^\prime look wrong?

The superscript position is already built into the apostrophe form. Write f' and LaTeX converts it to a correctly placed prime.

Related symbols

Using derivatives in Confluence

Confluence Cloud has no built-in LaTeX. With LaTeX Math for Confluence you add a math macro to any page, type \frac{dy}{dx} and it renders inline or as a block, with a live preview while you edit. Every command on this page renders there without extra packages.