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).…

UCT MAM1000 lecture notes 1 (part i) – preamble.

I will attempt to post notes for the coming sixty lectures on a daily basis. You can either ask questions about the topics which you don’t understand here, or email me directly, or of course come and chat in my office when I’m around.

  • These notes are for the second semester of MAM1000. They are neither complete nor exact and no responsibility is held for the accuracy within. Mistakes are undoubtedly included. That being said, I hope that they can be a useful resource in addition to the course textbook (Stewart) and additional online materials.
  • I am always very grateful when people find mistakes in these notes. These may be in the form of spelling, grammar, calculational errors, typos in formulae, typesetting errors and anything else which doesn’t seem to make sense. If an explanation is not clear, please contact me and I will do my best to explain it in another way.

Mathematica details of the cooking with mathematics post

Edit: If you want to see the full code, I include everything in this post in the Mathematica file here.

I promised previously that we would go into depth into the graph theory and food calculations, so today we will do just that. This will be Mathematica heavy, so really this is only aimed at those who have played around with the Mathematica programming language.

I’ve been using this language now for over a decade, and while it is not the fastest language on the market for doing numerics-heavy calculations, it is an incredibly versatile language, and for getting code written fast, it’s hard to beat!

I tend to code in what is called a functional programming style (ideal for Mathematica), which doesn’t use loops as you would normally find in a procedural language. Perhaps the most oft used coding syntax you will see below is of the form:

somefunction[#]&/@{el1,el2,el3,el4…}

which takes the elements of a list and passes them one by one into a function.…

Cooking with Mathematics

This post is not going to be very maths-heavy but will include some concepts from the area of graph theory which we will use in an unusual setting.

Today we’re going to get into the virtual kitchen and get our virtual taste buds a-buzzing….Well, actually we’re going to get our computers to do the hard work of finding out some tasty recipes and we’re going to use a few different techniques to do this. The workhorse is going to be the Mathematica programming language, but a lot of what we will do will be doable in any programming language, though perhaps it will be slightly more cumbersome than this.

The starting point of our culinary adventure will be a piece of text, taken from a website of flavour pairings here.

We see here that we have a piece of text which we can copy and paste into our Mathematica file.…

By | May 31st, 2015|English, Level: intermediate|6 Comments

A Mathematics Problem from the SBITC

The Standard Bank IT Challenge (SBITC) is an annual coding competition for undergraduate and honours students in South Africa. The contest consists of two rounds: a regional event named the “heats”, and the final. In the heats, teams of up to four students each compete against other teams from the same university, and the winning team from each of the nine top-performing universities is invited to the final round in Johannesburg. Each member of the winning team wins a prize, and the winning university receives a large cash prize, but students mostly participate for the enjoyment that is to be obtained in solving the problems, and to test their skills against a set of problems that is designed to challenge the participants.

This year, the final problem from the heats (which took place on Saturday, 16 May) was fairly mathematical in nature; or more-so than the other problems at least. Essentially, the problem asks the following:

We consider generalised Fibonacci sequences T_n which satisfy the same recurrence relation T_{n + 2} = T_{n + 1} + T_n as the Fibonacci numbers, but with the first two terms T_1 and T_2 being arbitrary positive integers.…

By | May 29th, 2015|English, Level: intermediate, Uncategorized|0 Comments

An explanation for the multiplier effect in a Keynesian macroeconomic model

In this post I will provide a mathematical basis for the multiplier effect which is found when changing an autonomous variable in the aggregate expenditure function (AE). AE is a function which represents the total amount of money that is spent by all consumers in an economy, and is made up of two components: autonomous expenditure (which is exogenous in relation to income) and induced expenditure (endogenous to income). In other words, autonomous expenditure is the y-cut of the AE funtion, and any increases in autonomous expenditure will shift AE vertically. Induced consumption refers to any expenditure that is over and above the level of expenditure at the y-cut, and is directly related to the gradient of the AE function (which includes the marginal propensity to consume¹). Referring to Figure 1 below, let the increase in autonomous expenditure be y1. y1 thus shifts AE1 to AE2.

By | March 15th, 2015|English, Level: intermediate|4 Comments

The domain of a composite function

In this article I outline a systematic way of finding the domain of a composite function. A definition that can be used for this purpose follows:

 D(f \circ g) = \{x|x\in D(g) \wedge g(x) \in D(f)\}

(Vaught, 1995:18)

Where D(\lambda) =  \text{the domain of }\lambda

The explanatory method which follows is to show how to use this definition in different examples.

Example 1

Solve D(\ln(\ln(\ln x))) .

Solution:

Let \ln(\ln(\ln x)) = f(g(h(x)))

\begin{minipage}{3in} \begin{align*} \text{Firstly, }& D(g\circ h) = \{x|x\in (0,\infty)\wedge \ln x\in (0,\infty)\} \\ & \ln x\in (0,\infty) \Leftrightarrow x\in (1,\infty) \\ \therefore \; \; & D(g\circ h) = x \in (1, \infty) \\ ~\\ \text{Now, }& D(f \circ (g\circ h)) = \{x|x\in (1,\infty)\wedge \ln(\ln x)\in (0,\infty)\} \\ & \ln(\ln x)\in (0,\infty) \Leftrightarrow \ln x\in (1,\infty) \Leftrightarrow x \in (e,\infty) \\ \therefore \; \; & D(f \circ g\circ h) = x \in (e, \infty) \end{align*} \end{minipage}

\square

Example 2.1

Let f(x)=x+1 and g(x)=x^2 where D(g)=[-2,2].

Find D(f\circ g)

Solution:

\begin{minipage}{2in} \begin{align*} f\circ g(x) &= x^2+1 \\ D(f\circ g) &= \{x|x \in [-2,2] \wedge x^2 \in \mathbb{R} \} \\ & x^2 \in \mathbb{R} \Leftrightarrow x \in \mathbb{R} \\ \therefore \; \; & x \in [-2,2] \end{align*} \end{minipage}

\square

Example 2.2

Consider the same constraints as in Example 2.1, but with D(f)=[-2,1]

Solution:

\begin{minipage}{3in} \begin{align*} D(f\circ g) &= \{x|x \in [-2,2] \wedge x^2 \in [-2,1] \} \\ & x^2 \in [-2,1] \Leftrightarrow x^2 \in [0,1] \Leftrightarrow x \in [-1,1] \\ \therefore \;\; & x \in [-1,1] \end{align*} \end{minipage}

\square

References

Vaught, RL. 1995. Set theory: An introduction. 2nd edition. Boston: Birkhäuser.

 

LaTeX and PDF format here

How clear is this post?
By | March 4th, 2015|English, Level: intermediate|0 Comments