This material has been adapted from material by Fergus Cooper and others from the "Essential Mathematics" module at the Doctoral Training Centre, University of Oxford.
This course material was developed as part of UNIVERSE-HPC, which is funded through the SPF ExCALIBUR programme under grant number EP/W035731/1
Integration 1
Learning outcomes
Understand the concept of the area under a graph
Be able to calculate the integral of a function
Recognise integration as the inverse operation of differentiation
Be able to use SymPy to integrate functions in Python
Be able to use the substitution method to integrate a function of a function
YouTube lecture recording from October 2020
The following YouTube video was recorded for the 2020 iteration of the course.
The material is still very similar:
Introduction and Integration by Substitution
Integration
Calculating the area under a curve:
If we want to find the area under a curve, we can divide the area into strips, calculate the area of each strip, and sum these areas together.
e.g. find the area of
y=f(x)=x2betweenx=1 and x=2
The area of the strip is δAi≈y(xi)δx
We can sum up all the strips between x=1 and x=2 to give an estimate for the total area:
A≈∑δAi=∑y(xi)δx.
This becomes more accurate as δx becomes smaller.
We can use the same trick as when differentiating: let δx tend to 0:
A=δx→0lim∑y(xi)δx=1∫2ydx
If we use a coarse approximation, then we are over-counting the area under the curve by quite a lot:
But, as the size of each rectangle reduces, we converge the true area under the curve:
∫ is the old English S and stands for the phrase "Sum Over".
This process is called integration.
Calculating the integral
Let us 'invent' a function F(x) that gives the area from 0 to x.
Then A=F(2)−F(1).
With this (imagined) function, we can find the area of one of our tiny steps exactly, as
F(x+δx)−F(x)
Remember we approximated this as yδx=f(x)δx, so:
F(x+δx)−F(x)≈f(x)δx > f(x)≈δxF(x+δx)−F(x)
The error in this approximation tends to 0 as δx→0, so
f(x)=δx→0limδxF(x+δx)−F(x)=F′(x)
(recalling the definition of the derivative).
In other words, for our example,
A(x)=1∫xy(t)dttheny(x)=A′(x)
Integration reverses the process of differentiation.
An integral without limits is called an indefinite integral.
Indefinite integrals in SymPy
x = sp.symbols('x')sp.integrate(2*x,x)
x2
Other integrals
Recall that:
dxdlnx=x1
And, that:
dxdlnx=x1⇒∫x1dx=lnx+κ
This constant κ can be written as:
κ=lnB
where B is another constant. Thus:
∫x1dx=lnx+κ=lnx+lnB=ln(Bx)
Integrating trigonometric functions
Recall that:
dxd(sinx)=cosxanddxd(cosx)=−sinx
Example (i):
∫0π/2cosxdx=[sinx]0π/2=1−0=1
Example (ii):
∫0π/2sinxdx=[−cosx]0π/2=0−(−1)=1
Summary of integration formulae
∫adx=ax+C
∫axdx=21ax2+C
∫axndx=n+11axn+1+Cforallnexceptn=−1
∫x−1dx=∫x1dx=ln∣x∣+C
Application
Recall that f′(t) gives the rate at which f(t) changes at time t.
Integrating the derivative f′(t), we see:
∫abf′(t)dt=[f(t)]ab=f(b)−f(1.
Therefore, the definite integral from a to b of f′(t) with respect to t will always give the net change that f(t) has undergone as the parameter t moves from a to b.
Example
A chemical process produces NaCl at the rate of 3t grams per minute.
We ask three questions:
What is the rate of production one minute into the process?
What is the quantity of NaCl produced over the next three minutes?
What is the mean rate of NaCl production over this interval?
Solution
Let f(t) denote the grams of NaCl produced after t minutes. Then f′(t)=3t.
The rate of production one minute into the process is f′(1)=31=3 grams per minute.
The quantity of NaCl produced over the next three minutes is:
Integrate the following functions with respect to x. Remember that you can check your own answers by differentiating your results:
x3−x41+x2
3x+34x1
x21+3x1−7
Introductory problems 2
Evaluate the following definite integrals:
∫12x1/2dx
∫23x−2/3dx
∫0ln(2)e3xdx
∫02(x+1)1/5dx
Introductory problems 3
Find the integrals below by making the substitution suggested:
∫x2(2x3−5)3dxusingu=2x3−5
∫x7−2x2dxusingu=7−2x2
∫01ex(3ex−10)4dxusingu=3ex−10
∫x315−3x4dxusingu=15−3x4
∫04x34+x5/2dxusingu=4+x5/2
∫01xn−1(1−xn)2dxusingu=1−xn
Introductory problems 4
By making suitable substitutions, find the indefinite integrals of:
2(6x−5)3
x2−27x
5−x3
x−a1
Main problems
Main problems 1
Electrostatic work: the force acting between two electric charges q1 and q2 separated by distance x in a vacuum is given by Coulomb's inverse square law:
F(x)=4πϵ0x2q1q2
where ϵ0 is the permittivity of a vacuum.
Like charges (charges with the same sign, such as 2 nuclei or 2 electrons) repel so that the force acting on q2 due to the presence of q1 acts in a positive x direction, away from q1.
Unlike charges (of opposite signs such as the proton and electron in the hydrogen atom) attract, and the force on q2 is directed towards q1 (i.e.\ F is negative).
Consider 2 like charges, initially infinitely far apart.
Because the charges repel, work must be done on the system to bring q2 from infinity to the distance x from q1.
The force F must be applied to overcome the repulsion.
Explain why the total work done is given by
W=−∫∞xF(x′)dx′=−4πϵ0q1q2∫∞xx′2dx′.
Calculate the work, W, in Joules when
x=5.3×10−11m,
q1=q2=1.6×10−19C,
ϵ0=8.85×10−12Fm−1.
Main problems 2
The rate at which the world's oil is being consumed is continuously increasing.
Suppose the rate (in billions of barrels per year) is given by the function r=f(t), where t is measured in years and t=0 is the start of 1990.
Write down a definite integral which represents the total quantity of oil used between the start of 1990 and the end of 2020.
Calculate this integral using the function r(t)=32e0.05t.
Main problems 3
Since 1850, global carbon emissions have been rising exponentially.
Let C(t) represent the rate that carbon is emitted into the atmosphere, measured in Gigatonnes per year, where t measures the number of years since the start of 1850.
A model for the rate of emission over time is given by
C(t)=kept,
where k and p are positive constants.
What are the units of k and p?
Given that, at the start of 1850, the global emission rate was 0.2 Gigatonnes per year, and that at the start of 2010 the global emission rate was 32 Gigatonnes per year, calculate k and p.
Calculate the total quantity of carbon emitted since the start of 1850.
Main problems 4
The velocity v of blood in a cylindrical vessel of radius R and length l is given by
v(r)=4ηlP(R2−r2)
where η and P are constants, and r is the radial distance from the cylinder's axis.
Find the average velocity of blood along the radius of the cylinder (i.e. for 0≤r≤R), and compare this with the maximum velocity.
Main problems 5
Consider the function y=4x3+2x2−8x+2.
Draw an accurate graph of this function for values of x between −4 and 4.
Calculate the turning points of the curve and mark these on the graph.
On your graph, shade in the region under the curve between x=−2 and x=2 and estimate its area.
Integrate the function between x=−2 and x=2. Is this an accurate calculation of the area of the shaded region in part 3?
Identify and explain any differences you find between your estimate in part 3 and your calculation in part 4.
Extension problems
Extension problems 1
Evaluate the following definite integrals:
∫−π/2π/23cos(x)dx
∫2ππcos(x)sin(x)dx
∫0π(cos2(x)+sin2(x))dx
Extension problems 2
Let u and v be functions of x.
Given that dxd(uv)=udxdv+vdxdu, show that ∫vdxdudx=uv−∫udxdvdx.
By using this 'integration by parts' formula, and substituting z=x2 or otherwise, show that
∫0∞xne−x2dx=21(n−1)∫0∞xn−2e−x2dxforn>1.
Hence evaluate ∫0∞x5e−x2dx.
:::
Extension problems 3
A country wishes to achieve net-zero CO2 emissions in 50 years. At the start of the program, their emissions (E) are 800Mt CO2year−1. They decide that they will be able to reduce their emissions at a stable rate, so that each year they emit 12Mt CO2year−1 less than the previous year.
Write down the rate of change of the countries emissions (E), each year (t), dtdE. Use this to calculate the total emissions that the country had produced over the 50 years.
After 10 years of these emissions, the country starts a CO2 removal program, whereby a certain amount of CO2 is captured from the atmosphere and sequestered underground each year. This CO2 follows the curve
R=0.1t2−t
where R is the amount of CO2 removal in Mt CO2year−1.
Determine whether the country achieves their 50 year net-zero emissions goal by finding the year in which the emissions produced are equal to the emissions removed.
After the 50 year program, the countries emission rate stabilises, and they emit the same amount of CO2 each year after that. The CO2 absorption rate per year follows the same trend as before. The country wishes to have not contributed to global warming at all since the start of the program. This means their net total CO2 emissions over the entire program would have to be zero.
Show that is takes approximately 109 years for the country to have a net-zero effect on global warming since the start of the program.