= Chain Rule = The '''chain rule''' is an approach for [[Calculus/Derivative|differentiating]] a composition of functions. <> ---- == Description == Given a function defined like ''f(x) = g(h(x))'', the derivative of ''f'' is ''g'(h(x)) h'(x)''. Sometimes this is notated as ''f = g ∘ h'' and ''f' = (g' ∘ h)h' ''. Equivalently, consider: {{attachment:notation1.svg}} {{attachment:notation2.svg}} === Multivariate === A notation for [[Calculus/PartialDerivative|partial derivatives]] will be used such that ''a,,b,, = ∂a/∂b''. Given a multivariate composition like ''f(g,h)'' where ''g = g(x,y)'' and ''h = h(x,y)'', the [[Calculus/Differential|total differential]] demonstrates that: ''df = f,,g,,dg + f,,h,,dh'' ''df = f,,g,,(g,,x,,dx + g,,y,,dy) + f,,h,,(h,,x,,dx + h,,y,,dy)'' ''df = f,,g,,g,,x,,dx + f,,g,,g,,y,,dy + f,,h,,h,,x,,dx + f,,h,,h,,y,,dy'' ''df = (f,,g,,g,,x,, + f,,h,,h,,x,,)dx + (f,,g,,g,,y,, + f,,h,,h,,y,,)dy'' Clearly then ''f,,g,,g,,x,, + f,,h,,h,,x,, = f,,x,,'' and ''f,,g,,g,,y,, + f,,h,,h,,y,, = f,,y,,''. Equivalently, consider: {{attachment:notation3.svg}} ---- == Usage == [[Economics/DemandCurve#Point_Elasticity|Point elasticity]] is defined as: {{attachment:elasticity1.svg}} It can be simplified using the chain rule into: {{attachment:elasticity2.svg}} Start with the final formulation and use ''u''- and ''v''-substitution: {{attachment:substitution1.svg}} Note in particular that the equation for ''v'' can be rewritten in terms of ''P'': {{attachment:substitution2.svg}} Now the final formulation can be rewritten as: {{attachment:substitution3.svg}} Several of these terms are trivial to derive. The derivative of ''e'' to an exponent is itself, so the derivative of ''P = e^v^'' with respect to ''v'' is ''P''. The derivative of a natural logarithm of some variable is 1 over that variable, so the derivative of ''u = ln Q'' with respect to ''Q'' is ''1/Q''. This leaves the equation as: {{attachment:substitution4.svg}} ---- CategoryRicottone