user
What is the chain rule?
alphonsio

The chain rule is a fundamental technique in calculus used for differentiating compositions of functions. If you have a function y=f(g(x))y = f(g(x)), where ff and gg are both differentiable functions, then the chain rule states:

dydx=f(g(x))g(x)\frac{dy}{dx} = f'(g(x)) \cdot g'(x)
or

ddx(fg(x))=f(g(x))×g(x)\frac{d}{dx} (f \circ g(x)) = f'(g(x)) \times g'(x)

or in Leibniz's notation:

dydx=dydududx\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}


In simpler terms, you differentiate the outer function ff with respect to its inner argument g(x)g(x), then multiply by the derivative of the inner function g(x)g(x):

dydx=f(g(x))g(x)\frac{dy}{dx} = f'(g(x)) \cdot g'(x)

It also states that if you have a function yy that depends on uu, which in turn depends on xx, then the derivative of yy with respect to xx is:

dydx=dydududx\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}

Let the composite function be y=(fg)(x)y = (f \circ g)(x), then the derivative of yy with respect to xx is given by:

ddx(fg(x))=f(g(x))×g(x)\frac{d}{dx} (f \circ g(x)) = f'(g(x)) \times g'(x)

Example of the Chain Rule

Let's look at a simple example: differentiate h(x)=sin(3x2+2)h(x) = \sin(3x^2 + 2).

  1. Identify the outer and inner functions:

    • Outer function f(u)=sin(u)f(u) = \sin(u), where u=g(x)=3x2+2u = g(x) = 3x^2 + 2.
  2. Differentiate the outer function ff with respect to uu:

    • f(u)=cos(u)f'(u) = \cos(u).
  3. Differentiate the inner function g(x)=3x2+2g(x) = 3x^2 + 2:

    • g(x)=6xg'(x) = 6x.
  4. Apply the chain rule:

    • h(x)=f(g(x))g(x)=cos(3x2+2)6xh'(x) = f'(g(x)) \cdot g'(x) = \cos(3x^2 + 2) \cdot 6x.

So, the derivative h(x)=6xcos(3x2+2)h'(x) = 6x \cos(3x^2 + 2).