Three notations compete and all three are correct: a prime, a Leibniz fraction, and an operator applied to a function. What changes between them is not the mathematics but what the reader needs to see — the variable, the point of evaluation, or only the order. The prime is a superscript with its own spacing (Sub & Sup), the Leibniz form is a sizing question (Fractions), and the evaluation bar is a bracket that must not close on the left (Brackets).
Which one to use
f'(x), f''(x)\frac{dy}{dx}\frac{d^2y}{dx^2}\frac{\partial f}{\partial x}\left.\frac{dy}{dx}\right|_{x=0}\dot{x}, \ddot{x}The commands
f'(x)
f''(x)
f^{(n)}(x)
\dfrac or display maths for legibility. \frac{dy}{dx}
\frac{d^2y}{dx^2}
\frac{\partial f}{\partial x}
\frac{\partial^2 f}{\partial x \partial y}
\left. keeps the tall bar without a matching bracket. \left.\frac{dy}{dx}\right|_{x=0}
\dot{x} \quad \ddot{x}
Worked examples
Same fact, three notations
\frac{d}{dx}x^2 = 2x \qquad \frac{dy}{dx}=2x \qquad y'=2x
Operator form, Leibniz and prime — pick one per document and stay with it.
Chain rule
\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx}
The dot is what stops two fractions reading as a product of letters.
Gradient
\nabla f = \left(\frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}\right)
Nabla with partials, the usual multivariable form.
Common mistakes
- Writing
f'(x)asf^'(x). The prime is already a superscript; adding^produces a doubled mark. - Using a straight double quote
f"(x)for a second derivative. That renders as two closing quotes, not two primes. f^n(x)whenf^{(n)}was meant — the first is f to the power n, the second is the nth derivative.- Setting
das an italic variable. Purists use\mathrm{d}for the differential operator; either is fine, but mixing them in one document is not.
Questions about this notation
How do I write d/dx upright?
\frac{\mathrm{d}y}{\mathrm{d}x}. The differential d is an operator rather than a variable, so many house styles set it Roman.What is the difference between \partial and \delta?
\partial is reserved for partial derivatives; \delta is the lowercase Greek letter, usually a finite change or a variation.Why does my prime sit too high?
How do I write a second derivative or a partial derivative?
f^{\prime}, f^{\prime\prime}, or two bare apostrophes after the letter. Leibniz notation is \frac{d^2y}{dx^2}, and for mixed partials \frac{\partial^2 f}{\partial x \partial y}. Put a thin space before the last differential — \,dx — otherwise the roman d crowds whatever precedes it.Keep reading
Three ways into the same idea: the notation itself, the lesson that teaches it, and an article that applies it.