About Jonathan Shock

I'm a lecturer at the University of Cape Town in the department of Mathematics and Applied Mathematics. I teach mathematics both at undergraduate and at honours levels and my research interests lie in the intersection of applied mathematics and many other areas of science, from biology and neuroscience to fundamental particle physics and psychology.

UCT MAM1000 lecture notes part 7

Today we are going to look at improper integrals. This will give us access to a whole host of integrals which, naively, looking at them in terms of Riemann sums don’t make obvious sense.

When we defined the definite integral we gave some constraints. We can now integrate (either approximately or exactly):

 

\int_a^bf(x)dx

 

as long as [a,b] is finite and as long as there are no infinite discontinuities in a\le x\le b. An infinite discontinuity means that f(x) is not bounded at some point in [a,b] (intuitively this means that the function goes to \pm \infty at some value of x in [a,b].

If we have an integral which does not abide by these constraints, we may still be able to calculate an answer for the area under the curve, but it will now be called an improper integral. The reason that these are defined as improper is because they will not themselves be well defined as Riemann sums, however, they will be limits of Riemann sums as we will soon see.…

By | July 27th, 2015|Courses, First year, MAM1000, Uncategorized, Undergraduate|1 Comment

UCT MAM1000 lecture notes part 6 (part ii)

OK, so the last post was a bit abstract, so it’s good to run through some examples here. Here are a few examples which illustrate some of the theory we discussed last time.

 

Example 1: A quadratic function in the denominator which can be written as the product of two linear terms

 

\frac{3x-6}{x^2+5x+6}=\frac{3x-6}{(x+2)(x+3)}

 

Now split this up into the sum of two terms:

 

\frac{3x-6}{(x+2)(x+3)}=\frac{A}{x+2}+\frac{B}{x+3}

 

multiply out the right hand side:

 

\frac{3x-6}{(x+2)(x+3)}=\frac{A(x+3)+B(x+2)}{(x+2)(x+3)}=\frac{x(A+B)+3A+2B}{(x+2)(x+3)}

 

and match the coefficient of x and the constant part to find A and B: A+B=3 and 3A+2B=-6. The solution to this is A=-12 and B=15. Our final expression is:

 

\frac{-12}{x+2}+\frac{15}{x+3}

 

and if we need to integrate this we can use the normal techniques we have learnt up to now.

 

Example 2: An irreducible quadratic

The quadratic in the following can’t be factored into linear terms in x (well, not using real numbers, anyway). We can complete the square in the quadratic term though:

 

\frac{3x-6}{(x^2+6x+12)(x-3)(x+2)}=\frac{3x-6}{((x+3)^2+3)(x-3)(x+2)}

 

we now write this as:

 

\frac{3x-6}{((x+3)^2+3)(x-3)(x+2)}=\frac{A}{x-3}+\frac{B}{x+2}+\frac{Cx+D}{((x+3)^2+3)}

 

Note that the quadratic term has not just a constant in the numerator, but a term $Cx+D$.…

By | July 25th, 2015|Courses, First year, MAM1000, Uncategorized, Undergraduate|2 Comments

UCT MAM1000 lecture notes part 6 (part i)

Some thoughts on exam preparation

It feels like the exams are an age away, but believe me, the coming weeks will fly by and before you know it the exams will be upon you. There are things that you can do now, which are going to make the period before the exams, and the exams themselves be a lot less stressful than they would be otherwise.

Part of the issue with MAM1000 is that it’s a big course, which covers a lot of material. It will have been many months since you studied limits by the time you get to the exam, so keeping your hand in with all the topics covered will make life much easier for you.

Of course you need to do the tutorials each week, but I recommend, starting now, going through a couple of old tuts each week. It shouldn’t take too long as you have done them before, and the more times you do them, the faster they will go.…

UCT MAM1000 lecture notes part 5

Note that the last example I gave in class today can be done in a much simpler way which doesn’t involve a trig substitution. I will include both the way we did it in class as well as the simpler way below. Thank you to the student who came and pointed this out!

 

Today we looked at integrals of non-trigonometric functions for which substituting in some trig expression makes the undoable doable. Let’s start with the example:

 

\int\frac{1}{\sqrt{1-x^2}}dx

 

I drew a quick sketch of this function, just because it’s good exercise to do that. You see that the denominator is the expression for a unit upper half semi-circle centred at the origin. Inverting this (ie. \frac{1}{circle} gives a graph which passes through the point (0,1) and asymptotes to infinity at \pm 1.

 

Whenever we see something of the form 1-x^2 we should be reminded of the trig identity 1-\sin^2\theta=\cos^2\theta because this will simplify things.…

By | July 24th, 2015|Courses, First year, MAM1000, Uncategorized, Undergraduate|7 Comments

UCT MAM1000 lecture notes part 4

Trig integrals

Trigonometric functions generally tell us about behaviour which happens in a periodic way – the motion of the earth around the sun, the position of a pendulum. This might be related to the (AC) current flowing down an electrical circuit, the change in risk of certain weather patterns throughout the year or the position of a planet in the sky.

Here we’re going to use a combination of simple integrals that we should all know by now and integration by substitution and parts along with trigonometric identities to solve certain integrals.

Note that some of the tricks we use are going to appear to have been pulled out of a hat, and until you become familiar with these methods, that’s unfortunately the case for some time. But spend time looking through them and seeing the structure of the methods and they will become clearer and clearer.

 

Integrating the \tan function

 

\int\tan\theta d\theta

 

Often it will be best to try and put our integral in the form of \sin and \cos.…

By | July 23rd, 2015|Courses, First year, MAM1000, Uncategorized, Undergraduate|4 Comments

UCT MAM1000 lecture notes part 3

Today is going to be the last day where we will focus on integration by parts. We’re going to run through a few more examples, but each of them will be slightly different from what you’ve seen already and will give you a few more insights into some of the tricks you might have to play.

 

Definite integrals using integration by parts

Let’s look at the following integral:

 

\int_0^{\frac{\pi}{2}} x^2 \sin x dx

 

Where as usual we see that the x^2 term becomes simpler if we differentiate it and so we choose:

 

u=x^2,\,\,\,\,\, dv=\sin x dx

 

Thus

 

du=2x dx,\,\,\,\,\, v=-\cos x

 

Using the normal integration parts algorithm we will get the following, and note that now we need to evaluate the result at the limits of integration:

 

\left.-x^2 \cos x\right|_0^{\frac{\pi}{2}}+ \int_0^{\frac{\pi}{2}} 2x \cos x dx

 

We can’t quite solve this last integral directly so we integrate by parts again. However, we note that the first term in this expression actually evaluates to zero when we plug in both limits, so we are left with just the integral term.…

By | July 22nd, 2015|Courses, First year, MAM1000, Uncategorized, Undergraduate|10 Comments

UCT MAM1000 lecture notes part 2

Before getting onto the maths proper today I wanted to discuss why you should care about any of this stuff. Who cares whether you can integrate a given function or not? There are many reasons as to why you might care, but I think it’s nice to take an example from either end of the reasoning spectrum.

The first reason is that within many different sciences, the way we describe the world is by differential equations, which we will come on to in the coming weeks. Differential equations are like algebraic equations (that you’ve been studying for years) but they include derivatives. An example is something like:

 

\frac{df(x)}{dx}+x^2+f(x)=2

 

Here you are not being asked to solve for a variable and work out what constant it equals, you are being asked to solve for a function to see how it varies over x.

Such equations are the way we model the world, in just about every field from physics, to sociology and from actuarial sciences to epidemiology.…

MAM1000 Bootcamp links

The first rule of bootcamp is: You DO talk about bootcamp!

I know that the start of the semester is busy, but now is the time to consolidate what you learnt last semester if you feel that you are struggling. It will take a good number of hours each week for a couple of weeks, but with effort you can do it. It’s really useful to go through these with other people, but it’s also important to spend some time going through exercises on your own. I suggest finding a balance between the two.

I’m going to list some links below, some of which have explanations, some of which have videos and many of which have exercises. Here’s your task if you choose to accept it:

  1. Put aside Whatsapp, Facebook, news feeds, anything distracting and make sure that you are in a quiet place – if possible take the material offline so you don’t have to have any internet connection when you are going through these.

UCT MAM1000 lecture notes 1 (part iii) – integration by parts

Here we are going to come up with our second method for solving integrals which we can’t solve by inspection (noting that they are the antiderivative of some function which we know well).

We know the product rule for differentiation:

 

\frac{d (f(x)g(x))}{dx}=f'(x)g(x)+f(x)g'(x)

 

Integrating it gives us:

f(x)g(x)+c=\int f'(x)g(x)dx+\int f(x)g'(x)dx

We can then rearrange this to give:

 

\int f(x)g'(x)dx=f(x)g(x)-\int f'(x)g(x)dx

 

We have dropped the c because this will come also from doing the second integral.

This is also sometimes written in an alternative form:

Let f(x)=u and g(x)=v. Sometimes we will keep the functional dependence explicit, and sometimes we won’t – it is up to you to follow what things are functions of x and what are constants. You will get more and more familiar with it over time.

Now we can write:

f'(x)=\frac{du}{dx}\,\,\,\,\,\,\,\,g'(x)=\frac{dv}{dx}

 

Now put this into the equation above for integration by parts.

 

\int u \frac{dv}{dx} dx=uv-\int v \frac{du}{dx} dx

 

cancelling the factors of dx:

 

\int u dv=uv-\int v du

 

(Actually the idea of cancelling the factors of dx is rather sloppy, but here it goes through ok).…

UCT MAM1000 lecture notes 1 (part ii) – integration by substitution – review.

This is just a quick reminder. If you find any of this confusing, there is a very important trick for making it easier – practice, practice, practice! It doesn’t take years to master this, it takes a few hours every week for a few weeks. You will become more and more familiar with the techniques and learn intuitively to know which technique to use in which situation.
Let’s start with the very basics.

If F(x)=x^2, what is its derivative? ie. how do we find a function f(x) such that:

f(x)=\frac{d (F(x))}{dx}

 

The answer of course is f(x)=2x. We use our normal differentiation rules which you should now be very familiar with. How about if I told you that there was some function F(x) whose derivative was 2x – ie. we reversed the question:

What is a function whose gradient at a point x is 2x?

How do you find what F(x) is? We are trying to solve the equation

2x=\frac{d F(x)}{dx}

 

for F(x).…