Derivative of y = x^2

So far the slopes have been constant: a flat line gives 0, and the line y = x gives 1. Now we meet a curve:

f(x) = x^2

The parabola is gentle near the bottom and steep on the sides — so its slope can't be a single number any more. It must change as x changes. Let's find exactly how.

Work out the difference quotient

Feed f(x) = x^2 into the difference quotient and expand (x+h)^2 = x^2 + 2xh + h^2:

\frac{(x+h)^2 - x^2}{h} = \frac{x^2 + 2xh + h^2 - x^2}{h} = \frac{2xh + h^2}{h} = 2x + h

The x^2 terms cancel, and a factor of h divides out of what's left, leaving 2x + h. Now shrink the step: as h \to 0 the leftover h vanishes, and we're left with the slope of the curve itself.

\frac{d}{dx}\bigl[\,x^2\,\bigr] = 2x

Watch the slope double

The derivative 2x says the slope is exactly twice the x-value. At x = 1 the tangent has slope 2; at x = 3 it's 6; at x = 0 it's flat. Slide the point along the parabola and watch the tangent line tip over — its slope reads 2x at every spot.

See it together

The curve f(x) = x^2 on the left; its derivative f'(x) = 2x — a straight line through the origin with slope 2 — on the right. Notice the derivative is negative where the parabola falls, zero at the bottom, and positive where it rises.