Monday, March 1, 2010

Fourier's great idea


As students enter second year mathematics, they will be introduced to a famous mathematical concept called the "Fourier Series", which (unsurprisingly) developed by Fourier in the early part of the 19th century. The Fourier series is based on a very elegant idea that has proven to be very useful in solving equations described the motion of waves, the flow of heat and almost any function or physical behaviour that has a bit of "up and down" (which mathematicians call "periodic").

The basic idea is that any periodic function can be approximated by combining sine and cos functions in an infinite series:

e.g. f(x) = constant + a1cosx + b1sinx + a2cos2x + b2sin2x ......

In this form, the overall period of this function is 360 degrees (2 pi) - you can easily prove to yourself that when you combine trigonometric functions of different periods, the longest period dominates the overall periodic behaviour of the series. Like the Taylor series (which uses an infinite combination of polynomial terms), the more terms included in the series, the greater convergence between the series and original function.

This idea is, in fact, correct for many continuous and discontinuous functions though Fourier's original development of the series (in 1822) did not elucidate the limits of this theorem. Fourier did develop a very clever way of evaluating the constants in the equation through integrating combinations of f(x) and sine and cosine functions over one period of the function. This procedure, which now can be easily performed by computers ("Mathematica" or my favourite website http://www.alphawolfram.com/) or by a hard working second year engineering student armed with a table of standard integrals.

The Fourier series, long with Taylor's series, is one of the most important mathematical tools available to engineers and scientists for analysing wave functions (e.g. radio waves, music, surf. etc.), solving differential equations and even as a means for compressing and storing data.

Friday, August 21, 2009

The Multi-dimensional Universe


In first year engineering mathematics course at Swinburne we try to lead students from the boring 2-D universe of high school (uniforms, canteen lunches and x vrs y graphs) to the much more exciting and vivid multi-dimensional world of advanced mathematics ! This progression - more of a leap - requires some imagination and determination. The first step is the visualisation of 3-D space, than a progression to a more general idea of "dimensions". When I teach partial differentiation, I get the students to think about how the slope of a hill changes when you keep one dimension constant (i.e. don't move sideways and walk upwards), as compared to the slope if you swap the dimensions you keep constant (i.e., don't move upwards but only sideways). These relationships become clearer when you draw graphs of these relationships for different physical environments (e.g. slopes in a valley as opposed to a ridge or a steep point hill). This type of approach can give you a sense of what the mathematical symbols means. These hill walking mental games are not just metaphors for the mathematical operations we are studying but direct physical examples of the mathematical ideas we are exploring.

The imagination is also required when making the next intellectual journey ....that is, seeing the concept of dimension in a more general way. For example, realising that when studying how heat is flowing through the wall of a house, you can visualise the "valleys" and "hill tops" that the temperature profile will take in the three spatial dimensions of the wall, in the same way that you extended your view of the world by moving beyond x and y graphs. If you can visualise "temperature" as an extra "dimension" in the wall than you will start de-mystifying the mathematical operations taught to you (partial derivatives, cross products, etc.). After all, we are studying these operations for largely practical reasons, such as, calculating the temperature profiles of walls, the velocity profile of gas flowing in a duct and a myriad of other engineering problems, so visualising the mathematics in physical terms provides a direct intellectual route to performing the engineering calculations that any decent engineer would like to make. Some determination is required to master the mechanics of these operations - my head still spins a little when taking the partial derivative of a partial derivative - but I would argue that the imagination/visualisation part of this trip is the most difficult and most rewarding aspect of first year mathematics.
Welcome to the multi-dimensional universe !

Saturday, June 27, 2009

The Mathematics of Measurement


We are surrounded by measurement devices. The modern world is abound with instruments providing values for temperature, humidity, weight, time, speed, force, pH, radioactivity, power, height, voltage, current and even our attractiveness to the opposite sex ! It is a naive person indeed who accepts a measurement on face value. Accurate and reliable measurement of any quantity is difficult and errors, whether they be random or systematic, are normal.

For example, if you are told that the temperature of your house is 26.56632 C, a thinking person would ask:

How do you know the value to such accuracy ?

At what time did you take this value and does it vary with time ?

Is the value an average of many values taken from many positions in the house or is taken from a set position in the house ?

If taken from one position, is this value representative of the "house" as a whole ?

If it is an "average" value, how precisely is this average calculated ?

Are there any corrections made for the way the thermometers are distributed in the house ?

For example, if there are ten thermometers in the basement and only one in the front lounge, wouldn't a straight averaging of these values give a distorted figure ?

How much variation is there in the values "averaged" ?

Does this variation in the case of multiple values relate to the position of the measurement or is apparently random ?

Have the thermometers been calibrated against a standard ?

These questions all converge onto two main points: What does the measurement tell us about the system we are studying and how accurate is the measurement ?

Mathematics is highly useful in evaluating many of these issues. For example, statistics can be used to evaluate variation in measurements and calculus can be used to "average" values and quantify variation. Above all, mathematics can ease the hand waving and provide quantifiable answers to these questions.

For example, imagine you are calculating the distance travelled by a trolley moving at constant velocity, using the very simple formulae:

distance (m) = velocity (m) x time (m) or D = V x t

The velocity has been measured as 22.35 m/s and the time has been measured as 10.00 s. What is the error associated with this calculation ?

Given there crude measurement, we can assume that there the random error of the measurement is one half of the last graduation of the device. Simply put, if you are using a mm graduated ruler, we can assume that the error associated with the rule is +/- 0.5 mm. This may not be correct, for example, if my sight is poor the error may become larger or if the graduations on the ruler have been badly printed, this assumption may also be too low. Another possibility is that I incorrectly placed the ruler and introduced a large systematic error (as opposed to the "random" errors I have been discussing) However, without any more information the "half the smallest graduation" principle is a reasonable starting point for our deliberations.

Therefore, in this calculation, we can assume the that the velocity is 22.35 +/- 0.005 m/s and the time was 10.00 +/- 0.005 s.

Method 1.

We know from the fundamental derivation of calculus that dD/dt is approximately equal to (small change in D/small change in t) or more simply put the gradient of the curve at a particular point is approximately equal to the ratio of a small change in the resultant variable to a small change in the independent variable. This principle can be used to approximate the error using the following formulae:

error in D = dD/dt x error in t = V x error in t = 22.35 x 0.005 = 0.11175 m.

Therefore, we have the result of 223.5 +/- 0.1 m. This approach ignores any error in the V value, as it treats the problem as being D = f(t). This would be fine if V was truly constant or the error associated with V was very small compared to that associated with t. This approach is particularly useful when the function is complex (e.g. D = Vcos (t^2)) and other methods are difficult to use.

Method 2.

We estimate the error by calculating the answer using the most pessimistic values and take this answer away from the value calculated without considering the error. In this case:

(22.355 x 10.005) - (22.35-10.00) = 223.66175 - 223.5 = 0.16175m

Therefore, the answer is 223.5 +/- 0.16 m.

Method 3.

It can be shown by a simple proof, that when the errors associated with measurements are relatively small, that when two values are multiplied together, the relative error (absolute error/value) of the new value is the sum of the relative errors of the original values. In our example, this results in:

error in D = D ((error in V/V)+(error in t/t)) = 223.5 ((0.005/22.35)+(0.005/10)) = 0.16175 m

Therefore, the answer is 223.5 +/- 0.16 m.

Clearly, the first method underestimated the error and the results from the final two techniques should be used in this case. This simple example illustrates some of the complexity in determining what a measurement really means and how mathematical approaches are useful and dealing with the complex issues associated with measurement.

Sunday, June 7, 2009

The Business Mathematics Connection


Niall Ferguson's "The Ascent of Money" is a highly entertaining history of business that seeks to explain how business practice has had a profound effect on human history. The title of documentary series is a deliberate pun on the influential BBC TV series "The Ascent of Man" from the 1970s. This series presented a grand overview of the history of human civilisation, in which commerce was barely mentioned, where as Greek mathematics and Galileo's trail by the church were described in great detail. Apparently, a young Niall felt that something was missing and decided that once he had become a world famous economic historian he would have his revenge ! I, for one, enjoyed the pun !

In one episode, Ferguson traced the history of lending, arguing that the fortune generated by the business innovations of the Medici family and other Italian businessman effectively funded the Renaissance. This claim may somewhat under estimate the importance of artistic and scientific ideas but is certainly an effective counterbalance to the traditional dis-taste and dis-interest that many historians have shown towards the influence of commerce on human affairs.

Of particular interest to me, was Ferguson's emphasis on the impact of the introduction of "Arabic" numerals to Europe (which we now know came from India) on the ability for traders to effectively barter and exchange currency and goods. As Ferguson explained, Roman numerals, was practically useless for large commercial transactions and that Southern European traders found the counting systems used by their counterparts from the Muslim world to be far more practical. In this way, business lead a revolution in mathematics.

This link between business and mathematical innovation is profound. The very business of counting in groups of numbers (binary, decimal or duodecimal) is almost certainly linked to the growth trade in the ancient world. The concept of exponential functions is similarly linked to the development of interest calculations and banking practices in the late middle ages. It is also well established that basic concepts of probability and statistics were developed in a business context, in particular, around the complicated calculations of insurance and risk assessment in the 19th century. This interaction between business and mathematical innovation continued in the 20th century with the development of game theory and other techniques of discrete mathematics.

I'm personally not surprised by this profound link. In my own experience in small business, the back and forward of everyday commerce is a fertile ground for innovation and new ideas. The atmosphere is very different from academia, where often new ideas can be squashed by petty snobbery's, ideological positions, intellectual fashions and just plain conservatism. In business, the attitude often is, if it works, than lets use it ! This, of course, means that lots of mediocre ideas also fly but that's part of territory.

I look forward to the next episode of Ferguson's "The Ascent of Money" and learning more about the link between "dirty money" and mathematics !

Friday, May 29, 2009

The Ascent of Freeware


In the last month, a new website created by a team lead by Stephen Wolfram (http://www.alphawolfram.com/) has generated considerable interest among mathematicians, scientists, engineers and the wider community. In the popular media, the site is characterised as an attempt to challenge the supremacy of "google" but a visit to Alpha Wolfram will quickly reveal that the site offers a very different service. For example, one can type "Integrate x^2cosx" and get a full analytical answer to the integral (including the steps), an alternate solution, a graphical representation of the integral, a definite integral solution and a series expansion of the solution, within seconds. Impressive indeed ! Type in "Solve x^3 + 2x^2 + x - 6 = 0", and the full solution of the cubic with steps and graphical interpretation appear moments later. Certainly, I have been able to think of analytical problems that the software can't deal with and the on line service is not really appropriate for dealing with large data sets (see http://www.scilab.org/ for powerful freeware for manipulating matrixes and high level scientific programming), but this is nit picking - Alpha Wolfram is a triumph.

Alpha Wolfram places much of the analytical mathematical power of Mathematica and Maple in the hands of anybody with access to the web. AND IT IS FREE ! It will cause mathematics teachers at all levels to re-think what kind of homework questions are worth asking, in particular, it should push assessment towards "setting up the problem" and "analysing the answers", and away from the application of largely mechanical procedures for solving various standard equations. It maybe to early to say the traditional idea of getting a 1st year Engineering student to go through hundreds of standard integrals is now dead but certainly, this approach is in danger of becoming irrelevant and going the way of "log tables" and using Euclid's "Elements" as a textbook.

Viva La Freeware !!

Sunday, May 17, 2009

In Praise of Newton-Raphson

The Newton-Raphson technique for finding roots of equation via an iteration process is one of the first numerical techniques taught to students of mathematics. As a technique, it illustrates important features common to many numerical techniques used in mathematics, namely:

A) it is based on a very simple mathematical idea, that is, that extrapolating a value from a curve back to the x axis, by assuming a linear relationship, is a good way to form a more accurate guess for the intercept of the curve with the x axis,

B) after a few manual calculation using the technique, you are eternally grateful to the inventors of the computer (Hail Babbage, Turing, Zuse and friends !)

C) it is very simple to turn the procedure into an automated program,

D) the better the initial guess, the quicker you will arive at the solution and save computational time,

E) the more accurate the solution you desire, the greater the number of iterations,

F) finding a strategy for dealing with rounding errors and storing numbers with the appropriate level of precision between iterations are not trivial problems,

G) without care, it is possible to diverge of the wrong solution or (even worse) even to send the computer off to an unending loop of diverging solutions (i.e. "wrong" over and over and over again), and

H) it really works - there are few curves that it can't deal with but these are relative oddities compared to the great number of curves that the technique solves readily.

As a young engineer, I wrote several programs that used the Newton-Raphson technique to find solutions to the various equations I had formed in my models. Invariably, once I had found a good method for avoiding divergent solutions, the Newton-Raphson routine would find a solution. Like many before me, I found the technique surprisingly powerful , verstaile and useful. Now, students can "play" with the technique using graphical calculators or spreadsheet programs on a lap top. In essense, once you have a "curve", whether it be formed by data or through a known equation, the technique can be used to find solution for particular intercepts (e.g. y = 0) without having an analytical solution - that may not be possible or indeed just beyond your algebraic ability.

Saturday, May 2, 2009

The Box Problem

A common problem used to illustrate how differential calculus can be used for optimisation is "the box problem". The box problem goes as follows; imagine you manufacture boxes (W metres wide, D metres deep and H metres high) and you wish to minimise the amount of cardboard used to produce your standard box with volume V (V= W.D.H cubic metres).

The first step is to set up an area equation, which is the quantity that we are trying to minimize:

A = (area of the two sides defined by the width) + (area of the two sides defined by the depth) + (area of the top and bottom sides)
=2W.H + 2D.H + 2W.D

Now we have three unknowns and two equations. One option is to form solution based on an assumed ratio (C) of the width to the height, which we can use to simplify our area equation to:

A = 2W.H. + 2(V/W) + 2(V/H) by using the the volume equation to substitute for D and using C= W/H, we get :

A= 2C.H^2 + 2 (V/C.H) + 2(V/H) = 2C.H^2 + (2/H)((V/C) + V)

If we graph this function (A vrs H) and forget negative values of both A and H, we can see a clear vertical asymptote along the A = 0 and a minimum near the origin that is a function of our choices for V and C. Of course, this equation is ripe for differentiation:

dA/dH = 4C.H - (2/H^2)((V/C) + V)

At the minimum, it must follow:

dA/dH = 0 = 4.C.H - (2/H^2)((V/C) + V)

therefore,

H = ((V + VC)/(2 C^2))^1/3

Now, we have a ready way of optimising the quantity of cardboard for any given volume and ratio of height for depth. What solutions do we get if we assume a certain ratio to the width to the breadth ? Which is the true minimum (i.e. independent of our assumptions of ratios of dimensions) ? Excellent questions ! Start analysing and optimising ..... welcome to Applied Mathematics !