MathNana Learn with wisdom

Method · Calculus

How to Differentiate: Step by Step

Differentiation is a decision procedure. Look at the shape of the expression, and the shape tells you which rule to reach for.

7 min read Updated 2026-08-21 Checked by Aziza Smailovic

Read the shape first

Knowing how to differentiate is mostly knowing which rule the expression in front of you calls for. Before writing anything, ask what the outermost operation is.

The expression isShapeRule
a sum or differenceu + vdifferentiate term by term
a number times somethingk · uthe number stays, differentiate u
a power of xxⁿpower rule
one function inside anotherf(g(x))chain rule
two functions multipliedu · vproduct rule
one function over anotheru / vquotient rule

The outermost operation is the one to act on. In x²·sin(3x) the outermost thing is a product, so the product rule comes first — and the chain rule appears later, inside it, when sin(3x) has to be differentiated.

The power rule and constant multiples

For xⁿ, multiply by the exponent and reduce it by one. A constant multiplier simply waits outside.

3x⁵ − 4x + 7worked example
  1. 3x⁵ − 4x + 7a sum, so differentiate term by term
  2. 15x⁴ − 4 + 0power rule on each; the constant differentiates to zero
  3. 15x⁴ − 4tidy up

The power rule works for every exponent, not only positive whole ones. x⁻² gives −2x⁻³, and √x, written x^½, gives ½x^−½ — which is 1/(2√x).

The chain rule: the one people forget

When one function sits inside another, differentiate the outside as usual and then multiply by the derivative of the inside. That final multiplication is the whole rule, and leaving it out is the most common error in early calculus.

sin(2x)worked example
  1. sin(2x)a sine with 2x inside it
  2. cos(2x)differentiate the outside, leaving the inside alone
  3. cos(2x) · 2multiply by the derivative of the inside
  4. 2cos(2x)tidy up

It nests. For sin(cos(x²)) you work outward to inward, multiplying by each inside derivative in turn — three factors, one for each layer.

The product rule

For two functions multiplied, differentiate each in turn and add the two results: (uv)′ = u′v + uv′.

x² sin xworked example
  1. u = x², v = sin xname the two factors
  2. u′ = 2x, v′ = cos xdifferentiate each
  3. 2x sin x + x² cos xu′v + uv′

The rule is not (uv)′ = u′v′, which is the tempting shortcut and is wrong. Check it on x·x: the correct answer is 2x, while multiplying the derivatives gives 1.

A constant multiplier does not need the product rule. In 3sin x the 3 is not a function of x, so it simply stays where it is.

The quotient rule

For one function over another: (u/v)′ = (u′v − uv′) / v². The order in the numerator matters, because subtraction is not symmetric.

cos x / xworked example
  1. u = cos x, v = xtop and bottom
  2. u′ = −sin x, v′ = 1differentiate each
  3. (−x sin x − cos x) ÷ x²(u′v − uv′) / v²

You can avoid it entirely when the denominator is a simple power: x⁻² is easier to differentiate than 1/x². Rewriting first is often quicker than applying the rule.

Notation, and finishing the job

Two notations for the same operation. f′(x) is compact; dy/dx names both variables and is clearer when it matters what is changing with respect to what — which it does whenever the derivative represents a rate of change of one measured quantity against another.

Whichever you use, simplify the result before stopping. A derivative left as x · (1/x) + ln x is correct and unusable; ln x + 1 is the form you can set equal to zero to find a stationary point.

Putting them together

Real expressions need several rules, applied from the outside inward. The general name for one function wrapped around another is a composite function, and it is the inside function whose derivative the chain rule asks you to multiply by.

x² sin(3x)worked example
  1. x² · sin(3x)outermost operation is a product
  2. 2x sin(3x) + x² · [sin(3x)]′product rule first
  3. [sin(3x)]′ = 3cos(3x)now the chain rule, inside
  4. 2x sin(3x) + 3x² cos(3x)put it together

Work outward to inward and finish one rule before starting the next. Trying to apply two at once is where long derivatives go wrong.

Questions about how to differentiate

How do I know which rule to use?

Look at the outermost operation. A sum means term by term, a product means the product rule, a quotient means the quotient rule, and a function inside another means the chain rule.

When exactly does the chain rule apply?

Whenever anything other than a bare x sits inside a function or under a power. sin(2x), (x + 1)³ and e^(x²) all need it; sin x does not.

Is (uv)′ the same as u′v′?

No. The product rule is u′v + uv′. Multiplying the derivatives gives the wrong answer — test it on x·x, where the answer is 2x, not 1.

Can I avoid the quotient rule?

Often. If the denominator is a simple power, rewrite it with a negative exponent and use the power rule instead — 1/x² becomes x⁻², which differentiates in one step.