Integration
Contents
10. Integration¶
10.1. Introducing Integration¶
10.1.1. The “anti-derivative”¶
Consider the function \(\cos(x)\). We know that this function can be obtained by differentiating \(\sin(x)\). Therefore, we could think of \(\sin(x)\) as the “anti-derivative” of \(\cos(x)\). After differentiating \(\sin(x)\), the “anti-derivative” takes us back to where we started.
Well… nearly. We could also obtain \(\cos(x)\) by differentiating \(\sin(x)+2\), so we cannot say that \(\sin(x)\) is the unique anti-derivative of \(f(x)\).
In general, for a given function \(f(x)\),
if \(\frac{\mathrm{d}F}{\mathrm{d}x} = f(x)\), then \(F(x)+c\) is an antiderivative of \(x\),
where \(c\) is an arbitrary constant.
Being able to “spot” anti-derivatives is a tremendously useful (and often under-utilised) trick.
Practice questions
Note: these are not “integration questions”, you only need to use your knowledge of differentiation, and the concept of the anti-derivative, as described above.
1. \(\sec^2(x)\)
2. \(x^3\)
3. \(\sin(3x)\)
4. \(e^{a x}\)
5. \(x \sqrt{x^2-1}\)
6. \(\frac{x}{x^2+1}\)
7. \(\displaystyle \frac{\sin(x)}{\cos(x)}\)
8. \(\cosh(x)\sinh^2(x)\)
Solutions
1. We should recognise that \(\sec^2(x)\) is obtained by differentiating \(\tan(x)\) and so the anti-derivative is \(F(x)=\tan(x)+c\).
2. If we differentiate \(x^4\) we obtain \(4x^3\) which is nearly what we want, but not quite. Trying \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x} \left(\frac{1}{4} x^4\right)\) instead gets the result \(x^3\) and so the anti-derivative of \(x^3\) is \(\displaystyle \frac{1}{4} x^4+c\).
3. By the chain rule, \(\frac{\mathrm{d}}{\mathrm{d}x} \cos(3x)=-3\sin(3x)\), and so the anti-derivative is \(\displaystyle -\frac{1}{3}\cos(3x)+c\).
4. Since \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}e^{a x}=a e^{a x}\) and so the anti-derivative is \(\displaystyle \frac{1}{a} e^{a x}+c\).
5. Now we rely on our expertise with the chain rule.
The chain rule tells us that \(f(g(x))^{\prime}=g^{\prime}(x)f^{\prime}(g)\) and so the anti-derivative of \(g^{\prime}(x)f^{\prime}(g)\) is \(f(g(x))+c\). In particular, if we differentiate \(g^{3/2}\) where \(g=x^2-1\), we obtain \((2 x) \frac{3}{2} g^{1/2}\) and so the anti-derivative of \(x g^{1/2}\) is
CHECK YOUR ANSWER: you need to be awesome at differentiation to be good at integration!
6. By the same rationale as question 5, we try \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x} \ln(x^2+1)=\frac{2x}{x^2+1}\) and so the anti-derivative is \(\displaystyle \frac{1}{2} \ln(x^2+1)+c\).
7. The anti-derivative is \(\displaystyle -\ln(\cos(x))+c\). In general, the anti-derivative of an expression of the form \(\displaystyle \frac{f^{\prime}(x)}{f(x)}\) is \(\ln(f(x))+c\).
8. The anti-derivative is \(\displaystyle \frac{1}{3} \sinh^3(x)+c\).
10.1.2. Area under the curve¶
Definition
Fig. 10.1 shows how the area under a curve \(f(x)\) between \(x=a,b\) may be estimated by drawing rectangles of equal width \(\Delta x\). Formally, we may write that:
The expression simply states that we add up the rectangles with width \(\Delta x\) and height \(f(x_n)\). As \(\Delta x\rightarrow 0\) the area approximation becomes more accurate.
We call:
the integral of \(f\) with respect to \(x\) and we denote it by:
It can be proved that integration and anti-differentiation are essentially the same thing. This result is known as the Fundamental Theorem of Calculus. In fact, the theorem comes in two parts. The first part, given in the box below, allows the definite integral to be determined by evaluating an anti-derivative at integration limits. The second part (not given here) essentially proves that every continuous function has an anti-derivative, which can be found by integration. For some functions, such as \(e^{-x^2}\), we might not be able to express the integral in terms of elementary functions, but we know it exists (and we can use successive approximation techniques either analytically or numerically to estimate them).
Definition
The First Fundamental Theorem of Calculus (FTC1)
If \(F\) is an anti-derivative of \(f\), then \(\displaystyle \int_a^b f(x) \textrm{d}x = F(b) - F(a)\) gives the area between the curve \(f(x)\) and the x-axis between \(x=a\) and \(x=b\).
Symbol |
Meaning |
Notes |
---|---|---|
\(\textrm{d}x\) |
“with respect to x” The integration is along the x-axis. We say that x is the “integration variable” |
Do not forget to write this, or the integral has no meaning. |
\(\displaystyle \int\) |
Integration operator |
An operator acs on a function in some way. For example, \(\frac{\textrm{d}}{\textrm{d}x}\) is also an operator. |
\(f(x)\) |
Integrand |
The function to be integrated. |
\(a, b\) |
The limits of integration. |
If the integral has limits then it is called a definite integral and has a single value for the solution. If the integration does not have limits then it is called an indefinite integral, and you can only compute the result to within an arbitrary constant. |
10.1.3. Signed and unsigned areas¶
Note that the heights of the rectangles in Fig. 10.1 are given by \(f(x)\), and so if \(f(x)<0\) then the result will be negative. In many examples, positive and negative areas cancel. For instance,
If you want the total (unsigned) area between the curve and the axis, then you can work with the modulus of the function,
The easiest way to do this is to split up the region of integration into areas where \(f(x)>0\) and areas where \(f(x)<0\). For example,
The results are illustrated in Fig. 10.2:
Similarly, if we perform the integration along the x-axis in the negative direction, then the quantities \(\Delta x\) are negative, and so we end up with a negative signed area when \(f(x) > 0\).
FTC1 also confirms that \(\displaystyle \int_b^a f(x) \textrm{d}x = -\displaystyle \int_a^b f(x) \textrm{d}x\).
10.1.4. Area between two curves¶
Practice questions
1. a. Find the tangent to the curve \(y=25-x^2\) at the point where \(x=2\).
b. Calculate the value of \(x\) where the tangent meets the x-axis.
c. Find the area of the region bounded by the tangent, the curve and the x-axis.
2. Calculate the area of the region bounded by the curves \(x = -y^2 + 10\) and \(x = (y-2)^2\).
Solutions
The tangent is \(y=29-4x\), which intersect that x-axis at \(x=29/4\) see diagram Q2
:
The required area is given by PQR:
The curves intersect at (1,3) and (9,-1) and it is easier to calculate the enclosed area by integrating parallel to the y-axis.
10.2. Integration by substitution¶
Definition
For an indefinite integral:
For a definite integral:
Don’t forget to change the limits for definite integration!
These results can be proved using the chain rule and fundamental theorem of calculus.
The idea of using a substitution is that we convert a difficult integral w.r.t \(x\) to an easier one w.r.t \(u\).
Note that \(\displaystyle f \frac{\mathrm{d}x}{\mathrm{d}u}=f\biggr/\frac{\mathrm{d}u}{\mathrm{d}x}\) and so the substitution \(u\) can be chosen to eliminate a factor from \(f\).
Worked example
To calculate \( \displaystyle \int x\sqrt{x^2-1}\mathrm{d}x\) we can try the substitution \(u=x^2-1\). This substitution will eliminate the factor \(x\) and will simplify the expression \(\sqrt{x^2-1}\). We find that:
\(\displaystyle \frac{\mathrm{d}u}{\mathrm{d}x}=2x\) and so \(\displaystyle \frac{\mathrm{d}x}{\mathrm{d}u}=\frac{1}{2x}\), hence:
This is the same result we can find by inspection.
Practice questions
1. Find \( I= \displaystyle\int_1^3\frac{1}{2x+1}\mathrm{d}x\).
2. Find \( I= \displaystyle\int (ax+b)(cx+d)^n\mathrm{d}x\) using the substitution \(u=cx+d\),/
Solutions
1. To calculate the definite integral \( I=\displaystyle \int_1^3\frac{1}{2x+1}\mathrm{d}x\), we will use the substitution \(u=2x+1\). (This problem could also be solved by inspection).
When \(x=1\), \(u=3\) and when \(x=3\), \(u=7\), hence, the result is
2. To calculate an expression of the form \( I=\displaystyle \int (ax+b)(cx+d)^n\mathrm{d}x\) we can make the substitution \(u=cx+d\), which gives:
By polynomial expansion:
Rewriting in terms of \(x\) finally gives:
10.3. Integral of \(\displaystyle \frac{1}{x}\)¶
The function \(\displaystyle \frac{1}{x}\) falls into a special category, because it cannot be solved using the polynomial antiderivative \(\displaystyle \int x^n = \frac{x^{n+1}}{n+1}\) as \(n=-1\) here.
However we can think about the fact that \(\displaystyle \frac{\mathrm{d}}{\mathrm{d}x}\Big(\ln(x)\Big) = \frac{1}{x}\) and therefore use this as an antiderivative. From Fig. 10.4, we see that:
So, \(\displaystyle \int\frac{1}{x}=\ln(|x|)+\mathrm{const},\, \forall x\), provided that the range of integration does not cross the vertical axis.
This is because formally \(\displaystyle \int_{-a}^a\frac{1}{x}\mathrm{d}x\) is undefined, although we can define what is called the Cauchy principal value of this integral as:
10.4. Integration by parts¶
Definition
For an indefinite integral:
For a definite integral:
This result can be proved using the product rule and the fundamental theorem of calculus.
For a handy rule of thumb for choosing which term to differentiate when applying this method, we can use LIATE method:
Logarithmic Term
Inverse Term
Algebraic Term
Trignometric Term
Exponential Term
This list tells the order of preference for the term to be differentiated \(u(x) \rightarrow u'(x)\). The exponential function is at the bottom of the sit because it is usually the easiest to integrate, the logarithmic is usually the hardest, hence it sits at the top.
Worked Examples
1.
Since L falls before A in LIATE, we pick:
and so integrating by parts we find:
2. Sometimes it is not always obvious that there are two functions in the integration expression, however this can be remedied using a simple trick:
This should be seen as:
Since L falls before A in LIATE, we pick:
and so integrating by parts we find:
Practice Problems
Integrate the following problems by parts:
1.
2.
3.
Solutions
1. To calculate \(\displaystyle \int x e^{-x}\mathrm{d}x\),
Let \(u=x,\ v'=e^{-x}\) then:
\(u'=1\), which is simpler and \(v=-e^{-x}\) which is no more complicated, so:
2. To calculate \(\displaystyle \int x^2 e^{-x}\mathrm{d}x\),
Let \(u=x^2,\, v'=e^{-x}\), then:
\(u'=2x\), which is simpler and \(v=-e^{-x}\), which is no more complicated, so:
From the previous example, we know the result of this integrand is:
and therefore we find:
3. To calculate \( I =\displaystyle \int \arcsin(x)\mathrm{d}x\) we play a trick:
Let \(u=\arcsin(x)\), \(v'=1\), then:
\(x=\sin(u)\), so \(\displaystyle \frac{\mathrm{d}x}{\mathrm{d}u}=\cos(u)=\pm\sqrt{1-x^2}\)
We should be cautious here because of the \(\pm\) - the positive square root is chosen because \(\sin(x)\) is increasing throughout its domain.
Also we have \(v=x\), so this gives
The remaining integral can be calculated by inspection, or with the substitution \(g=1-x^2\):
10.5. Integration by partial fractions¶
Composing fractions means putting everything together, such as:
Decomposition is the reverse process, i.e. taking the fraction apart. This very useful for integration, since the resulting partial fractions are much easier to integrate to logarithmic type terms.
We can combine together our facts about partial fractions into:
Factor in denominator |
Term in partial fraction decomposition |
---|---|
\(ax+b\) |
\(\displaystyle \frac{A}{ax+b}\) |
\((ax+b)^n\) |
\(\displaystyle \frac{A_1}{ax+b} + \frac{A_2}{(ax+b)2} + \dots \frac{A_n}{(ax+b)^n}, \quad n \in \mathbb{N}\) |
\(ax^2+bx+c\) |
\(\displaystyle \frac{Ax+B}{ax^2+bx+c}\) |
\((ax^2+bx+c)^n\) |
\(\displaystyle \frac{A_1}{ax^2+bx+c} + \frac{A_2}{(ax^2+bx+c)^2} + \dots \frac{A_n}{(ax^2+bx+c)^n}, \quad n \in \mathbb{N}\) |
Worked example
Find the value of the integral
Since this is an algebraic fraction we can try to express as partial fractions:
Which leads to simultaneous equations:
and is solved by \(A = 2,\, B = 3\), therefore:
Practice questions
Evaluate the following integrals:
1.
2.
3.
4.
5.
6.
Solutions
1.
2.
3.
Comparing coefficients at reach order in \(x\):
4.
Comparing coefficients at reach order in \(x\):
5. Since this is a top heavy fraction, we should try to cancel this down first:
6.
10.6. Reduction formula¶
Reduction formulae set up a recurrence relation between different integrands:
where \(a,\,n\) are integers typically and \(a < n\). Usually we solve these problems by integration by parts, which by spotting the required pattern, makes finding the solution more straightforward.
Worked example
Find and evaluate the reduction formula for:
We can integrate by parts (using LIATE if necessary):
Which means that we can write:
If we were to repeat the integration by parts repeatedly we would find:
\(I_0\) is a good place to stop, since we can evaluate it:
Hence \(I_n = n!\).
Practice Questions
1. Find a reccurence relation for the integral:
and find a value for \(I_4\).
2. Find a reccurence relation for the integral:
and find a value for \(I_{10}\).
3. Find the reduction formula for:
and evaluate \(I_4\).
4. Find the reduction formula for:
and evaluate \(I_2, \, I_3\).
Solutions
1.
Integrating by parts:
and therefore:
Hence the reccurence relation is
Which means that:
and so \(I_4\) is given by:
2.
Integrating by parts:
and therefore:
Rearranging gives:
and so for \(I_{10}\):
and finally:
Thus:
3. There may be a temptation to try to expand out the bracket or integrate by parts straight away, however the easier method is to break up the integrand into \((1-x^3)^{n-1}\,(1-x^3)\):
and then integrate the second integrand by parts:
where we integrated \(f'(x)\) using the reverse chain rule.
4. Firstly break up the integrand into \(\sin(x) \sin^{n-1}(x)\) and then integrate by parts:
and therefore:
notice we evaluate \(I_0\) and \(I_1\) depending on whether \(n\) is odd or even.
10.7. Mean value of a function¶
As shown in Fig. 10.5, for any function \(f(x)\) we can obtain the average output \(\bar{f(x)}\) by adding up a series of outputs and dividing by the number of datapoints used. In this case, the spacing between datapoints is \(\Delta x\).
By taking the limit as \(\Delta x\rightarrow 0\), we can obtain an average of the function \(f(x)\) and we find that this result is equal to the limit defintion of the definite integral.
Definition
The mean value \(\bar{f}\) of the function \(f(x)\) on the domain \(x \in [a,\, b]\) is given by:
Worked example
Calculate the mean value of \(\cos ^3(\theta)\) on the interval \(\displaystyle \left[-\frac{\pi}{3}, \frac{\pi}{3}\right]\) by integration.
Practice questions
1. Find the average value of the function \(f(x) = x^3\) on the interval \(x \in [0,\, 1]\).
2. Find the mean value of the cosine function on the interval \(x \in \Big[0,\, \frac{\pi}{2}\Big]\).
Solutions
1.
2.
10.8. Arc Length¶
Suppose that we have a function \(y = f(x)\), we know through integration that we can find the area under the curve:
Another question that we could ask however is what is the length of the path traced out by the function \(f(x)\) over the range \([a,\,b]\):
To find an expression for this length \(S\), we can break up the path into infinitesimal segments and then integrate these over the whole function. We can see this process breaking down the change in arc length \(\Delta s\) by Pythagoras graphically as:
Right Pane: Effect of taking the limit of smaller \(\Delta x\) in finding the path length. By decreasing the difference \(\Delta x\) between the joined up points, we obtain a better approximation.
Taking the limit of \(\Delta x\rightarrow 0\) we find:
and therefore to find the path length:
We might also have a function which is parameterised \(y = y(t),\, x=x(t)\), it is also possible to find an expression for the path length for \(t \in [t_a,\, t_b]\), taking the limit of \(\Delta t \rightarrow 0\):
Worked examples
1. Looking at \(y = \cosh(x)\) over the range \(x \in [0,\,1]\), so we find \(\mathrm{d}y/\mathrm{d}x = \sinh(x)\), and therefore:
2. Consider a circle, parameterised by \(x = R\cos(t),\, y = R\sin(t)\), over the range \(t \in [0,\, 2\pi)\), giving \(\mathrm{d}x/\mathrm{d}t = -R\sin(t),\, \mathrm{d}y/\mathrm{d}t = R\cos(t)\) and therefore:
which gives the result for the circumference of a circle!
Practice questions
1. Find the length of the arc of the curve \(x = 18t^2\), \(y=(12t+9)^\frac{3}{2}\) from \((0,27)\) to \((32, 125)\).
2. Calculate the arc length of the curve defined by \(x=\cos(t)\), \(y=\sin(t)\), between \(t=\frac{\pi}{6}\) and \(t=\frac{\pi}{3}\).
3. Calculate the length of the curve \(y=2(x-1)^\frac{3}{2}\) between \(x=1\) and \(x=4\).
Solutions
1. Find the length of the arc of the curve \(x = 18t^2\), \(y=(12t+9)^\frac{3}{2}\) from \((0,27)\) to \((32, 125)\).
We have:
Then, as all the lengths are positive:
Thus \(\displaystyle L=18\biggr[t^2+3t\biggr]_0^{4/3}=104\) units
2.
Calculate the arc length of the curve defined by \(x=\cos(t)\), \(y=\sin(t)\), between \(t=\frac{\pi}{6}\) and \(t=\frac{\pi}{3}\).
The result simply gives the arc length of a portion of the unit circle (\(x^2 + y^2 = 1\)) between \(\theta=\frac{\pi}{6}\) and \(\theta=\frac{\pi}{3}\)
3.
Calculate the length of the curve \(y=2(x-1)^\frac{3}{2}\) between \(x=1\) and \(x=4\).
and therefore:
10.9. Surfaces of Revolution¶
Lets now go further, what happens if we take a function and rotate it around an axis:
To find the volume of such a rotated solid, we need to think about the cross sectional area along the range, which will be \(\pi \,y^2\) since the radius of each slice at \(x\) is \(y(x)\). Then we just need to integrate up these slices \(\pi\,y^2\,\mathrm{d}x\) over the range:
and we can swap round the axis we rotate over to the \(y\) axis and therefore the radius of each slice would be \(\pi\,x^2\) and therefore:
Note
Instead of using cylindrical slices, we could use “frustrums” (sections of cones). The result would be the same (in the limit \(\Delta x \rightarrow 0\)).
Similarly, when calculating the area under the curve, we used rectangles, but we could have used parallelograms.
We can also find the surface area of this solid of revolution, if we rotate over the \(x\) xcis then this surface area is the circumference of each slice \(2\pi\,y\) multiplied by the path length \(\mathrm{d} s\) along the surface, so we find:
We could rotate over the \(y\) axis instead, in which case we just switch the circumference we are interested in to be \(2\pi\,x\) and integrate the path length over the \(y\) axis:
Worked example
Lets find the volume of a cone depicted in Fig. 10.10, with height \(h\) and circular radius \(R\), so \(y = R x / h\) over the range \(x \in [0,\, h]\):
which matches the expression we expect and explains where this factor of \(1/3\) comes from!
Likewise we can look at the surface area of this cone, \(y = R x / h \rightarrow \mathrm{d}y/\mathrm{d}x = R / h\) over the range \(x \in [0,\, h]\):
where \(\sqrt{h^2 + R^2}\) is the slant length.
Likewise if we have parametrised expressions \(x = x(t),\, y = y(t)\), over the range \(t \in [t_1,\, t_2]\) then these expressions become:
Practice questions
1. Find the surface area of revolution for \(y = x^2\) rotated around the \(y\) axis over \(y \in [0,\,4]\).
2. Determine the surface area of the solid obtained by rotating the function \(y=\sqrt{9-x^2}\) for \(-2 \leq x \leq 2\) about the \(x\)-axis.
3. Determine the surface area of the solid obtained by rotating the function \(y=x^{1/3}\), for \(1 \leq y \leq 2\) about the \(y\)-axis.
4. Find the surface area spherical section obtained by revolving the function \(r = \cos(\theta)\) around the \(x\) axis over \(\theta \in \left[0\,\frac{\pi}{4}\right]\).
5. Find the volume of revolutio for the section obtained by reolving the function \(y = x^2\) around the \(x\) axis over \(x \in [-2,\,3]\).
6. Find the volume of the solid obtained by rotating the region bounded by \(y=2x^2\) and \(y=x^3\) about the \(x\) axis, from the origin up to where the functions meet.
Solution
1.
so integral is:
2.
so integral is:
3.
the limits as \(y \in [1,\, 2]\), so integral is:
which we can solve by inspection (or reverse chain rule), where \(\int f^n\,f'\,\mathrm{d}y = \frac{1}{n+1}f^{n+1}\), here \(f = 1+9y^4 \), so \(f' = 36y^3\)
4. Given that the surface for a rotated solid around the \(x\) axis is \(\int_a^b 2\pi y\,\mathrm{d}s\) and we have \(x = r \cos(\theta),\, y = r \sin(\theta)\), then this is just a parametric problem, where:
Given that \(r = \cos(\theta)\) then:
so the problem looks like:
5.
Using \(V = \int_{-2}^3 \pi y^2\,\mathrm{d}x \), we find:
6.
Firstly lets find the intersection points:
which we can also see graphically:
To find the volume of the bounded shape, we need to subtract the two volumes we would find: