Jorge Valle

Jorge Valle

Jorge Valle is a front end developer with a particular passion for, and expertise in, JavaScript and user interfaces. Lately, he's also been diving into machine learning.

The product rule in differential calculus

The product rule is one of the differentiation rules we can use for finding derivatives. It's useful when we have two functions being multiplied together.

For example, let's say we have a function $h$, which multiplies $f$ and $g$.

$$ h(x) = f(x) g(x) $$
Figure 1: A function which multiplies two functions.

These functions are themselves polynomial expressions, defined as follows.

$$ f(x) = 3x^2 + 5x \\ g(x) = 10x - 3x^3 $$
Figure 2: The polynomials in question.

$h$ is therefore the product of $f$ and $g$, and we can express it as follows.

$$ h(x) = (3x^2 + 5x) (10x - 3x^3) $$
Figure 3: Plugging in the two functions.

Ok, now what happens when we want to find the derivative of $h$? The product rule states that, in this case, the derivative of h will be the derivative of f times g, plus the derivative of g plus f.

$$ h'(x) = f'(x) g(x) + f(x) g'(x) $$
Figure 4: The product rule in action.

We can then start by first differentiating our $f$ and $g$, mostly by using the power rule.

$$ \begin{align} f'(x) & = (3x^2 + 5x)' \\ & = 6x + 5 \\ g'(x) & = (10x - 3x^3)' \\ & = 10 - 9x^2 \end{align} $$
Figure 5: Differentiating the functions.

Once these are found, we can just swap in the functions and derivatives, and come up with the expression for the derivative of the parent function $h$.

$$ \begin{align} h'(x) & = (6x + 5) (10x - 3x^3) + (10 - 9x^2) (3x^2 + 5x) \end{align} $$
Figure 6: The result of applying the rule.

Books, patrons and coffee in Caffè San Marco, Trieste