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)=3x2−4x+1f(x) = 3x^{2} - 4x + 1

f′(x)=6x−4\displaystyle f'(x) = 6x - 4
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→03(x+h)2−4(x+h)+1−(3x2−4x+1)h\begin{aligned} f'(x) &= \lim_{h \to 0}\frac{f(x+h) - f(x)}{h} \\ &= \lim_{h \to 0}\frac{3\left(x + h\right)^{2} - 4\left(x + h\right) + 1 - \left(3x^{2} - 4x + 1\right)}{h} \end{aligned}
  2. Expanding f(x + h)

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

    f(x+h)=3(x+h)2−4(x+h)+1=3x2+6x h+3h2−4x−4h+1\begin{aligned} f(x+h) &= 3\left(x + h\right)^{2} - 4\left(x + h\right) + 1 \\ &= 3x^{2} + 6x\,h + 3h^{2} - 4x - 4h + 1 \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)=6x h+3h2−4hf(x+h) - f(x) = 6x\,h + 3h^{2} - 4h
  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=6x h+3h2−4hh=6x+3h−4\begin{aligned} \frac{f(x+h) - f(x)}{h} &= \frac{6x\,h + 3h^{2} - 4h}{h} \\ &= 6x + 3h - 4 \end{aligned}
  5. Letting h tend to 0

    Every term that still contains hh vanishes in the limit.

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

    The derivative of 3x2−4x+13x^{2} - 4x + 1 is 6x−46x - 4.

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

Points on the graph

  • y = 3x^2 - 4x + 1: zero (0.333333, 0)
  • y = 3x^2 - 4x + 1: zero (1, 0)
  • y = 3x^2 - 4x + 1: minimum (0.666667, -0.333333)

Worked examples