Constant rule

A quantity that never changes has no rate of change.

\[\frac{d}{dx}c = 0\]

What it says

A derivative measures how fast something changes as \(x\) moves. A constant — \(5\), \(\pi\), \(\ln 7\) — has the same value at every \(x\), so it does not change at all, and its derivative is zero.

From the definition: if \(f(x) = c\) then the difference quotient is \(\frac{c - c}{h} = 0\) for every \(h \neq 0\), so the limit as \(h \to 0\) is \(0\). Geometrically, \(y = c\) is a horizontal line, and a horizontal line has slope zero everywhere.

The word "constant" always means constant with respect to the variable you are differentiating. In \(\frac{d}{dx}\left[ax\right]\) the symbol \(a\) is a constant; in \(\frac{d}{da}\left[ax\right]\) it is the variable and \(x\) is the constant.

When it applies

  • The expression contains no occurrence of the differentiation variable at all.
  • A numeric literal, a named constant such as \(\pi\) or \(e\), or any arithmetic combination of them.
  • A symbol other than the differentiation variable: \(a\), \(k\) and \(c\) are all constants with respect to \(x\).

Five worked examples

Every line is the step the calculator would show, in the order it applies them. Each graph is live: hover it to read both curves and see the tangent whose slope is the derivative, drag to pan, scroll to zoom.

Example 1
\[\frac{d}{dx}\left[5\right]\]
  1. The expression contains no \(x\), so its value is the same for every \(x\).

    \[\frac{d}{dx}\left[5\right] = 0\]
Answer
\[0\]

f is a horizontal line at 5 and f′ lies flat along the axis. Move anywhere along x and the height never changes, so there is no rate of change to report. Hover at any point and the f′ readout stays at 0.

The graph is the horizontal line \(y = 5\): slope zero everywhere.

Open 5 in the calculator
Example 2
\[\frac{d}{dx}\left[\pi\right]\]
  1. \(\pi\) is a fixed number, roughly \(3.14159\), not a function of \(x\).

    \[\frac{d}{dx}\left[\pi\right] = 0\]
Answer
\[0\]

The same pair, a little above 3. Only the height of f has changed; f′ is still the zero line.

A name instead of digits changes nothing — what matters is that the value never moves.

Open pi in the calculator
Example 3
\[\frac{d}{dx}\left[\ln\left(7\right)\right]\]
  1. The logarithm is applied to a number, not to \(x\), so the whole expression is one fixed value.

    \[\ln 7 \approx 1.9459\]
  2. A fixed value has derivative zero.

    \[\frac{d}{dx}\left[\ln 7\right] = 0\]
Answer
\[0\]

f sits at about 1.95, the value of \(\ln 7\), and f′ is again flat at zero — there is no x anywhere in the expression.

Complicated-looking constants are still constants. Check whether \(x\) appears anywhere before reaching for a function rule.

Open ln(7) in the calculator
Example 4
\[\frac{d}{dx}\left[x^{0}\right]\]
  1. Simplify first: any nonzero base raised to the power \(0\) is \(1\).

    \[x^{0} = 1\]
  2. Now the constant rule applies.

    \[\frac{d}{dx}\left[1\right] = 0\]
Answer
\[0\]

The expression simplifies to 1 before it is drawn, so f is the line \(y = 1\) and f′ is zero.

A common slip is to apply the power rule and write \(0 \cdot x^{-1}\). The answer happens to agree away from \(x = 0\), but the honest route is to simplify to \(1\) first.

Open x^0 in the calculator
Example 5
\[\frac{d}{dx}\left[\sqrt{2} x\right]\]
  1. \(\sqrt{2}\) is a constant factor, so it comes out in front — that is the constant multiple rule.

    \[\frac{d}{dx}\left[\sqrt{2}\,x\right] = \sqrt{2}\;\frac{d}{dx}\left[x\right]\]
  2. The variable rule finishes it.

    \[= \sqrt{2}\cdot 1 = \sqrt{2}\]
Answer
\[\sqrt{2}\]

The first sloping line in this set: f rises about 1.41 units for every unit across, and f′ is a horizontal line at that height.

A constant standing alone vanishes; a constant multiplying a function survives. Those are two different rules.

Open sqrt(2) x in the calculator

Watch out for

  • A derivative of \(0\) is not "no derivative" — the derivative exists and its value is zero.
  • Only a standalone constant term disappears. A constant factor is kept by the constant multiple rule.
  • Whether something is constant depends on the variable: \(\frac{d}{dx}\left[t^{2}\right] = 0\), but \(\frac{d}{dt}\left[t^{2}\right] = 2t\).