Preliminary Mathematics for online MSc programmes in Data AnalyticsUnit 3: Integration in 1D
Integration
Introduction to integration and area under the curve
When a function , is known, we can differentiate it to obtain the derivative . The reverse process is to obtain from knowledge of its derivative. This process is called integration.
However, integration is much more than just differentiation in reverse. It can be applied to finding areas under curves. By area under the curve we mean the area above the -axis and below the graph of , assuming that is positive. To give an example from Physics, the area underneath a graph of the velocity of an object against time represents the distance travelled by the object.
It is also important to regard integration as a process of adding up, or summation. Often, a physical quantity can be obtained by summing lots of small contributions or elements. For example, the position of the centre of mass of a solid body can be found by adding the contributions from all the small parts of which the body is composed.
Example 1
Find the area under between and . You can see the graph of the function below with the thick solid line and the area under the function with the grey triangle. The area forms a right triangle, with base and height both equal to . The area is therefore . More generally, the area underneath between and is a right triangle with base and
height both equal to . Thus, the area is .
Some of you may have already figured out that we just solved our first integral. Specifically, we calculated (and found out that the value of the integral is ). Do not worry if you do not understand the previous sentence; I haven't explained the notation yet.
Terminology and notation
The topic of integration can be approached in several different ways. Probably, the simplest way to think of it is as differentiation in reverse. In some applications we will know the derivative of the function, but not the function from which it was derived. This is why we need knowledge of integration.
Suppose we differentiate the function (meaning that and are equivalent; some times we will use one instead of the other). We will obtain . Integration reverses this process, and we say that the integral of is . Unfortunately, the situation we are in is actually a bit more complicated than that because there are lots of functions that we can differentiate to give . Here are some of them:
All these functions have the same derivative, , because when we differentiate the constant term we obtain zero. As a result, when we reverse the process, we have no idea what the original constant term might have been. Because of this we include in our answer an unknown constant, say , called the constant of integration. We state that the integral of is . There is nothing special about the letter . We might use (or something else), but we avoid using letters from the end of the alphabet like , , and which are used for variables.
The symbol for integration is , known as an integral sign. Formally we write
where the term within the integral is called the integrand, and the term indicates the name of the variable involved, in this case .
We say that is integrated with respect to to give . Technically, integrals of this sort are called indefinite integrals, to distinguish them from definite integrals, which we will see (really) soon. When we find an indefinite integral our answer should always contain a constant of integration.
Can you now calculate the integral ?
Table of integrals
We could use a table of derivatives to find integrals, but the more common ones are usually found in a table of integrals such as the one seen in Table 1.
Function
Indefinite integral
constant
where
Example 2
What is ?
The function is of the form with and , and thus
We can check whether we have calculated the integral correctly by differentiating the answer.
which is the function we were meant to integrate.
Example 3
What is ?
We can rewrite the integrand as . It is thus of the form with and . Thus,
We can again check whether we have calculated the integral correctly by differentiating the answer.
Example 4
What is ?
The function is of the form with , and thus
We can again check whether we have calculated the integral correctly by differentiating the answer.
Ok, that is a good start but what do we do with functions like or ?
The first function involves adding two functions (both of them being of the form ).
The second function, , involves multiplication of two functions ( and ).
We need to introduce some simple rules to enable us to extend the range of functions that we can integrate.
Rules of integration
Integration is linear: For any functions and and any real numbers and the integral of the function is
Substitution rule: This rule involves making a substitution in order to simplify an integral and make it easier to calculate. For example, we may let a new variable, say , equal a more complicated part of the function we are trying to integrate. The choice of which substitution to make often relies upon experience. Do not worry if at first you cannot see an appropriate substitution.
However, it is not simply a matter of changing the variable, care must be taken with the term since the new integral will now include the variable and not .
Integration by parts: The following formula
shows us how we can calculate an integral of the form . We note that the previous formula replaces the original integral with a different integral, as seen on the right-hand side. This is because the second integral is easier to compute.
Function
Indefinite integral of
Example 5
For calculate
We note that involves adding two functions (the first one is of the form while the second one is ). Thus, the integral of is
In the final line, has been replaced with a new constant . It's just a tidier way of including a constant of integration in the final line of the calculated integral.
Example 6
For calculate
We note that this involves multiplication of two functions, and . This example requires the use of the integration by parts rule.
Using this rule, we can calculate an integral that involves a product of two functions taking the form , with the first term being the derivative of and the second one being . In this case, the two functions within the integral are and . If and are denoted as the functions and , we would be able to calculate the integral
Now that we have and , we can calculate the right-hand side of the integration by parts rule.
Note that in the final line has been replace with a new constant .
Using integration by parts we were able to 'convert' a relatively complicated integral, , into an 'easier' integral.
Example 7
For calculate .
This is a similar integral to the previous example, except that we have to deal with instead of . We will use integration by parts in this example as well.
Let and , then and . Thus
Example 8
For h left parenthesis x right parenthesis equals left parenthesis 3 x plus 5 right parenthesis Superscript 6 calculate integral h left parenthesis x right parenthesis normal d x.
Here we have an example of a composite function. It is a function that raises 3 x plus 5 to the sixth power. We could expand the power to obtain a sum, and then integrate each term one-by-one, but this would be a lot of work.
We will substitute 3 x plus 5 with a new variable, say u. In that case, instead of having left parenthesis 3 x plus 5 right parenthesis Superscript 6 we will have u Superscript 6. This gives us a much simpler function to integrate. However, there is a slight complication. The new function of u must be integrated with respect to u and not with respect to x. This means that we need to take care of the term normal d x.
If we differentiate u equals 3 x plus 5 with respect to x we get:
StartFraction normal d u Over normal d x EndFraction equals StartFraction normal d left parenthesis 3 x plus 5 right parenthesis Over normal d x EndFraction equals left parenthesis 3 x plus 5 right parenthesis prime equals 3 period
It follows that we can write normal d x equals one third normal d u.
We now have that
StartLayout 1st Row 1st Column integral left parenthesis 3 x plus 5 right parenthesis Superscript 6 Baseline normal d x 2nd Column equals integral u Superscript 6 Baseline one third normal d u 2nd Row 1st Column Blank 2nd Column equals one third integral u Superscript 6 Baseline normal d u 3rd Row 1st Column Blank 2nd Column equals one third left parenthesis StartFraction u Superscript 7 Baseline Over 7 EndFraction plus c right parenthesis 4th Row 1st Column Blank 2nd Column equals StartFraction u Superscript 7 Baseline Over 21 EndFraction plus StartFraction c Over 3 EndFraction 5th Row 1st Column Blank 2nd Column identical to StartFraction u Superscript 7 Baseline Over 21 EndFraction plus c EndLayout
To finish off we must rewrite this answer in terms of the original variable x and we do this by replacing u with 3 x plus 5. So:
integral left parenthesis 3 x plus 5 right parenthesis Superscript 6 Baseline normal d x equals StartFraction left parenthesis 3 x plus 5 right parenthesis Superscript 7 Baseline Over 21 EndFraction plus c period
Example 9
For h left parenthesis x right parenthesis equals e Superscript 2 x minus 3 calculate integral h left parenthesis x right parenthesis normal d x.
We have another composite function to integrate and to make our life easier, we will substitute 2 x minus 3 with u.
To rewrite the integral in terms of normal d u instead of normal d x we take the substitution u equals 2 x minus 3 and differentiate with respect to x, to get
StartFraction normal d u Over normal d x EndFraction StartFraction normal d left parenthesis 2 x minus 3 right parenthesis Over normal d x EndFraction equals left parenthesis 2 x minus 3 right parenthesis prime equals 2 comma
thus StartFraction normal d u Over normal d x EndFraction equals 2 and normal d x equals one half normal d u.
By the way, we could have also rewritten u equals 2 x minus 3 as x equals one half u plus three halves and calculated
StartFraction normal d x Over normal d u EndFraction equals StartFraction normal d left parenthesis one half u plus three halves right parenthesis Over normal d u EndFraction equals left parenthesis one half u plus three halves right parenthesis prime equals one half comma
thus StartFraction normal d x Over normal d u EndFraction equals one half, thus normal d x equals one half normal d u.
Either way, we can now write
StartLayout 1st Row 1st Column integral e Superscript 2 x minus 3 Baseline normal d x 2nd Column equals integral e Superscript u Baseline one half normal d u 2nd Row 1st Column Blank 2nd Column equals one half integral e Superscript u Baseline normal d u 3rd Row 1st Column Blank 2nd Column equals one half e Superscript u Baseline plus c 4th Row 1st Column Blank 2nd Column equals one half e Superscript 2 x plus 3 Baseline plus c EndLayout
Definite integrals
When integration was introduced as the reverse of differentiation the integrals we dealt with were indefinite integrals. The result of finding an indefinite integral is usually a function plus a constant of integration.
In this section, we introduce definite integrals, so called because the result will be a definite answer, usually a number, with no constant of integration. Definite integrals can be recognised by numbers written to the upper and lower right of the integral sign. The quantity integral Subscript a Superscript b Baseline f left parenthesis x right parenthesis normal d x is called the definite integral of f left parenthesis x right parenthesis from a to b. The numbers a and b are known as the lower and upper limits of the integral respectively.
The definite integral integral Subscript a Superscript b Baseline f left parenthesis x right parenthesis normal d x is the (signed) area under the graph of f between a and b, as illustrated in the figure below.
These integrals have many applications (mentioned briefly in earlier sections), for example in finding areas bounded by curves or estimating probabilities. In the latter case f left parenthesis x right parenthesis will not just be a function, it will be a density (you will see more of this in Probability and Stochastic Models or Probability and Sampling Fundamentals).
If the indefinite integral integral f left parenthesis x right parenthesis normal d x equals upper F left parenthesis x right parenthesis plus c, i.e. upper F prime left parenthesis x right parenthesis equals f left parenthesis x right parenthesis, then the definite integral can be calculated as
integral Subscript a Superscript b Baseline f left parenthesis x right parenthesis d x equals left bracket upper F left parenthesis x right parenthesis right bracket Subscript x equals a Superscript b Baseline equals upper F left parenthesis b right parenthesis minus upper F left parenthesis a right parenthesis
When you evaluate a definite integral the result will usually be a number. Most importantly, when you integrate over a variable like x in a definite integral, the answer will never involve x. For an indefinite integral the answer would be likely to involve x.
Example 10
What is integral Subscript 1 Superscript 3 Baseline 4 x squared normal d x?
We have already found the indefinite integral in Example 2: integral 4 x squared normal d x equals 4 StartFraction x cubed Over 3 EndFraction plus c period
Thus,
StartLayout 1st Row 1st Column integral Subscript 1 Superscript 3 Baseline 4 x squared normal d x 2nd Column equals left bracket 4 StartFraction x cubed Over 3 EndFraction right bracket Subscript x equals 1 Superscript 3 Baseline equals 4 StartFraction 3 cubed Over 3 EndFraction minus 4 StartFraction 1 cubed Over 3 EndFraction 2nd Row 1st Column Blank 2nd Column equals StartFraction 108 Over 3 EndFraction minus four thirds equals StartFraction 104 Over 3 EndFraction almost equals 34.67 EndLayout
Example 11
What is integral Subscript 1 Superscript 4 Baseline left parenthesis 3 x plus 5 right parenthesis Superscript 6 Baseline normal d x?
This is the same integral as the one we solved earlier in Example 8 with the only difference being that now it is a definite integral. The procedure we have to follow is exactly the same as before with one small, but significant, addition. The limits of the new integral must be in terms of u and not in terms of x. This means that since u equals 3 x plus 5, when x equals 1 then u equals 8; and when x equals 4 then u equals 17. Thus, we have:
StartLayout 1st Row 1st Column integral Subscript 1 Superscript 4 Baseline left parenthesis 3 x plus 5 right parenthesis Superscript 6 Baseline normal d x 2nd Column equals integral Subscript 8 Superscript 17 Baseline u Superscript 6 Baseline one third normal d u 2nd Row 1st Column Blank 2nd Column equals one third integral Subscript 8 Superscript 17 Baseline u Superscript 6 Baseline normal d u 3rd Row 1st Column Blank 2nd Column equals one third left bracket StartFraction u Superscript 7 Baseline Over 7 EndFraction plus c right bracket Subscript u equals 8 Superscript 17 Baseline 4th Row 1st Column Blank 2nd Column identical to one third left parenthesis left parenthesis StartFraction 17 Superscript 7 Baseline Over 7 EndFraction plus c right parenthesis minus left parenthesis StartFraction 8 Superscript 7 Baseline Over 7 EndFraction plus c right parenthesis right parenthesis 5th Row 1st Column Blank 2nd Column equals one third left parenthesis StartFraction 17 Superscript 7 Baseline Over 7 EndFraction minus StartFraction 8 Superscript 7 Baseline Over 7 EndFraction right parenthesis EndLayout
You can stop right there, there is no need to calculate 17 Superscript 7 and 8 Superscript 7. Off the top of my head they should be close to 410338673 and 2097152 respectively.
Example 12
What is integral Subscript 0 Superscript plus normal infinity Baseline e Superscript negative x Baseline x normal d x?
This is a slightly more complicated example as we integrate all the way up to infinity.
We have already seen a similar indefinite integral in Example 6 using integration by parts with f prime left parenthesis x right parenthesis equals e Superscript x and g left parenthesis x right parenthesis equals x: integral e Superscript x Baseline x normal d x equals e Superscript x Baseline x minus e Superscript x Baseline plus c
This time the difference is that we have e Superscript negative x instead of e Superscript x. Hence we will be using f prime left parenthesis x right parenthesis equals e Superscript negative x and g left parenthesis x right parenthesis equals x, yielding f left parenthesis x right parenthesis equals minus e Superscript negative x and g prime left parenthesis x right parenthesis equals 1.
StartLayout 1st Row 1st Column integral Subscript 0 Superscript plus normal infinity Baseline e Superscript negative x Baseline x normal d x 2nd Column equals left bracket minus e Superscript negative x Baseline x right bracket Subscript x equals 0 Superscript plus normal infinity Baseline minus integral Subscript 0 Superscript plus normal infinity Baseline minus e Superscript negative x Baseline times 1 normal d x 2nd Row 1st Column Blank 2nd Column equals left bracket minus e Superscript negative x Baseline x right bracket Subscript x equals 0 Superscript plus normal infinity Baseline minus left bracket e Superscript negative x Baseline right bracket Subscript x equals 0 Superscript plus normal infinity Baseline 3rd Row 1st Column Blank 2nd Column equals ModifyingBelow minus e Superscript negative normal infinity Baseline normal infinity With bottom brace Underscript equals 0 Endscripts minus ModifyingBelow left parenthesis minus e Superscript negative 0 Baseline 0 right parenthesis With bottom brace Underscript equals 0 Endscripts minus ModifyingBelow e Superscript negative normal infinity Baseline With bottom brace Underscript equals 0 Endscripts plus ModifyingBelow e Superscript negative 0 Baseline With bottom brace Underscript equals 1 Endscripts 4th Row 1st Column Blank 2nd Column equals 1 EndLayout
You might feel that it is slightly dodgy notation to use infinity in a calculation as if it was a number. A cleaner way of writing minus e Superscript negative normal infinity Baseline normal infinity would be limit Underscript x right arrow plus normal infinity Endscripts minus e Superscript negative x Baseline x. You might also be wondering why this quantity is 0. The reason is that, in the limit, e Superscript negative x decays faster to zero than any polynomial (including just x) could increase.
Tasks
Task 1
If integral Subscript 4 Superscript 8 Baseline left parenthesis 2 f left parenthesis x right parenthesis plus 2 right parenthesis normal d x equals 16, then what is integral Subscript 4 Superscript 8 Baseline f left parenthesis x right parenthesis normal d x?
Show answer
Using that itegration is a linear operator, we can rewrite
StartLayout 1st Row 1st Column integral Subscript 4 Superscript 8 Baseline left parenthesis 2 f left parenthesis x right parenthesis plus 2 right parenthesis normal d x 2nd Column equals 2 integral Subscript 4 Superscript 8 Baseline f left parenthesis x right parenthesis normal d x plus ModifyingBelow integral Subscript 4 Superscript 8 Baseline 2 normal d x With bottom brace Underscript equals left bracket 2 x right bracket Subscript x equals 4 Superscript 8 Baseline equals 2 times 8 minus 2 times 4 equals 16 minus 8 equals 8 Endscripts 2nd Row 1st Column Blank 2nd Column equals 2 integral Subscript 4 Superscript 8 Baseline f left parenthesis x right parenthesis normal d x plus 8 EndLayout
Thus 2 integral Subscript 4 Superscript 8 Baseline f left parenthesis x right parenthesis normal d x plus 8 equals 16 comma which we can re-arrange to
integral Subscript 4 Superscript 8 Baseline f left parenthesis x right parenthesis normal d x equals StartFraction 16 minus 8 Over 2 EndFraction equals 4
Task 2
Calculate the value of integral Subscript 0 Superscript 1 Baseline x e Superscript x normal d x
We use integration by parts (integral Subscript a Superscript b Baseline f prime left parenthesis x right parenthesis g left parenthesis x right parenthesis normal d x equals left bracket f left parenthesis x right parenthesis g left parenthesis x right parenthesis right bracket Subscript x equals a Superscript b Baseline minus integral Subscript a Superscript b Baseline f left parenthesis x right parenthesis g prime left parenthesis x right parenthesis normal d x) with f prime left parenthesis x right parenthesis equals e Superscript x and g left parenthesis x right parenthesis equals x. Hence f left parenthesis x right parenthesis equals e Superscript x and g prime left parenthesis x right parenthesis equals 1.
StartLayout 1st Row 1st Column integral Subscript 0 Superscript 1 Baseline x e Superscript x normal d x 2nd Column equals left bracket e Superscript x Baseline x right bracket Subscript x equals 0 Superscript 1 Baseline minus integral Subscript 0 Superscript 1 Baseline e Superscript x Baseline times 1 normal d x 2nd Row 1st Column Blank 2nd Column equals left bracket e Superscript x Baseline x right bracket Subscript x equals 0 Superscript 1 Baseline minus left bracket e Superscript x Baseline right bracket Subscript x equals 0 Superscript 1 Baseline 3rd Row 1st Column Blank 2nd Column equals left bracket e Superscript x Baseline x minus e Superscript x Baseline right bracket Subscript x equals 0 Superscript 1 Baseline 4th Row 1st Column Blank 2nd Column equals left parenthesis e Superscript 1 Baseline times 1 minus e Superscript 0 Baseline times 0 right parenthesis minus left parenthesis e Superscript 1 Baseline minus e Superscript 0 Baseline right parenthesis 5th Row 1st Column Blank 2nd Column equals e Superscript 0 Baseline equals 1 EndLayout
Task 3
Evaluate integral StartRoot 9 y EndRoot normal d y period
StartLayout 1st Row 1st Column integral StartRoot 9 y EndRoot normal d y 2nd Column equals integral ModifyingBelow StartRoot 9 EndRoot With bottom brace Underscript equals 3 Endscripts StartRoot y EndRoot normal d y equals 3 integral y Superscript one half Baseline normal d x 2nd Row 1st Column Blank 2nd Column equals 2 y Superscript three halves Baseline plus c equals 2 StartRoot y cubed EndRoot plus c EndLayout
Task 4
Evaluate integral 2 y e Superscript y squared Baseline normal d y period
To calculate the integral integral 2 y e Superscript y squared normal d y we will use the substitution u equals y squared.
Differentiating u equals y squared gives StartFraction normal d u Over normal d y EndFraction equals left parenthesis y squared right parenthesis prime equals 2 y, thus normal d u equals 2 y normal d y.
Thus
StartLayout 1st Row 1st Column integral 2 y e Superscript y squared normal d y 2nd Column equals integral e Superscript u Baseline normal d u 2nd Row 1st Column Blank 2nd Column equals e Superscript u Baseline plus c equals e Superscript y squared Baseline plus c EndLayout
Alternatively, we could have also solved for y and differentiated y equals StartRoot u EndRoot equals u Superscript one half giving StartFraction normal d y Over normal d u EndFraction equals one half u Superscript negative one half, thus normal d y equals one half u Superscript negative one half Baseline normal d u, yielding
StartLayout 1st Row 1st Column integral 2 y e Superscript y squared normal d y 2nd Column equals integral 2 u Superscript one half Baseline e Superscript u Baseline one half u Superscript negative one half Baseline normal d u 2nd Row 1st Column Blank 2nd Column equals integral e Superscript u Baseline normal d u equals e Superscript u Baseline plus c equals e Superscript y squared Baseline plus c EndLayout
Task 5
Calculate the value of integral Subscript 2 Superscript 3 Baseline left parenthesis 3 minus s right parenthesis left parenthesis 1 plus s right parenthesis normal d s period
Show answer
The integral becomes easier to calculate if we first expand the integrand.
StartLayout 1st Row 1st Column integral Subscript 2 Superscript 3 Baseline left parenthesis 3 minus s right parenthesis left parenthesis 1 plus s right parenthesis normal d s 2nd Column equals integral Subscript 2 Superscript 3 Baseline 3 plus 3 s minus s minus s squared normal d s 2nd Row 1st Column Blank 2nd Column equals integral Subscript 2 Superscript 3 Baseline 3 plus 2 s minus s squared normal d s 3rd Row 1st Column Blank 2nd Column equals left bracket 3 s plus s squared minus one third s cubed right bracket Subscript s equals 2 Superscript 3 Baseline 4th Row 1st Column Blank 2nd Column equals left parenthesis 3 times 3 plus 3 squared minus one third 3 cubed right parenthesis minus left parenthesis 3 times 2 plus 2 squared minus one third 2 cubed right parenthesis equals 9 minus StartFraction 22 Over 3 EndFraction 5th Row 1st Column Blank 2nd Column equals five thirds EndLayout