Derivative From First Principles Calculator

Type a polynomial, 1/x or sqrt(x) to differentiate from first principles.

Use x. Type powers with ^, and functions with brackets: sin(x), e^(2x), ln(x), sqrt(x).

Try

Result

You enteredf(x)=x2f(x) = x^{2}

f′(x)=2x\displaystyle f'(x) = 2x
Show the work
  1. Definition of the derivative

    The derivative is the slope of the tangent: the limit of the slope of a chord of width hh as hh shrinks to 0.

    f′(x)=lim⁡h→0f(x+h)−f(x)h=lim⁡h→0(x+h)2−x2h\begin{aligned} f'(x) &= \lim_{h \to 0}\frac{f(x+h) - f(x)}{h} \\ &= \lim_{h \to 0}\frac{\left(x + h\right)^{2} - x^{2}}{h} \end{aligned}
  2. Expanding f(x + h)

    Replace xx by x+hx + h and multiply out.

    f(x+h)=(x+h)2=x2+2x h+h2\begin{aligned} f(x+h) &= \left(x + h\right)^{2} \\ &= x^{2} + 2x\,h + h^{2} \end{aligned}
  3. Subtracting f(x)

    Take away f(x)f(x); every term that has no hh in it cancels.

    f(x+h)−f(x)=2x h+h2f(x+h) - f(x) = 2x\,h + h^{2}
  4. Dividing by h

    Every term that is left has a factor hh, so dividing by hh is exact.

    f(x+h)−f(x)h=2x h+h2h=2x+h\begin{aligned} \frac{f(x+h) - f(x)}{h} &= \frac{2x\,h + h^{2}}{h} \\ &= 2x + h \end{aligned}
  5. Letting h tend to 0

    Every term that still contains hh vanishes in the limit.

    f′(x)=lim⁡h→0(2x+h)=2x\begin{aligned} f'(x) &= \lim_{h \to 0}\left(2x + h\right) \\ &= 2x \end{aligned}
  6. Result

    The derivative of x2x^{2} is 2x2x.

    f′(x)=2xf'(x) = 2x
Drag to pan. Scroll or pinch to zoom. Arrow keys pan and + / − zoom when the graph has focus.
  • y = x^2

Points on the graph

  • y = x^2: zero (0, 0)
  • y = x^2: minimum (0, 0)

Worked examples