A function in mathematics is a very precise thing – one of the conditions is that a function can take a number in the domain to only one other number in the range at a time. For example $y=x^{2}$ will take 2 to 4 but no other number and $y=x^{3}$ will take $-3$ to $-27$ and no other number. This doesn’t mean that a number in the range can only have come from one number, for example $y=x^{2}$ will also take $-2$ to $4$.

We often see graphs of functions such as $y=x^{2}$ and $y=\mathrm{e}^{x}$ and it is a common mistake to think that every graph is the graph of a function – this is not true. For example take the graph of $y=\sqrt{x}$ as shown below

Graph drawn using SAGE Math

Graph of a curve that is not a function (?)

this graph is not the graph of a function because $x=4$ is taken to both $-2$ and $2$; this is not allowed by the definition of a function.

To resolve this we have to introduce a new independent variable (often $t$) called a parameter and make $x$ and $y$ functions of the parameter $t$. This is like adding a third axis to the usual $x$-$y$ plane – this new axis is the $t$-axis.

Here is a graph of the parametric equations $x=\mathrm{cos}t$ and $y=\mathrm{sin}^{3}t$

Graph of a parametric relation

2-dimensional graph of a parametric equation created in SAGE Math

This, however, appears not to satisfy the definition of a function since there are several values of $x$ that are taken to two different $y$-values. Lets look a little closer at what is going on. If we add a further axis – the $t$-axis – to the diagram then this is what we see,

SAGE Math 3D Parametric Plot

A 3-dimensional parametric plot created in SAGE_Math

As you can see from the plot each value of $t$ corresponds to exactly one point in three-dimensional space.

If we look at this plot from a certain angle – in particular, straight down the $t$-axis we see the following

SAGE Math 3D Parametric Plot

3-dimensional parametric plot created in SAGE Math

Now if we ignore the effects of perspective we see exactly the original graph that we started with – so even though we originally thought that this did not satisfy the conditions to be a function, it actually does. By using the trigonometric identity $\mathrm{sin}^{2}t+\mathrm{cos}^{2}t \equiv 1$ we can show that the Cartesian form of this curve is given by $y^{2}=(1-x^{2})^{3}$ which is much more difficult to deal with than the parametric form of $x=\mathrm{cos}t$ and $y=\mathrm{sin}^{3}t$

Similarly $y=\sqrt{x}$ can be represented by the parametric equations $x=t^{2}$ and $y=t$ and again looking at the three dimensional plot straight down the $t$-axis gives a graph like the one earlier in the post. So sometimes things aren’t always what they first seem. With the help of parametric equations we can produce graphs of some very interesting curves that we can now treat as functions – not only that but parameterisations of curves and paths are critical to being able to do higher level calculus.

Following on from another post that I made recently on maths and music here is a video that I made of some wave-patterns that I created in SAGE Math of the common musical intervals up to an octave – I think it can be interesting to see what the waves look like so that you can see how the different frequencies interact with each other. There’s also a couple of wave patterns for some simple chords.

You might think that maths and music are a million miles away from one another. Music is considered a very creative subject, full of emotion and feeling – a piece of music can be interpreted in different ways by different people and although there are rules, they can be bent from time-to-time. Maths on the other hand….well….it just doesn’t have the same reputation. The strict rules surrounding the subject can often leave people with a cold feeling when it comes to maths. It’s difficult to imagine someone choosing to read a good proof in their free time rather than listen to a good piece of music (although some proofs are very exciting to read, I promise). But, somewhat surprisingly, maths and music are more closely related than first impressions might suggest.

Musicians use sounds produced by different instruments to create music – and on the other side of the coin, mathematics can describe in very precise way how those sounds interact. Musicians don’t necessarily need to understand the mathematics to produce amazing pieces of music and the mathematician may be completely tone-deaf but still be able to go into great detail about how sound waves combine in different ways.

I am going to try and explain from the perspective of a mathematician/non-musician how different musical notes combine and why some combinations sound pleasant and others dissonant.

This graph is of what you hear when a pure note is played – this example is an A of frequency 110Hz.


Pure A-110Hz

Graph of a pure A-110Hz note

If you multiply the frequency of this note by 1.5 you get the frequency of another note which is an E of frequency 165Hz. The melodic interval that you hear when you play the A followed by the E is called a perfect-fifth. If both of these are played at the same time then you hear the harmonic interval of a perfect-fifth. The waveform of a harmonic perfect-fifth interval looks like this.

Waveform of a pefect-fifth

Graph of the waveform of a perfect-fifth

Again starting with the A at 110Hz, multiplying the frequency this time by 1.25 we get another note, C# with frequency 137.5Hz. The A followed by the C# is called a melodic major-third and played together they would be a harmonic major-third. The three notes A, C# and E with frequencies110Hz, 137.5Hz and 165Hz played together make an A major chord and the waveform looks like this.

Graph of the waveform of a major chord

A graph of the waveform of a major chord

Similarly if you multiply the frequency 110Hz by 1.2 you get a frequency of 132Hz – this is a C and if instead you play the notes A, C and E together, the chord is a minor chord which has a waveform that looks as in the graph below. Notice that the waveform is not quite as regularly repeating as for the major chord – the level of irregularity of the wave is what makes something sound dissonant.

Graph of the waveform of a minor chord

A graph of the waveform of a minor chord

So using mathematics we can now “see” what the music and the chords looks like. These are really simple examples – notes produced by musical instruments are not typically perfect sine-waves but this is a starting point to a scientific analysis of music. An example that I really like is to take the A at 110Hz and another note at 112Hz (which is a bit higher frequency than an A but lower frequency than an A#) and have a look at the graph.

If you were to play these two notes together you would hear a regular beating effect – this is the waveform of the two when played together. The beating effect that you would hear are clearly visible on the graph – I have extended the horizontal time-axis to 2 seconds to make the beats more noticeable.

Beating when notes are played together

Beating effect of notes of slightly different frequencies

Notes can be derived from other notes in a variety of ways – the way that I have used here uses particular ratios of small whole numbers to get from one note to another called just intonation. Another way is to use powers of 12th roots of 2 called twelve-tone equal temperament, and it doesn’t have to be limited to twelve notes. As a non-musician I’m finding this music theory very interesting…I’ll be coming back to this again very soon I expect.

After blowing off the cobwebs after a couple of years I have been looking at some of the notes that I made some years back on some courses that I took at Warwick on Complex Analysis and Vector Analysis.

Integration has always been one of my favourite areas of mathematics. At A-Level I learned lots of different techniques for calculating some interesting integrals – but A-Level only just skims the surface when it comes to integration and it can be difficult for A-Level students (through no fault of their own) to appreciate the significance of integration. Integration by Parts, Integration by substitution and reduction formula are all great but there are still many integrals which require more advanced techniques to calculate. Contour integrals and the calculus of residues can often come to the rescue.

Contour integrals are a way of passing difficult integrals over a real-interval such as $$\int_{-\infty}^{\infty}\!{\dfrac{x^{2}}{1+x^{4}}\mathrm{d}x}$$ into the complex plane and taking advantage of the Cauchy integral theorem and the calculus of residues. I remember how it felt when I first learned the formula for integration by parts because it meant that I was able to find integrals that were previously impossible for me to calculate – even though I have done contour integrals before it has been very exciting for me to re-discover them. Looking through one of my books I came across this problem – show that for $a>1$

$$\int_{0}^{2\pi}\!\frac{\mathrm{sin}2\theta}{(a+\mathrm{cos}\theta)(a-\mathrm{sin}\theta)}\;\mathrm{d}\theta = -4\pi\left(1-\frac{2a\sqrt{a^{2}-1}}{2a^{2}-1}\right)$$

After spending a good deal of one of my afternoons wrestling with the algebra I managed to arrive at a solution which you can download here as a pdf. Here is a graph of the integrand in the case when $a=2$

Graph of a function drawn in SAGE math

As you can see from the diagram, the area bounded by the curve and the $x$-axis certainly exists but trying to calculate this integral using A-Level techniques is going to be incredibly difficult if not impossible (if anyone can do it then I would love to see the solution). Unfortunately there are and always will be integrals that cannot be calculated analytically – this is just the way it is and there is no getting around it but contour integrals certainly allows you to calculate a huge range of integrals that previously would have been seemingly impossible.