Building blocks

## A certain perspective

In the Problem section, we found out that the derivative of $(ax+b)(cx+d)$ is $a(cx+d)+c(ax+b)$. It turns out that we can use this result to differentiate the product of any two functions, and in this section, we explore how to do so.

Our key question is:

What is the derivative of the product $h(x)=f(x)g(x)$ for any functions $f$ and $g$?

We will find the derivative of $h(x)$ at the point $x=x_0$.

In A tangent is…, we saw that we can locally approximate any function by a straight line (so long as we avoid any points where the gradient is not well defined). So near $x_0$, $f(x)\approx ax+b$ for some $a$ and $b$.

We can find $a$ and $b$ by matching the gradients and $y$-values: $f'(x_0)=a \quad\text{and}\quad f(x_0)=ax_0+b$ Likewise, near $x_0$, $g(x)\approx cx+d$ where $c$ and $d$ are such that $g'(x_0)=c$ and $g(x_0)=cx_0+d$.

So near $x_0$, we have $h(x)=f(x)g(x)\approx (ax+b)(cx+d)$, so using the rule we found out, we see that the derivative of $h(x)$ at $x_0$ is $a(cx_0+d)+c(ax_0+b)$. Substituting in our values for $a$, $b$, $c$ and $d$, we find $h'(x_0)=f'(x_0)g(x_0)+g'(x_0)f(x_0).$ So in general, $h'(x)=f'(x)g(x)+g'(x)f(x).$

An alternative notation which is commonly used is to write $u=f(x)$ and $v=g(x)$. Then we have $\frac{d}{dx}(uv)=u\frac{dv}{dx}+v\frac{du}{dx}.$