A resolution

In the main problem, we were trying to find a function, \(f(x)\), such that \[\int_{-1}^2 f(x)\,dx=1\]

Abi says, \[\int_{-1}^2 \frac{1}{x^2}\,dx = \left[\frac{x^{-1}}{-1}\right]_{-1}^2 = \frac{1/2}{-1} - \frac{-1}{-1} = -\frac{3}{2}\] so \(f(x)=-\dfrac{2}{3x^2}\) would satisfy the condition.

If you haven’t already sketched graphs of the suggested functions it would be a good idea to do so now.

The three functions all have vertical asymptotes at \(x=0\). An integral of any of these over \(x=0\) must therefore be treated with extreme caution. They are known as improper integrals.

A sketch graph suggests that Abi’s proposal is wrong. The graph is entirely above the \(x\)-axis and appears to contain an infinite area between the graph and the axis.

If we split the region into two we find we cannot evaluate either piece, \[\int_{-1}^2 f(x)\,dx = \int_{-1}^0 x^{-2}\,dx + \int_0^2 x^{-2}\,dx = \left[\frac{-1}{x}\right]_{-1}^0 + \left[\frac{-1}{x}\right]_0^2 .\]

There is no way round this. Abi is wrong.

Charlie says, \[\int_{-1}^2 \frac{1}{x^{1/3}}\,dx = \left[\frac{3}{2}x^{2/3}\right]_{-1}^2 = \frac{3}{2} (\sqrt[3]4 -1)\] so \(f(x)=\dfrac{2}{3(\sqrt[3]4 -1)}\dfrac{1}{x^{1/3}}\) would satisfy the condition.

Charlie’s function has a vertical asymptote so we should see what happens if we try to integrate it in pieces. \[\int_{-1}^0 \frac{1}{x^{1/3}}\,dx = \left[\frac{3}{2}x^{2/3}\right]_{-1}^0 = 0 - \frac{3}{2}\sqrt[3]{(-1)^2} = - \frac{3}{2}\] and \[\int_0^1 \frac{1}{x^{1/3}}\,dx = \left[\frac{3}{2}x^{2/3}\right]_0^1 = \frac{3}{2}\sqrt[3]{(1)^2} - 0 = \frac{3}{2}\] and \[\int_1^2 \frac{1}{x^{1/3}}\,dx = \left[\frac{3}{2}x^{2/3}\right]_1^2 = \frac{3}{2}\sqrt[3]{(2)^2} - \frac{3}{2}\sqrt[3]{(1)^2} = \frac{3}{2} (\sqrt[3]4 -1) .\]

Surprisingly, we can integrate up to the asymptote without a problem. The piece from \(-1\) to \(0\) exactly cancels the piece from \(0\) to \(1\) and so integrating from \(-1\) to \(2\) gives the same result as integrating from \(1\) to \(2\). Although the function is undefined at \(x=0\), the curve encloses a finite area. This is a bit like summing an infinite series and getting a finite result.

Charlie is correct.

Ben says, \[\int_{-1}^2 \frac{1}{x^3}\,dx = \left[\frac{x^{-2}}{-2}\right]_{-1}^2 = \frac{1/4}{-2} - \frac{1}{-2} = \frac{3}{8}\] so \(f(x)=\dfrac{8}{3x^3}\) would satisfy the condition.

Ben’s function \(\dfrac{1}{x^3}\) has a similar shape to Charlie’s. But this time we cannot evaluate the integral \(\displaystyle\int_{0}^2 \frac{1}{x^3}\,dx\) because it involves dividing by zero. So the integral does not have a proper value.

The geometry of the graph suggests that the pieces either side of \(x=0\) should cancel out as they did for Charlie. But this is problematic because it involves subtracting one infinity from another which is not a safe thing to do.

The mathematics is really beyond this level, but it is possible to construct an argument based on symmetrical limiting cases which allows us to effectively cancel the two areas. This result is known as the Cauchy Principal Value of the ill-defined integral. You may learn about this if you go on to study mathematics at university.

In this case, the value does work out at \(\frac{3}{8}\) as Ben stated, so we can say that Ben is correct.

So why does Charlie’s function work properly whereas Ben’s only works improperly?

The distinction is to do with how quickly the function converges with the vertical asymptote. A function \(\dfrac{1}{x^{n}}\) has a finite area close to the \(y\)-axis if \(0<n<1\).