calculus

Derivatives Explained: From Definition to Practical Calculation

A clear, step-by-step introduction to derivatives — the limit definition, core differentiation rules, and how to apply them with a free AI derivative calculator.
AI-Math Editorial Team

By AI-Math Editorial Team

Published 2026-05-01

Calculus has a reputation for being intimidating, but the central idea behind a derivative is actually simple: how fast is something changing? This guide builds derivatives from scratch — first as a geometric idea, then as a precise definition, and finally as a toolbox of rules you can apply mechanically. By the end you should be able to differentiate any polynomial, exponential, or trigonometric function on paper, and check your work with our free Derivative Calculator.

What is a derivative, intuitively?

Imagine driving a car. Your speedometer shows your instantaneous speed — how fast your position is changing right now. That is exactly what a derivative captures: the rate of change of one quantity with respect to another at a single instant.

Geometrically, the derivative of f(x)f(x) at the point x0x_0 is the slope of the tangent line to the curve y=f(x)y = f(x) at x=x0x = x_0. Steep slope means fast change; flat slope means slow change; zero slope means a momentary peak, valley, or pause.

The limit definition

The formal definition uses a limit because we are asking what slope you get as the gap between two points shrinks to zero:

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

You start with the slope of a secant line between (x,f(x))(x, f(x)) and (x+h,f(x+h))(x+h, f(x+h)), then squeeze hh down toward 00. The limit (when it exists) is the tangent slope.

Worked example with the limit definition

Find the derivative of f(x)=x2f(x) = x^2 from first principles.

  1. Compute f(x+h)=(x+h)2=x2+2xh+h2f(x+h) = (x+h)^2 = x^2 + 2xh + h^2.
  2. Form the difference quotient: f(x+h)f(x)h=2xh+h2h=2x+h\frac{f(x+h) - f(x)}{h} = \frac{2xh + h^2}{h} = 2x + h.
  3. Take the limit as h0h \to 0: f(x)=2xf'(x) = 2x.

So the slope of y=x2y = x^2 at any xx is just 2x2x — at x=3x = 3 the slope is 66, at x=1x = -1 the slope is 2-2, at x=0x = 0 the slope is 00 (the parabola's vertex).

The four rules you actually use

Doing every derivative from the limit definition would be exhausting. Instead, mathematicians proved a small set of rules once and for all; you just apply them mechanically.

1. Power rule

For any real exponent nn:

ddx(xn)=nxn1\frac{d}{dx}(x^n) = nx^{n-1}

Examples: ddx(x5)=5x4\frac{d}{dx}(x^5) = 5x^4, ddx(x1/2)=12x1/2\frac{d}{dx}(x^{1/2}) = \frac{1}{2}x^{-1/2}, ddx(1/x)=ddx(x1)=x2\frac{d}{dx}(1/x) = \frac{d}{dx}(x^{-1}) = -x^{-2}.

2. Sum, difference, and constant multiples

ddx(cf(x)±g(x))=cf(x)±g(x)\frac{d}{dx}\bigl(c \cdot f(x) \pm g(x)\bigr) = c \cdot f'(x) \pm g'(x)

Differentiation is linear: handle each term independently and pull constants out front.

3. Product rule

ddx(f(x)g(x))=f(x)g(x)+f(x)g(x)\frac{d}{dx}\bigl(f(x) g(x)\bigr) = f'(x) g(x) + f(x) g'(x)

Two functions multiplied? Take turns differentiating each.

4. Chain rule

The chain rule handles compositions f(g(x))f(g(x)):

ddxf(g(x))=f(g(x))g(x)\frac{d}{dx}f(g(x)) = f'(g(x)) \cdot g'(x)

In words: differentiate the outer function evaluated at the inner function, then multiply by the derivative of the inner. The chain rule is by far the most common source of mistakes — every time you see a function inside another function, slow down.

A complete worked example

Differentiate h(x)=(3x2+1)4h(x) = (3x^2 + 1)^4.

  1. The outer function is u4u^4 (with u=3x2+1u = 3x^2 + 1). Its derivative w.r.t. uu is 4u34u^3.
  2. The inner function is 3x2+13x^2 + 1. Its derivative is 6x6x.
  3. Apply the chain rule: h(x)=4(3x2+1)36x=24x(3x2+1)3h'(x) = 4(3x^2 + 1)^3 \cdot 6x = 24x(3x^2 + 1)^3.

If you tried to expand (3x2+1)4(3x^2 + 1)^4 first, you would burn five minutes of algebra; the chain rule does it in three lines.

Common derivatives worth memorising

FunctionDerivative
sin(x)\sin(x)cos(x)\cos(x)
cos(x)\cos(x)sin(x)-\sin(x)
tan(x)\tan(x)sec2(x)\sec^2(x)
exe^xexe^x
ln(x)\ln(x)1/x1/x
axa^xaxln(a)a^x \ln(a)

These five are non-negotiable for any STEM student — flashcards work.

Common mistakes

  • Forgetting the chain rule: ddxsin(2x)=2cos(2x)\frac{d}{dx}\sin(2x) = 2\cos(2x), not cos(2x)\cos(2x).
  • Treating constants as variables: ddx(π2)=0\frac{d}{dx}(\pi^2) = 0, not 2π2\pi. π\pi is a number.
  • Dropping notation: writing ff' instead of f(x)f'(x) when you need to plug in a value later — keep the xx visible until the last moment.
  • Mis-bracketing: ddx(sinx)2\frac{d}{dx}(\sin x)^2 vs ddxsin(x2)\frac{d}{dx}\sin(x^2) are different functions. Parentheses save lives.

Where to go next

Once you are comfortable differentiating, the natural next steps are:

  • Implicit differentiation: differentiating equations like x2+y2=25x^2 + y^2 = 25 where yy is a function of xx but not given explicitly.
  • Related rates: applying derivatives to real-world rates of change (a ladder sliding down a wall, water filling a cone).
  • Optimisation: using derivatives to find maxima and minima of functions.
  • Integrals: the reverse operation, recovering ff from ff' — see our Integral Calculator.

Try it yourself

Type any function into the Derivative Calculator and you'll get the step-by-step derivation shown above. Want a sanity check on a homework answer at midnight? It is free and requires no signup.

For deeper related material, see:

AI-Math Editorial Team

By AI-Math Editorial Team

Published 2026-05-01

A small team of engineers, mathematicians, and educators behind AI-Math, focused on making step-by-step math help accessible to every student.