If h(x) = f(x)g(x) for all x, the nth derivative of h is given by
where the coefficients are binomial coefficients.
For example, to find h(8)(x), when h(x) = x2 sin x, let f(x) = x2 and g(x) = sin x. Then f′(x) = 2x and f″(x) = 2, with higher derivatives being zero; and g(8)(x) = sinx, g(7)(x) = −cosx and g(6) (x) = −sinx. So