7 Week 7

We our study of indefinite integrals by looking at integration by converting functions using partial fractions. We then consider definite integrals and their connection to areas under curves.

7.1 Integration using partial fractions

Consider the integral \[ \int\frac{x}{(x-1)(x-2)}\mathrm{d}x \] This is not a “standard” integral. Also, if we multiply out the denominator we get \(x^2 - 3x + 2\). The derivative of this denominator is \(2x - 3\). The numerator is thus not the derivative of the denominator, and so making a substitution won’t help us to integrate.

The method to apply is to split the fraction into partial fractions.

From semester 1, we know we can do this:

\[ \frac{x}{(x-1)(x-2)} = \frac A{x-1}+\frac B{x-2}. \] We calculate: \[ x = A(x-2)+B(x-1) \]

Let \(x=2\), so that \(2=A\times0+B\times1\) i.e. \(B=2\).

Let \(x=1\), so that \(1=A\times-1+B\times0\) i.e. \(A=-1\).

So \[ \frac{x}{(x-1)(x-2)} = \frac {-1}{x-1}+\frac 2{x-2} \] and thus \[ \int\frac{x}{(x-1)(x-2)}\mathrm{d}x = \int\frac {-1}{x-1}\mathrm{d}x+\int\frac 2{x-2}\mathrm{d}x \] which we can finish with the methods we already know: \[ \int\frac {-1}{x-1}\mathrm{d}x+\int\frac 2{x-2}\mathrm{d}x = -\ln|x-1|+2\ln|x-2|+c = \ln\left|\frac{(x-2)^2}{x-1}\right|+c. \]

\[ \frac{x}{(x-1)(x-2)} = \phantom{\frac A{x-1}+\frac B{x-2}.} \]

We calculate:

So \[ \frac{x}{(x-1)(x-2)} = \phantom{\frac {-1}{x-1}+\frac 2{x-2}} \] and thus \[ \int\frac{x}{(x-1)(x-2)}\mathrm{d}x = \phantom{\int\frac {-1}{x-1}\mathrm{d}x+\int\frac 2{x-2}\mathrm{d}x} \] We can finish using known methods: \[ \int\frac {-1}{x-1}\mathrm{d}x+\int\frac 2{x-2}\mathrm{d}x = \phantom{-\ln|x-1|+2\ln|x-2|+c = \ln\left|\frac{(x-2)^2}{x-1}\right|+c.} \]

Example 7.1 Evaluate \(\displaystyle\int\frac{x^2+2}{x-2}\mathrm{d}x\).

Solution. This is an improper fraction so we must make a long division first \[ \begin{array}{r} x+2\phantom{)} \\ x-2{\overline{\smash{\big)}\,x^2\phantom{+2x}+2\phantom{)}}}\\ \underline{-~\phantom{(}(x^2-2x)\phantom{-b)}}\\ \phantom{0+}2x+2\phantom{)}\\ \underline{-~\phantom{()}(2x-4)}\\ \phantom{0+}6\phantom{)} \end{array} \] So \[ \frac{x^2+2}{x-2} = x+2+\frac6{x-2} \] and hence \[ \int\frac{x^2+2}{x-2}\mathrm{d}x = \int (x+2)\mathrm{d}x+\int\frac6{x-2}\mathrm{d}x = \frac{x^2}{2}+2x+6\ln|x-2|+c \]

Example 7.2 Evaluate \(I = \displaystyle\int\frac{x^2-3x+3}{(x-1)(x-2)(x-3)} \mathrm{d}x\)

Solution. \[ \frac{x^2-3x+3}{(x-1)(x-2)(x-3)} = \frac A{x-1}+\frac B{x-2}+\frac C{x-3} \] and so \[ x^2-3x+3 = A(x-2)(x-3) + B(x-1)(x-3) + C(x-1)(x-2) \] Let \(x=1\) so that \(1=2A\) or \(A=1/2\).

Let \(x=2\) so that \(1=-B\) or \(B=-1\).

Let \(x=3\) so that \(3=2C\) or \(C=3/2\).

\[\begin{align*} I&= \int\frac 1{2(x-1)}\mathrm{d}x-\int\frac 1{x-2}\mathrm{d}x+\int\frac 3{2(x-3)}\mathrm{d}x\\ &=\frac 12\ln|x-1| -\ln|x-2| + \frac 32\ln|x-3|+c \end{align*}\]

Example 7.3 Evaluate \(I = \displaystyle\int\frac{5x+2}{x^2-4x+4} \mathrm{d}x\)

Solution. \[ \frac{5x+2}{x^2-4x+4} = \frac{5x+2}{(x-2)^2} = \frac A{x-2}+\frac{B}{(x-2)^2} \] and so \[ 5x+2 = A(x-2)+B \] Let \(x=2\) so that \(12=B\).

\(A(x-2)+12 = 5x+2\) and so \(Ax+10-2A=5x\), so that \(A=5\).

\[\begin{align*} I&= \int\frac{5x+2}{x^2-4x+4} \mathrm{d}x\\ &=\int\frac5{x-2}\mathrm{d}x+\int\frac{12}{(x-2)^2}\mathrm{d}x\\ &=5\ln|x-2|-\frac{12}{x-2}+c \end{align*}\]

7.2 Definite Integrals

Let \(F(x) = \displaystyle\int f(x)\mathrm{d}x\). For example, \(F(x)=\displaystyle\int x\mathrm{d}x = \frac{x^2}{2} + C\).

Define \[ \int_a^b f(x)\,\mathrm{d}x = F(b)-F(a). \]

(If the definite integral would be defined as in most textbooks, this statement would be called the First Fundamental Theorem of Calculus.)

Example 7.4 \[\begin{align*} \int_1^4 x^2-2x\,\mathrm{d}x& = \left[\frac{x^3}{3}-x^2+C\right]_1^4\\ &=\left(\frac{4^3}{3}-4^2+C\right) - \left(\frac{1^3}{3}-1^2+C\right)\\ &=\frac{64}{3}-16-\frac{1}{3}+1^2 = 6. \end{align*}\]

Example 7.5 \[\begin{align*} \int_1^4 x^2-2x\,\mathrm{d}x& = \phantom{\left(\frac{4^3}{3}-4^2+C\right) - \left(\frac{1^3}{3}-1^2+C\right)} \end{align*}\]

Note that during the subtraction process the arbitrary constant disappears. This will always happen for a definite integral since we will always get \(+ c\) for the upper limit minus \(+ c\) for the upper limit. Thus for a definite integral we need not bother to write an arbitrary constant in at all.

Example 7.6 Determine the value of \[ \int_0^{\pi/2}\cos(x)\mathrm{d}x. \]

Solution. \[\begin{align*} \int_0^{\pi/2}\cos(x)\mathrm{d}x& = \left[\sin(x)\right]_0^{\pi/2}\\ &=\sin\left(\frac{\pi}{2}\right)-\sin(0) = 1. \end{align*}\]

7.2.1 Area under a curve

The most important application of the definite integral is for finding the area between a curve and an axis. (In fact, this is how the definite integral is usually defined.)

Consider the graph of \(y = f(x)\) and the area it encloses between the curve and the \(x-\)axis between the \(x\) values \(x = a\) and \(x = b\).

$f(x)$

Figure 7.1: \(f(x)\)

At point \(x\), the curve has a height \(y\) at point \(x + \delta x\) the curve has height \(y + \delta y\) (Figure 7.1).

The area of the shaded rectangle under the curve is \(y\delta x\). As drawn, the area of the rectangle has a value quite close to the area under the curve between \(x\) and \(x + \delta x\). If we chose \(\delta x\) to have a smaller value, then the area of the resulting rectangle would be nearer in size to the area between \(x\) and \(x + \delta x\). The smaller we choose \(\delta x\) to be, the better the approximation to the area. In the limit as \(\delta x \to 0\), the area of the rectangle is exactly the same as the area under the curve.

  • shaded area \(y\delta x\)
  • “close” to area under that part of the curve
  • smaller \(\delta x\) \(\implies\) better approximation

Consider now the area \(A\) under the curve between \(a\) and \(b\).

  • We split it up into several vertical strips, each of width \(\delta x\).
  • Denote the \(x\)-coordinates of the vertical “chopping lines” by \(x_0=a, x_1, \dots, x_k=b\).
  • An approximation of \(A\) is the sum of the areas of all the rectangles as above, and may be written as \[ A\approx\sum_{i=0}^{k-1}f(x_i)\delta x \]

where the sign \(\Sigma\) (sigma) means, work out the area of each rectangle in turn then add all the areas together.

  • As \(\delta x \to 0\), the approximation gets precise. We replace \(\Sigma\) by \(\int\) (1st Fundamental Theorem of Calculus in reverse): \[ A =\lim\limits_{\delta x\to 0}\sum_{i=0}^{k-1}f(x_i) \delta x = \int_a^b f(x)\,\mathrm{d}x. \]

Example 7.7 Determine the area between the curve \(y=2x^2+3x+1\) and the \(x-\)axis between the values of \(x=1\) and \(x=2\).

Solution.

(See Figure 7.2.) \[ A=\int_1^2(2x^2+3x+1)\mathrm{d}x = \left[\frac{2x^3}{3}+\frac{3x^2}{2}+x\right]_1^2 = \left[\frac{16}{3}+\frac{12}{2}+2\right]-\left[\frac{2}{3}+\frac 32 + 1\right] = \frac{61}{6}. \]
$2x^2+3x+1$

Figure 7.2: \(2x^2+3x+1\)

7.2.2 Negative Areas

If the curve lies below the \(x\)-axis between \(a\) and \(b\), then \(y\) is negative and \(y\delta x\) will also be negative. As a result the integral for regions below the \(x\)-axis will be negative.

This does not mean that the area itself is negative, just that the integral “counts” the area below the \(x\)-axis with a minus sign.

Thus some care needs to be taken when using integrals to calculate an “area under a curve”.

Consider the curve \(y = x^2 - 3x\) (Figure 7.3). We would like to find the area enclosed between the \(x-\)axis and the values \(x = -1\) and \(x = 5\).

$x^2-3x$

Figure 7.3: \(x^2-3x\)

The definite integral over this range is

\[ \int_{-1}^5(x^2-3x)\mathrm{d}x = \left[\frac{x^3}3-\frac{3x^2}2\right]_{-1}^5 = \left[\frac{125}3-\frac{75}2\right]-\left[\frac{-1}3-\frac{3}2\right]=6. \]

\[ \int_{-1}^5(x^2-3x)\mathrm{d}x = \phantom{\left[\frac{x^3}3-\frac{3x^2}2\right]_{-1}^5 = \left[\frac{125}3-\frac{75}2\right]} \]

However, this is not quite the area we may think. This is \(A_1 + A_2 + A_3\) where \(A_2\) is negative, so the value of the definite integral over this range is smaller than the actual area.

The area of each section is given by

\[\begin{align*} A_1&=\int_{-1}^0(x^2-3x)\mathrm{d}x = \left[\frac{x^3}3-\frac{3x^2}2\right]_{-1}^0 = 1.83\\ A_2&=\int_{0}^3(x^2-3x)\mathrm{d}x = \left[\frac{x^3}3-\frac{3x^2}2\right]_{0}^3 = -4.5\\ A_3&=\int_{3}^5(x^2-3x)\mathrm{d}x = \left[\frac{x^3}3-\frac{3x^2}2\right]_{3}^5 = 8.67 \end{align*}\] and the total area is given by \(A = A_1 + (-A_2) + A_3 = 1.83 + 4.5 + 8.67 = 15\).

\[\begin{align*} A_1&=\phantom{\int_{-1}^0(x^2-3x)\mathrm{d}x = \left[\frac{x^3}3-\frac{3x^2}2\right]_{-1}^0 = 1.83}\\ A_2&=\phantom{\int_{0}^3(x^2-3x)\mathrm{d}x = \left[\frac{x^3}3-\frac{3x^2}2\right]_{0}^3 = -4.5}\\ A_3&=\phantom{\int_{3}^5(x^2-3x)\mathrm{d}x = \left[\frac{x^3}3-\frac{3x^2}2\right]_{3}^5 = 8.67} \end{align*}\] and the total area is given by \(A = A_1 + (-A_2) + A_3 =\)

When we are asked to find the area under a curve for a certain range of \(x\), we must first determine whether the curve crosses the axis in that range. If it does, we need to find the area for each section individually, and then add all the results at the end with the correct signs.

Example 7.8 Determine the area enclosed between the curve \(y=x^3\) and the \(x-\)axis, between the points \(x=-2\) and \(x=2\).

Solution. First sketch the curve: Figure 7.4.

$y=x^3$

Figure 7.4: \(y=x^3\)

We might expect the area to be given by \[ \int_{-2}^2x^3\mathrm{d}x = \left[\frac{x^4}4\right]_{-2}^2 = \frac{2^4}4-\frac{(-2)^4}4 = 4-4 = 0. \] This is clearly not the case. The area to the left of the \(y-\)axis clearly has a negative area while the area to the right has a positive area and these are cancelling one another out.

We actually need \[ \left|\int_{-2}^0x^3\mathrm{d}x\right|+\left|\int_0^2x^3\mathrm{d}x\right| = \left|\left[\frac{x^4}4\right]_{-2}^0\right|+\left|\left[\frac{x^4}4\right]_{0}^2\right| = \left|0-\frac{(-2)^4}4\right|+\left|\frac{2^4}4-0\right| = 4+4=8. \]

7.3 Area between two curves

We may use definite integration to find the area between two curves (or a curve and a straight line).

Example 7.9 Determine the area enclosed between the curve \(y=x^2+1\) and the straight line \(y=7-x\).

Solution.

In this example we are not told the limits of integration. We must work them out. It is usually best to draw a sketch: Figure 7.5.
$y=x^2+1$ and $y=7-x$

Figure 7.5: \(y=x^2+1\) and \(y=7-x\)

We want to find the shaded area. The limits of integration will be the points of intersection of the two curves.

First we need to solve the equations simultaneously to find the \(x-\)co-ordinates of the points of intersection. \[ 7-x=x^2+1\Rightarrow x^2+x-6=0\Rightarrow (x-2)(x+3)=0 \] Hence we see that the curves intersect at \(x=-3\) and \(x=2\). These are the limits of integration.

From the sketch, the shaded area will be given by

\[\begin{align*} A&=\int_{-3}^2(7-x)\mathrm{d}x - \int_{-3}^2(x^2+1)\mathrm{d}x = \left[7x-\frac{x^2}2\right]_{-3}^2 - \left[\frac{x^3}3+x\right]_{-3}^2\\ &=\left[7\times2-\frac{4}2\right]-\left[7(-3)-\frac92\right]-\left\{\left[\frac{8}3+2\right]-\left[\frac{-27}3-3\right]\right\}\\ &=14-2+21+\frac 92-\frac83-2-\frac{27}3-3=20.83. \end{align*}\] The area is therefore \(20.83\) units\(^2\).

Example 7.10 Determine the area enclosed between the curve \(y=e^x\) and the curve \(y=e^{-x}\) and \(x=0\) and \(x=2\).

Solution.

A quick sketch of the curves is on Figure 7.6.
$y=e^x$ and $y=e^{-x}$

Figure 7.6: \(y=e^x\) and \(y=e^{-x}\)

\[ A = \int_0^2(e^x-e^{-x})\mathrm{d}x = \left[e^x+e^{-x}\right]_0^2 = (e^2+e^{-2})-(e^0+e^0) = e^2+e^{-2}-2=5.52. \]

7.4 Parametric Integration

If a curve is defined parametrically such that \(x = f(t)\) and \(y = g(t)\) it can be integrated parametrically as follows \[ \int_a^b y\,\mathrm{d}x = \int_{x=a}^{x=b}g(t)f'(t)\,\mathrm{d}t. \] Since \(\mathrm{d}x/\mathrm{d}t = f'(t)\), we may imagine that \(\mathrm{d}x = f'(t)\,\mathrm{d}t\), which happens to be correct. It is normally best to convert the limits of integration into values of \(t\) rather than \(x\). So we find \(a', b'\) such that \(a=f(a'), b = f(b')\) and then the integral becomes \[ \int_{a'}^{b'}g(t)f'(t)\,\mathrm{d}t. \]

Example 7.11 A curve is described by the parametric equations \(x = at^2\) and \(y = 2at\) where \(t\) is a parameter and \(a\) is a constant. Determine the definite integral between \(t = 1\) and \(t = 2\).

Solution. Here \(x=f(t)=at^2\) and \(y=g(t)=2at\). Hence \(f'(t) = 2at\) and the integral is \[\begin{align*} A &= \int_a^{4a} y\ \mathrm{d}x = \int_{t=1}^{t=2}y\ \mathrm{d}x = \int_1^22at\times 2at\ \mathrm{d}t = \int_1^24a^2t^2\ \mathrm{d}t\\ &= 4a^2\left[\frac{t^3}3\right]_1^2 = 4a^2\left[\frac 83-\frac13\right]=\frac{28}3a^2. \end{align*}\]

Example 7.12 A curve is described by the parametric equations \(x = \sin(t)\) and \(y = \cos(t)\) where \(t\) is a parameter. Determine the definite integral of \(y\) between \(t = 0\) and \(t = \pi/2\).

Solution. \[\begin{align*} \int_{\sin(0)}^{\sin(\pi/2)}y\ \mathrm{d}x& = \int_0^{\pi/2}\cos(t)\cos(t)\mathrm{d}t = \int_0^{\pi/2}\cos^2(t)\mathrm{d}t = \int_0^{\pi/2}\frac{\cos(2t)+1}{2}\mathrm{d}t\\ & = \frac12\left[\frac{\sin(2t)}2+t\right]_0^{\pi/2} = \frac12\left[0+\pi/2\right]-\frac12\left[0\right]=\frac{\pi}4. \end{align*}\]