practicecalculus
Powers, roots and polynomials

Derivative of x: Formula, Proof and Examples

The derivative of x is 1. See why with the limit definition and the power rule, plus derivatives of 5x, ax + b and x with respect to other variables.

Powers, roots and polynomials Updated 2 min read

At a glance

\frac{d}{dx}\,x = 1
Derivative
1 for every real x
Multiple of x
\dfrac{d}{dx}(ax) = a
Linear function
\dfrac{d}{dx}(ax + b) = a
Power rule view
x = x^1, so the derivative is 1 \cdot x^0 = 1
Integral version
\int x\,dx = \frac{x^2}{2} + C
On this page
  1. Graph of x and its derivative
  2. Proof from the limit definition
  3. Proof from the power rule
  4. Multiples and linear functions
  5. Worked examples
  6. Common mistakes

The derivative of x is 1. The function y = x is a straight line with slope 1, and the derivative of a line is just its slope.

\frac{d}{dx}\,x = 1

Graph of x and its derivative

Graph of y = x and its derivative y = 1
The line y = x has the same slope everywhere, so its derivative is the flat line y = 1.

Because the slope never changes, the derivative is a constant. Pick any two points on the line: the rise always equals the run.

Proof from the limit definition

The limit definition of the derivative says

f'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}

With f(x) = x:

f'(x) = \lim_{h \to 0} \frac{(x + h) - x}{h} = \lim_{h \to 0} \frac{h}{h} = \lim_{h \to 0} 1 = 1

The h cancels before you ever take the limit, so there is nothing tricky to resolve.

Proof from the power rule

Write x as x^1. The power rule says to bring the exponent down and lower it by one:

\frac{d}{dx}\,x^1 = 1 \cdot x^0 = 1

This uses x^0 = 1, which is fine for every x \ne 0, and the limit proof covers x = 0 too.

Multiples and linear functions

With the constant multiple rule and the constant rule, every linear function is easy:

Function Derivative
5x 5
-x -1
\frac{x}{3} \frac{1}{3}
3x - 7 3
\pi x + e \pi

The derivative of a line y = mx + b is always m, its slope. The intercept b only shifts the line up or down, so it does not affect how steep it is. See the derivative of a constant for why the b drops out.

Worked examples

Example 1: a sum. Differentiate f(x) = x^2 + 4x - 9:

f'(x) = 2x + 4

The 4x term contributes 4 and the -9 contributes 0. The x^2 term uses the derivative of x².

Example 2: a product check. Write x^2 = x \cdot x and use the product rule:

\frac{d}{dx}(x \cdot x) = 1 \cdot x + x \cdot 1 = 2x

This matches the power rule, which is a good sanity check.

Example 3: a different variable. In \frac{d}{dt}(xt), where x does not depend on t, treat x as a constant: the answer is x.

Common mistakes

  1. Answering 0. Only constants have derivative 0. The function x changes, so its derivative is 1.
  2. Writing x as the answer. The derivative of x is not x. That is true for e^x, not for x.
  3. Keeping the constant term. \frac{d}{dx}(3x + 7) = 3, not 3 + 7 or 10.

The reverse question, \int x\,dx = \frac{x^2}{2} + C, is on the integral of x page. For drills, try the power rule practice problems.

Practice it now

The power rule

Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.

Practice this lesson

Frequently asked questions

What is the derivative of x?

The derivative of x with respect to x is 1. The graph y = x is a straight line that rises 1 unit for every 1 unit to the right.

What is the derivative of 2x?

It is 2. By the constant multiple rule, \frac{d}{dx}(2x) = 2 \cdot \frac{d}{dx}x = 2 \cdot 1 = 2.

Why is the derivative of x not 0?

A derivative of 0 means the function is flat. The line y = x is not flat: it climbs with slope 1. Only constants, like 7 or \pi, have derivative 0.

What is the derivative of x with respect to y?

If x and y are independent, \frac{d}{dy}\,x = 0. If x depends on y, the answer is \frac{dx}{dy}, which is \frac{1}{dy/dx} when dy/dx \ne 0.

Written by the PracticeCalculus team

We build interactive calculus lessons and write every page to be clear and correct. Spotted something off? Tell us and we will fix it.