Derivative Rules: Power, Product, Quotient, Chain, Trig and Inverse Trig Derivatives
The derivative of a function f at a point x is the instantaneous rate of change of f there: the slope of the tangent line, defined as the limit of the difference quotient
f′(x) = limh→0 [f(x + h) − f(x)] / h
Nobody evaluates that limit more than a few times in a calculus course. Instead you learn a handful of derivative rules that say how differentiation interacts with sums, products, quotients and composition, plus a short table of derivatives of the elementary functions, and every other derivative is assembled from those. This page is that reference: the seven core rules, a table of common and trig derivatives, the six inverse trig derivatives, two worked examples, and the LaTeX source for every formula so you can paste it into your own notes.
The Core Derivative Rules
Throughout, c and n are constants, f and g are differentiable functions of x, and a prime means the derivative with respect to x. The right-hand column is the LaTeX that produces each formula, using \frac{d}{dx} for the operator.
| Rule | Formula | LaTeX |
|---|---|---|
| Constant | d/dx [c] = 0 | \frac{d}{dx} c = 0 |
| Constant multiple | d/dx [c f(x)] = c f′(x) | \frac{d}{dx}\bigl[c\,f(x)\bigr] = c\,f'(x) |
| Sum and difference | d/dx [f(x) ± g(x)] = f′(x) ± g′(x) | \frac{d}{dx}\bigl[f(x) \pm g(x)\bigr] = f'(x) \pm g'(x) |
| Power | d/dx xn = n xn−1 | \frac{d}{dx} x^n = n x^{n-1} |
| Product | d/dx [f(x) g(x)] = f′(x) g(x) + f(x) g′(x) | \frac{d}{dx}\bigl[f(x)\,g(x)\bigr] = f'(x)\,g(x) + f(x)\,g'(x) |
| Quotient | d/dx [f(x) / g(x)] = [f′(x) g(x) − f(x) g′(x)] / g(x)2 | \frac{d}{dx}\left[\frac{f(x)}{g(x)}\right] = \frac{f'(x)\,g(x) - f(x)\,g'(x)}{g(x)^2} |
| Chain | d/dx f(g(x)) = f′(g(x)) g′(x) | \frac{d}{dx} f\bigl(g(x)\bigr) = f'\bigl(g(x)\bigr)\,g'(x) |
A few things worth knowing about each:
- Constant, constant multiple, sum: together these say differentiation is linear. They let you differentiate a polynomial term by term, and they are why a constant added to a function never changes its derivative.
- Power rule: valid for every real exponent n, not just positive integers. Writing roots and reciprocals as powers is usually the fastest route: √x = x1/2 gives 1/(2√x), and 1/x = x−1 gives −1/x2.
- Product rule: the derivative of a product is not the product of the derivatives. Differentiate one factor at a time, keep the other, and add. For three factors, (fgh)′ = f′gh + fg′h + fgh′.
- Quotient rule: the order in the numerator matters because of the minus sign. The mnemonic "low d-high minus high d-low, over low squared" keeps it straight. Any quotient can also be written as f · g−1 and done with the product and chain rules.
- Chain rule: differentiate the outer function, leave the inside alone, then multiply by the derivative of the inside. In Leibniz notation, if y = f(u) and u = g(x), then dy/dx = (dy/du)(du/dx). Nested functions just mean more factors.
Here are all seven as one align* block. The & before each equals sign lines them up, and \bigl[ \bigr] gives brackets slightly larger than the fraction.
\begin{align*}
\frac{d}{dx}\, c &= 0 \\
\frac{d}{dx}\bigl[c\,f(x)\bigr] &= c\,f'(x) \\
\frac{d}{dx}\bigl[f(x) \pm g(x)\bigr] &= f'(x) \pm g'(x) \\
\frac{d}{dx}\, x^n &= n x^{n-1} \\
\frac{d}{dx}\bigl[f(x)\,g(x)\bigr] &= f'(x)\,g(x) + f(x)\,g'(x) \\
\frac{d}{dx}\left[\frac{f(x)}{g(x)}\right] &= \frac{f'(x)\,g(x) - f(x)\,g'(x)}{g(x)^2} \\
\frac{d}{dx}\, f\bigl(g(x)\bigr) &= f'\bigl(g(x)\bigr)\,g'(x)
\end{align*}Table of Common Derivatives and Trig Derivatives
The rules above tell you how to take things apart; this table tells you what to do with the pieces. Powers, exponentials and logarithms come first, then the six trig derivatives and the two hyperbolic ones. Trig arguments are in radians; the derivatives of sin and cos pick up a factor of π/180 in degrees.
| f(x) | f′(x) | LaTeX |
|---|---|---|
| xn | n xn−1 | \frac{d}{dx} x^n = n x^{n-1} |
| ex | ex | \frac{d}{dx} e^x = e^x |
| ax (a > 0) | ax ln a | \frac{d}{dx} a^x = a^x \ln a |
| ln x (x > 0) | 1 / x | \frac{d}{dx} \ln x = \frac{1}{x} |
| loga x (x > 0) | 1 / (x ln a) | \frac{d}{dx} \log_a x = \frac{1}{x \ln a} |
| sin x | cos x | \frac{d}{dx} \sin x = \cos x |
| cos x | −sin x | \frac{d}{dx} \cos x = -\sin x |
| tan x | sec2 x | \frac{d}{dx} \tan x = \sec^2 x |
| cot x | −csc2 x | \frac{d}{dx} \cot x = -\csc^2 x |
| sec x | sec x tan x | \frac{d}{dx} \sec x = \sec x \tan x |
| csc x | −csc x cot x | \frac{d}{dx} \csc x = -\csc x \cot x |
| sinh x | cosh x | \frac{d}{dx} \sinh x = \cosh x |
| cosh x | sinh x | \frac{d}{dx} \cosh x = \sinh x |
Two patterns make the trig derivatives easier to remember. Every co-function (cos, cot, csc) has a minus sign, and the other three do not. And the last four rows are not independent facts: they follow from sin and cos by the quotient rule. For tan,
d/dx [sin x / cos x] = (cos x · cos x − sin x · (−sin x)) / cos2 x = 1 / cos2 x = sec2 x,
using sin2 x + cos2 x = 1 in the numerator. The same computation on 1/cos x gives sec x tan x. Note also that ex is the only exponential that is its own derivative; the ln a in the ax row is what you get from writing ax = ex ln a and applying the chain rule. Unlike the trig functions, sinh and cosh swap without any sign change.
Inverse Trig Derivatives
The inverse trig derivatives look nothing like the trig derivatives: they are algebraic functions, which is why they show up when you integrate expressions like 1/(1 + x2). Each one is found by implicit differentiation. For y = arcsin x, write sin y = x, differentiate to get cos y · y′ = 1, and then cos y = √(1 − sin2 y) = √(1 − x2), where the positive root is correct because arcsin takes values in [−π/2, π/2] and cos is non-negative there.
| f(x) | f′(x) | Valid for | LaTeX |
|---|---|---|---|
| arcsin x | 1 / √(1 − x2) | |x| < 1 | \frac{d}{dx} \arcsin x = \frac{1}{\sqrt{1 - x^2}} |
| arccos x | −1 / √(1 − x2) | |x| < 1 | \frac{d}{dx} \arccos x = -\frac{1}{\sqrt{1 - x^2}} |
| arctan x | 1 / (1 + x2) | all x | \frac{d}{dx} \arctan x = \frac{1}{1 + x^2} |
| arccot x | −1 / (1 + x2) | all x | \frac{d}{dx} \arccot x = -\frac{1}{1 + x^2} |
| arcsec x | 1 / (|x| √(x2 − 1)) | |x| > 1 | \frac{d}{dx} \arcsec x = \frac{1}{|x|\sqrt{x^2 - 1}} |
| arccsc x | −1 / (|x| √(x2 − 1)) | |x| > 1 | \frac{d}{dx} \arccsc x = -\frac{1}{|x|\sqrt{x^2 - 1}} |
The three co-functions are again the negatives of their partners, this time for a cleaner reason: arcsin x + arccos x = π/2 for every x in [−1, 1] (and similarly for the other two pairs), so the derivatives have to cancel. The |x| in the arcsec and arccsc rows comes from the usual choice of range, [0, π/2) ∪ (π/2, π] for arcsec, on which the function is increasing for both x > 1 and x < −1; some textbooks choose a different range and drop the absolute value. The four square-root formulas are undefined at x = ±1, where arcsin, arccos, arcsec and arccsc have vertical tangents; arctan and arccot are differentiable everywhere.
With the chain rule these become general formulas. For an inner function u(x),
d/dx arctan u = u′ / (1 + u2), so d/dx arctan(2x) = 2 / (1 + 4x2),
and d/dx arcsin(x2) = 2x / √(1 − x4). In LaTeX, \arcsin, \arccos and \arctan are built in, but \arccot, \arcsec and \arccsc are not; the complete document below declares them with \DeclareMathOperator. If you prefer the sin−1 notation, write \sin^{-1} x.
Worked Examples
Most real derivatives need two or three rules at once. The trick is to identify the outermost structure first (is it a sum? a product? a quotient? a composition?) and apply that rule, leaving the inner pieces for later.
Example 1: product rule with the chain rule
Differentiate f(x) = x2 sin(3x).
- The outer structure is a product, u · v with u = x2 and v = sin(3x). By the product rule, f′ = u′v + uv′.
- u′ = 2x by the power rule.
- v = sin(3x) is a composition: outer function sin, inner function 3x. Chain rule: v′ = cos(3x) · 3 = 3 cos(3x).
- Assemble: f′(x) = 2x sin(3x) + 3x2 cos(3x), or x[2 sin(3x) + 3x cos(3x)] after factoring.
Sanity check: f(0) = 0 and the graph starts flat at the origin, so f′(0) should be 0, and it is. The LaTeX for the result is f'(x) = 2x\sin(3x) + 3x^2\cos(3x).
Example 2: quotient rule
Differentiate g(x) = (3x − 1) / (x2 + 2).
- Name the parts: high = 3x − 1 with derivative 3; low = x2 + 2 with derivative 2x.
- Low d-high minus high d-low, over low squared: g′(x) = [(x2 + 2)(3) − (3x − 1)(2x)] / (x2 + 2)2.
- Expand the numerator: 3x2 + 6 − 6x2 + 2x = −3x2 + 2x + 6.
- So g′(x) = (−3x2 + 2x + 6) / (x2 + 2)2. Leave the denominator factored; expanding it only hides the structure.
Sanity check at x = 0: the formula gives 6/4 = 3/2, and near zero g(x) ≈ (3x − 1)/2 has slope 3/2. Typeset with \frac{-3x^2 + 2x + 6}{(x^2 + 2)^2}. Both examples are worked line by line in the align* environment in the complete document below.
Typesetting Derivatives in LaTeX
Every derivative formula on this page is plain amsmath. The pieces you need:
\frac{d}{dx}is the Leibniz operator. Put the function after it,\frac{d}{dx} f(x), or inside it,\frac{df}{dx}. The second derivative is\frac{d^2 f}{dx^2}. Many journals set the d upright with\mathrm{d}, as in\frac{\mathrm{d}f}{\mathrm{d}x}; define\newcommand{\dd}{\mathrm{d}}once if you want that.\dfracforces a display-size fraction. Inside running text\fracshrinks to a cramped inline fraction;\dfrac{d}{dx}keeps it readable, at the cost of taller lines. The reverse,\tfrac, gives a small fraction inside a display.\partialis the partial derivative symbol:\frac{\partial f}{\partial x}, and\frac{\partial^2 f}{\partial x \, \partial y}for a mixed second derivative, with\,for the thin space between the two differentials.- Lagrange notation is just a prime:
f'(x),f''(x), andf^{(n)}(x)for the nth derivative. Type the apostrophe directly;\primeis only needed when you want the symbol without the superscript. - Newton notation for time derivatives:
\dot{x}and\ddot{x}give ẋ and ẍ. - The optional
physicspackage adds\dv{f}{x}for df/dx,\dv[2]{f}{x}for the second derivative,\dv{x}for the bare operator and\pdv{f}{x}for partials. It is a convenience, not a requirement, and it redefines a few common macros, so leave it out if a co-author or a journal template does not already load it.
Complete document
This compiles with pdfLaTeX and produces the rules block, both derivative tables and the two worked examples. booktabs supplies the table rules, array lets a column be set in math mode, and the three \DeclareMathOperator lines supply the inverse trig functions that amsmath leaves out.
\documentclass[11pt]{article}
\usepackage{amsmath,amssymb}
\usepackage{booktabs,array}
% amsmath defines \arcsin, \arccos and \arctan but not these three.
\DeclareMathOperator{\arccot}{arccot}
\DeclareMathOperator{\arcsec}{arcsec}
\DeclareMathOperator{\arccsc}{arccsc}
\begin{document}
\section*{Derivative rules}
\begin{align*}
\frac{d}{dx}\, c &= 0 \\
\frac{d}{dx}\bigl[c\,f(x)\bigr] &= c\,f'(x) \\
\frac{d}{dx}\bigl[f(x) \pm g(x)\bigr] &= f'(x) \pm g'(x) \\
\frac{d}{dx}\, x^n &= n x^{n-1} \\
\frac{d}{dx}\bigl[f(x)\,g(x)\bigr] &= f'(x)\,g(x) + f(x)\,g'(x) \\
\frac{d}{dx}\left[\frac{f(x)}{g(x)}\right] &= \frac{f'(x)\,g(x) - f(x)\,g'(x)}{g(x)^2} \\
\frac{d}{dx}\, f\bigl(g(x)\bigr) &= f'\bigl(g(x)\bigr)\,g'(x)
\end{align*}
\section*{Common derivatives}
\renewcommand{\arraystretch}{1.4}
\begin{tabular}{>{$}l<{$} >{$}l<{$} @{\qquad} >{$}l<{$} >{$}l<{$}}
\toprule
f(x) & f'(x) & f(x) & f'(x) \\
\midrule
x^n & n x^{n-1} & \sin x & \cos x \\
e^x & e^x & \cos x & -\sin x \\
a^x & a^x \ln a & \tan x & \sec^2 x \\
\ln x & \dfrac{1}{x} & \cot x & -\csc^2 x \\
\log_a x & \dfrac{1}{x \ln a} & \sec x & \sec x \tan x \\
\sinh x & \cosh x & \csc x & -\csc x \cot x \\
\cosh x & \sinh x & \multicolumn{2}{c}{} \\
\bottomrule
\end{tabular}
\section*{Inverse trig derivatives}
\begin{align*}
\frac{d}{dx} \arcsin x &= \frac{1}{\sqrt{1 - x^2}}, &
\frac{d}{dx} \arccos x &= -\frac{1}{\sqrt{1 - x^2}}, & |x| &< 1 \\
\frac{d}{dx} \arctan x &= \frac{1}{1 + x^2}, &
\frac{d}{dx} \arccot x &= -\frac{1}{1 + x^2} \\
\frac{d}{dx} \arcsec x &= \frac{1}{|x|\sqrt{x^2 - 1}}, &
\frac{d}{dx} \arccsc x &= -\frac{1}{|x|\sqrt{x^2 - 1}}, & |x| &> 1
\end{align*}
\section*{Worked examples}
Product and chain rule, $f(x) = x^2 \sin(3x)$:
\begin{align*}
f'(x) &= \frac{d}{dx}\bigl[x^2\bigr] \sin(3x) + x^2 \frac{d}{dx}\bigl[\sin(3x)\bigr] \\
&= 2x \sin(3x) + x^2 \cdot 3\cos(3x) \\
&= 2x \sin(3x) + 3x^2 \cos(3x).
\end{align*}
\noindent Quotient rule, $g(x) = \dfrac{3x - 1}{x^2 + 2}$:
\begin{align*}
g'(x) &= \frac{(x^2 + 2)(3) - (3x - 1)(2x)}{(x^2 + 2)^2} \\
&= \frac{3x^2 + 6 - 6x^2 + 2x}{(x^2 + 2)^2} \\
&= \frac{-3x^2 + 2x + 6}{(x^2 + 2)^2}.
\end{align*}
\end{document}The >{$}l<{$} column type from array wraps every cell in math mode so you do not need dollar signs in the table body, and @{\qquad} puts a wide gap between the two halves of the table. Lining up the inverse trig derivatives in three columns uses align* with extra & pairs; every odd & is an alignment point and every even one is a column gap.
Frequently Asked Questions
What are the basic derivative rules?
Seven rules cover almost everything: the constant rule (a constant differentiates to 0), the constant multiple rule (pull the constant out), the sum and difference rule (differentiate term by term), the power rule d/dx xn = n xn−1, the product rule (fg)′ = f′g + fg′, the quotient rule (f/g)′ = (f′g − fg′)/g2, and the chain rule d/dx f(g(x)) = f′(g(x)) g′(x). Combined with a short table of derivatives of elementary functions, they differentiate any expression built from them.
What are the derivatives of the six trig functions?
sin x → cos x, cos x → −sin x, tan x → sec2 x, cot x → −csc2 x, sec x → sec x tan x, and csc x → −csc x cot x. The three co-functions (cos, cot, csc) all carry a minus sign, and the last four follow from the first two by the quotient rule. All six assume x is in radians.
What are the inverse trig derivatives?
arcsin x → 1/√(1 − x2), arccos x → −1/√(1 − x2), arctan x → 1/(1 + x2), arccot x → −1/(1 + x2), arcsec x → 1/(|x|√(x2 − 1)), and arccsc x → −1/(|x|√(x2 − 1)). Each co-function is the negative of its partner because arcsin x + arccos x = π/2 (and likewise for the other pairs), so the pair's derivatives must sum to zero. The arcsin and arccos ones need |x| < 1, and the arcsec and arccsc ones need |x| > 1.
How do I write d/dx in LaTeX?
In math mode, \frac{d}{dx} gives the Leibniz operator; \frac{df}{dx} or \frac{d}{dx} f(x) applies it to a function, and \frac{d^2 f}{dx^2} is the second derivative. Use \dfrac for full-size fractions in running text, \partial for partial derivatives, f'(x) for Lagrange notation and \dot{x} for Newton notation. The optional physics package shortens all of this to \dv{f}{x} and \pdv{f}{x}.
Next Steps
The rules are the easy part; these guides cover the LaTeX around them:
- Mathematical Expressions in LaTeX – Fractions, roots, inline versus display math and the amsmath environments used above
- Integrals, Sums and Limits – The limit in the definition, partial derivatives and upright differentials
- Math Functions in LaTeX – \sin, \ln, \exp and \DeclareMathOperator for arcsec and friends
- Equation Numbering and Referencing – Number the chain rule and cite it from the text with \eqref
- Multi-line Equations – align, split and gather for step-by-step derivations like the worked examples
- Laplace Transform Table – The transform that turns derivatives into multiplication by s
Free LaTeX Tools
- LaTeX Preview – Paste the document above and see the PDF without installing TeX
- Math to LaTeX – Turn a handwritten derivative into LaTeX
- LaTeX Symbols Reference – Look up \partial, \prime, \infty and every other symbol
Related Articles
Diameter Symbol (⌀): Meaning, ⌀ vs Ø, and How to Type It on Windows, Mac, Word, LaTeX
LaTeX on iPad: How to Write and Compile LaTeX on a Tablet
Dollar Sign ($): How to Type It, Why LaTeX Needs \$, and Other Currency Symbols
Degree Symbol: How to Type ° on Keyboard, Mac, iPhone, Word, LaTeX
Typeset your own calculus notes
Octree is an AI-powered LaTeX editor: paste the document above, ask it to add the hyperbolic inverses or switch to upright d, and see the compiled PDF update as you type.
Try Octree Free →