The rule
d/dx c = 0
c is any number that does not depend on x: 7, −2, π², or a letter such as a that stands for a fixed number. Its graph is a horizontal line, and a horizontal line has slope 0 everywhere.
Worked examples
- d/dx 7 = 0
- d/dx π² = 0. π² is a number, even though it looks like something to differentiate.
- f(x) = x² + 5 gives f′(x) = 2x + 0 = 2x, with the sum rule.
- f(x) = 4x − 9 gives f′(x) = 4.
What it means for graphs
Adding a constant moves a graph up or down and does not change its slope. That is why y = x², y = x² + 5 and y = x² − 3 all have the derivative 2x, and why integrating needs a +C going the other way (antiderivative of a constant).
Common mistakes
- Writing d/dx 5 = 5. The derivative of 5 is 0. The derivative of 5x is 5, which is a different function (see the constant factor rule).
- Treating a parameter as a variable. In f(x) = ax² the letter a is a constant factor, so f′(x) = 2ax.
- Keeping the constant after differentiating. A term without x leaves no trace in f′.
Common questions
Why is the slope of a horizontal line 0?
The rate of change is the change in y divided by the change in x. For a constant the change in y is 0 for
every change in x, so the quotient is 0, and so is its limit.