Can you find …

- … functions \(f(x)\) and \(g(x)\) so that \(f(g(x))\) has stationary points when \(x=-1\) and \(x=5\)?

The chain rule tells us that the derivative of \(f(g(x))\) is the product of \(f'(g(x))\) and \(g'(x)\), provided these are defined. How can we ensure \(f'(g(x))g'(x)=0\) at \(x=-1\) and \(x=5\)?

Note first that we could let \(f(x)\) or \(g(x)\) be the identity function and then try to ensure that either \(g(x)\) or \(f(x)\) has stationary points at \(x=-1\) and \(x=5.\) How could we do this?

We could let \(g'(x)=(x+1)(x-5)\), so that \(g(x)=\tfrac{1}{3}x^{3}-2x^{2}-5x+c\) where \(c\) is a constant. Changing \(c\) or rescaling parallel to the \(y\)-axis doesn’t change the \(x\)-values of the stationary points, so we could let \(g(x)=x^3-6x^2-15x\) instead.

We could also think about repeated roots of polynomials. For example, if we let \(g(x)=(x+1)^{2}(x-5)^2\) then we don’t have to integrate or differentiate anything.

At this point we may have to consider our interpretation of the problem. Do we only want stationary points at \(x=-1\) and \(x=5\) or will we allow others?

So far we have found functions that could be composed with the identity function. But what if we let \(g(x)\) be one of these and compose it with, say, \(f(x)=x+1\), \(f(x)=x^2\), \(f(x)=e^{x}\) or \(f(x)=\sin x\)? Is the composition \(f(g(x))\) defined and where are its stationary points?

Here are more functions that meet the conditions. Can you explain how they do this?

\(g(x)=x^2\) and \(f'(x)=(x-1)(x-25)\)

\(g(x)=x^2-10x\) and \(f(x)=(x-11)^2\)

\(g(x)=(x+1)^2\) and \(f(x)=(x-36)^2\)

- … a function \(g(x)\) so that \(\ln{g(x)}\) has a local minimum?

We need \(g(x)>0\) for all \(x\) in the domain of \(g(x)\) because otherwise \(\ln{g(x)}\) will not be defined. If we also want \(\ln{g(x)}\) to have a minimum, we need \(g(x)\) to have a stationary point, since \(\ln{x}\) has no stationary points. But what type of stationary point should it be?

If a function has a minimum when \(x=a\), what can we say about the sign of its derivative on either side of \(x=a\)?

The gradient is negative to the left of a local minimum and positive to the right of it.

For \(\ln{g(x)}\) to have a minimum at \(a\), we want its derivative to behave like this near \(a.\)

We already know from the chain rule that the derivative of \(\ln{g(x)}\) is the product of the derivative of \(\ln{x}\) at \(g(x)\) and the derivative of \(g(x).\) But since \(\ln{x}\) is an increasing function, the sign of the derivative of \(\ln{g(x)}\) is the same as the sign of \(g'(x).\)

Therefore we are looking for a function \(g(x)\) which has at least one local minimum and is always positive. One example could be \(g(x)=1+x^2.\) What other examples can you find?

Functions of the form \(\ln{g(x)}\) arise as integrals of \(\tfrac{g'(x)}{g(x)}.\) Which functions are of the form \(\tfrac{g'(x)}{g(x)}\)?

- … functions \(f(x)\) and \(g(x)\) so that \(f(g(x))\) has no stationary points?

The derivative of \(f(g(x))\) is \(f'(g(x))g'(x)\). How can we ensure that a product is zero?

If we want to ensure that \(f(g(x))\) does not have any stationary points, we could choose \(g(x)\) and \(f(x)\) with no stationary points, as long as \(f(x)\) and \(g(x)\) can be composed.

What are some functions that have no stationary points?

What’s the simplest function that has no stationary points?

The simplest function with no stationary points is the identity function and if we let \(g(x)=x\) and \(f(x)=x\) we get \(f(g(x))=x\), which has no stationary points.

Broadening our search out to other functions with no stationary points, we could take any function of the form \(ax+b\) if \(a\neq0\), or we could have \(e^x\), \(\ln{x}\), \(\tan x\), \(\sqrt[3]{x}\), \(x^3+x\) or even \(2x+\sin x.\) What happens if we try to compose some of these functions?

As this problem can be solved by composing functions that don’t have stationary points, it seems worth thinking about whether \(g(x)\) or \(f(x)\) could have stationary points.

For example, we could choose a \(g(x)\) without stationary points, but \(f(x)\) with stationary points that are outside the range of \(g(x).\) An example is \(g(x)=e^x\) and \(f(x)=x^2.\) Alternatively, if \(g(x)\) has a stationary point at \(x=a\) but \(f(g(a))\) is not defined, we can exclude \(a\) from the domain of \(f(g(x)).\) For example, \(g(x)=x^2\) for \(x\neq 0\) and \(f(x)=\ln{x}.\)

One final example worth mentioning is \(g(x)=x^3\) and \(f(x)=\sqrt[3]{x}.\) Here \(f(g(x))=x\), which has no stationary points, even though \(g'(0)=0.\) How could this be explained?

If we use the chain rule to differentiate \(f(g(x))\) for \(x\neq 0\), then we obtain \(1\) as expected. Problems arise at \(x=0\) though, because the gradient of \(\sqrt[3]{x}\) is not defined when \(x=0.\) This means that the expression \(f'(g(0))g'(0)\) is not defined at \(x=0\), so we can’t use the chain rule to find the gradient function of \(f(g(x))\) here. However, the gradient function does exist at \(x=0\) because \(f(g(x))=x\) for all \(x\), so its gradient function must be \(1\) everywhere.

Inverse functions and their derivatives can be is explored further in Reflecting on change.