Product, Quotient & Chain Rule
The three rules that turn any combination of standard functions into its derivative: product, quotient, and chain. The everyday workhorse of GATE Calculus.
What you'll learn
- The core derivatives: xⁿ, eˣ, ln x, sin x, cos x — memorise these cold
- Product rule `(fg)' = f'g + fg'` and quotient rule `(f/g)' = (f'g − fg')/g²`
- Chain rule `(f(g(x)))' = f'(g(x))·g'(x)` — differentiate the outer, then multiply by the inner derivative
- Combining the three rules on a single expression, term by term
Before you start
The last lesson ended with a wish for shortcuts — some compact set of rules that hands you a
derivative in seconds, without grinding the limit (f(a+h) − f(a))/h by hand every single
time. Those shortcuts exist, and there are remarkably few of them. You already know what a
derivative is: the slope of the tangent, the instantaneous rate of change. This lesson is
about the mechanics — when an expression is messy and built from simpler pieces, how do you
read its slope off without returning to first principles?
Three rules cover almost everything GATE will throw at you — product, quotient, and chain — and they rest on a handful of standard derivatives you keep in memory. Learn the patterns once, and the rest is honest bookkeeping.
The building blocks
Before the rules, you must know the derivatives of the standard functions cold. These are the atoms; the rules are only ways of combining them.
In words: d/dx(xⁿ) = n·xⁿ⁻¹, d/dx(eˣ) = eˣ, d/dx(ln x) = 1/x, d/dx(sin x) = cos x, and
d/dx(cos x) = −sin x. Note the minus sign on cosine — it is the single most-forgotten
detail on this whole topic. Commit these five to memory, because every rule below is just a
recipe for combining them.
The product rule
When two functions are multiplied, you cannot simply multiply their derivatives. Instead, differentiate one factor at a time and add:
(f · g)' = f'·g + f·g'
Differentiate the first, keep the second; then keep the first, differentiate the second; sum the two. Memorisable as “deriv-of-first times second, plus first times deriv-of-second.”
The quotient rule
For a ratio f/g, the pattern is similar but carries a subtraction and a squared
denominator:
( f / g )' = ( f'·g − f·g' ) / g²
The numerator is f'g − fg' — low-d-high minus high-d-low, all over the bottom
squared. Order is everything: the term with f' (derivative of the top) comes first,
and the second term is subtracted. Swap them and the whole sign flips.
The chain rule
The chain rule handles a function inside another function — a composition like
sin(3x²). Differentiate from the outside in, then multiply by the derivative of the
inside:
( f(g(x)) )' = f'(g(x)) · g'(x)
Think of nested layers: peel the outer function (differentiate it, leaving the inside untouched), then multiply by the derivative of the next layer in. Each layer you peel contributes exactly one factor.
How GATE asks this
A NAT or MCQ hands you a function built from the standard pieces and asks for its
derivative — either the symbolic form (MCQ: pick the correct expression) or the derivative
evaluated at a point (NAT: a single number). The function is deliberately a combination,
so you must first spot which rule (or rules) applies: a product like x²eˣ, a composition
like sin(3x²), or a ratio like x/(x+1). The skill tested is selecting and applying the
right rule cleanly — there is no trick beyond the bookkeeping.
Worked example — applying each rule
(1) Product rule — differentiate h(x) = x² · eˣ.
Here f = x² (so f' = 2x) and g = eˣ (so g' = eˣ):
h'(x) = f'·g + f·g'
= (2x)·eˣ + (x²)·eˣ
= (2x + x²) eˣ
(2) Chain rule — differentiate sin(3x²).
Outer is sin(u) with u = 3x². The outer derivative is cos(u) = cos(3x²); the inner
derivative is d/dx(3x²) = 6x. Multiply:
d/dx sin(3x²) = cos(3x²) · 6x = 6x · cos(3x²)
The 6x is the inner-derivative factor — drop it and the answer is wrong. That missing factor
is exactly what the predict-prompt was fishing for.
(3) Quotient rule — differentiate (x) / (x + 1).
Top f = x (so f' = 1), bottom g = x + 1 (so g' = 1):
d/dx x/(x+1) = ( f'·g − f·g' ) / g²
= ( 1·(x+1) − x·1 ) / (x+1)²
= ( x + 1 − x ) / (x+1)²
= 1 / (x+1)²
The numerator collapses to 1, leaving 1/(x+1)² — always positive, which fits the fact that
x/(x+1) is increasing everywhere it is defined.
A question to carry forward
One derivative gives you the slope at a point — the best straight-line fit to the curve right
there. But a straight line is a crude stand-in for a bending curve; step away from the point
and it drifts off. Now suppose you did not stop at the first derivative. Suppose you also took
the second (which measures the bend), the third, and onward, all evaluated at that one
point. Here is the thread onward: could those higher derivatives, stacked together, let you
rebuild the entire curve nearby as a polynomial — turning a frightening function like eˣ or
sin x into something you can add and multiply by hand?
In one breath
- Know the atoms cold:
(xⁿ)' = n xⁿ⁻¹,(eˣ)' = eˣ,(ln x)' = 1/x,(sin x)' = cos x,(cos x)' = −sin x(mind the minus). - Product:
(fg)' = f'g + fg'. - Quotient:
(f/g)' = (f'g − fg')/g²— top-derivative first, then subtract, over bottom squared. - Chain:
(f(g(x)))' = f'(g(x))·g'(x)— peel outward, one factor per layer; it is backprop. - Two classic slips: dropping the chain’s inner factor (
6xin6x·cos(3x²)) and flipping the quotient’s order/sign.
Practice
Quick check
Practice this in an interview
All questionsBackpropagation is the algorithm that computes the gradient of the loss with respect to every parameter by applying the chain rule layer by layer in reverse. It turns a single backward pass through the computation graph into exact gradients for all weights simultaneously.
Backpropagation computes the gradient of the loss with respect to every parameter by applying the chain rule backward through the network, reusing intermediate results from the forward pass. These gradients are then used by an optimizer to update the weights via gradient descent.