Monday, September 3, 2012

Laplace Transforms on Wolfram Alpha


The use of Laplace Transforms in control theory and in signal analysis took off after WWII and has become a widely established tool of analysis. When I was a student in the dark ages (before the Internet and reality TV), we used look up tables to determine Laplace Transforms and their inverse. These tables are still widely used but online tools like Wolfram Alpha can also be readily used.

Like many aspects of Wolfram Alpha, the commands are largely intuitive and the program is forgiving with syntax:

For example, type in "Laplace Transform (t sin(2t))" into the dialogue box will produce the following answer and a graph of the function F(s). The graph of the transform is a nice bonus above the traditional look up tables, as it helps appreciate the new function that you formed through this transformation.

The inverse operations are just as simple. For example, the program only blinked for a few moments on "Inverse Laplace Transform (3s /(s^2 + 6))" to produce "3 cos(SQRT(6) t)". Once again a useful graph is generated and can be downloaded.

I encourage you to test how good Wolfram Alpha is at solving the inverse problems. Man (and Woman) against machine is always fun.

I'm sure Marquis de Laplace would have been impressed !!





Who was Laplace?



Pierre Simon Laplace (1749-1827) is a giant figure in the history of mathematics and astronomy. His career coincided with great upheaval in his home country of France, in particular the overthrow of the Bourbon monarchy and the rise and fall of Napoleon Bonaparte. Laplace was the son of a farmer (as was Newton) and was brought up in Normandy before going to Paris and becoming a Professor of Mathematics at the Ecole Miltaire. Several great mathematicians, physicists and engineers were associated with the military schools in France at the time. For example, Fourier (1768-1830) and Carnot (1796-1832) followed a similar route and had a great impact around the time of Laplace. This golden era of French mathematics and physics is directly connected to the political and social upheavals of the time. Napoleon was a great supporter of mathematics and science in France, and himself closely associated with many of the leading mathematicians of the time. Carnot's father was a general in Napoleon's army and Fourier was a trusted associate of Napoleon, famously serving as a Governor of Lower Egypt. Laplace himself is famously reported to have quipped to Napoleon "I have no need of the hypothesis", when queried by the Bonaparte why his book on planetary motions didn't mention god.

Laplace's interests in understanding the motions of planets, particularly that of Saturn and Jupiter, are linked with his developments in Mathematics . Laplace also formed a famous theory on how the planets originated. He theorized that the solar system started as a massive cloud of dust that collapsed to form the sun with the remnants condensing to form planets. An updated versions of this model of planetary formation is now widely accepted and substantial evidence has now been gathered to support this theory. Laplace came up with many novel ideas about solving differential equations, particularly, through the use of potential functions. The famous second order differential equation named after him is widely used throughout physics and mathematics. Lapalce also made significant contributions to probability theory and numerical techniques for solving equations. The famous "Laplace Transform" used widely in control theory and signal analysis is actually a variation of the approach taken by Laplace himself, though his ideas made a significant contribution  to the development of this type of analysis.

Laplace's worked during a time when there was less clear distinction made between mathematics and physics. His great success in making contributions to both fields suggest that maybe the modern tendency towards  narrow specialisation is not helpful to developing new ideas. Certainly, his work is an inspiration to those who wish to work across fields.

References
Larousse, Dictionary of Scientists, 1994
Wikipedia entry on Pierre Simon Laplace (accessed September 2012). 


Friday, August 17, 2012

Odd and Even Functions - Oddly Interesting


The idea that functions can be either "odd" or "even" is an initially a surprising idea.

Yes, a number can be odd or even and some people are odd but can a function be odd or even ?

The formal definition of an even function is that f(-t) = f(t) for all of t, while for an odd function f(-t) = - f(t) for all of t.

These formal definitions don't immediately expose the power of the concept. Examining graphs of odd and even functions quickly reveal why the concept is useful and interesting. For example, below is a graph of the function is x^3sin(x), which satisfies the condition of an even function.



 Figure: Plot of x^3 sin (x) (image from Wolfram Alpha)

Please note the following that the function is fully symmetrical around the y-axis (which is is the same as saying f(-x) = f(x)) As a result, iintegrating the function from 0 to any positive value of x will have the identical answer as integrating from 0 to the same negative value. This also means that integrating f(x) from x= -b to x= b is the same as doubling the definite integral from x= 0 to x= b.

Some common even functions include, f(x) = x^2,  f(x) = cos(x), f(x) = SQRT(1 + x^2), f(x) = 1/(4-x^2) and many more.

Odd functions also have an underlying symmetry but it is 180 degrees around the origin. For example, plotting  f(x) = x^2 sin(x) quickly reveals a quite different symmetry from the x^3 sin(x).


Figure: Plot of x^2 sin(x) (image from Wolfram Alpha)

For odd functions, the y value for a particular positive value of x (say x= b) will by -y for x = -b. As a result, the definite integrals from 0 to b will all be the same absolute value but the opposite sign for 0 to -b. Thus, integrating any odd function from -b to b will always results in "0" as the answer (a nice relationship to exploit when simplifying definite integrals in Fourier Analysis). This is all obvious from looking at the graph above. As often the case in mathematics, symmetry is a wonderful thing !

The relationships that follow on from these simple definitions are even also satisfying, namely:

a) An Odd function multiplied by an Odd function results in an Even function ( O x O = E)
b) An Odd function multiplied by an Even function results in an  Odd function (O x E = O)
c) An Even function multiplied by an Even function results in an Even function (E x E = E)
d) The reciprocal of a Odd function is an Odd function ( 1/O = O)
e) The reciprocal of an Even function is an Even function (1/E = E)

Somehow, these relationships seem intuitive and are in keeping with our numerical sense of "odd" and "even". They can also be easily confirmed through plotting and/or simple substitution.

In fact, I strongly encourage you to prove these relationships to yourself. That way, you will really see what is oddly interesting about symmetry.














Saturday, August 11, 2012

Why Engineering Mathematics is not a "service" subject


We all have sensitive points !

I find that discussion of the 1976 Olympic Men's Hockey final distressing (Yes, Australia lost to New Zealand but please don't talk about it). A statistical analysis of the Bulldogs performance in AFL is another matter that is best left alone with me (OK, we only have one Premiership).

At work, the description of Mathematics as a "service" subject in Engineering is likely to raise the blood pressure. The term service implies that mathematics is some kind of ssecondary topic to Engineers, a kind of background material before they get to the meat of their degree.  RRRRRRR

Of course, some Engineers don't directly use much mathematics in their daily jobs, this is a particularly true in areas of management, sales/marketing and production. Even in the "hard" technical areas of Engineering such as design and research only a few are regularly performing mathematical operations in their daily jobs. Quite correctly, alot of Engineering involves "soft" skills associated with teamwork, communication and generic management skills. I feel no need to denigrate these skills compared to mathematics, physics and the core sciences associated with engineering, as it clear to me that great engineering is much as a triumph of organisation and human co-operation, as it is a celebration of powerful mathematics and science.

The film "Apollo 13" (and book by Jim Lovell and Jeffrey Kluger) is an excellent portrayal of the need for strong leadership and teamwork, as well as deep technical knowledge, in solving challenging technical problems - in this case, finding a way to safely return astronauts from a damaged spaceship. "Huston, we have a problem" is the famous catch phrase from the film. This classic understatement from Gene Kranz (the legendary NASA flight director) who muttered these words in real life, emphasised the need  for calm analysis in the face of imminent disaster. As the films shows in some detail, what follows. is a story of determination, teamwork, careful sciscientific analysis of data and systematic evaluation of the options. The hero's of the films are as much the scientists, engineers and technicians on the ground as the three men in the damaged ship. We see the various players carefully checking calculations, modifying equations and running algorithms, as the drama unfolds. Human joy is unleashed as the Astronauts voices are heard after splash down, even the rock like Kranz sheds a tear.

What a wonderful celebration of Engineers and Scientists !

And here is my point ..... all of this is underpinned and linked by mathematical skills and the language of mathematics. It is rigorous training in arithmetic, trigonometry, algebra and advanced mathematics that allows the engineers to make sound choices under extreme pressure. As they rush to find the right path home, it is confidence in the core mathematics and physics behind their calculations that allows them to make life and death decisions.

Of course, not many engineering projects are as dramatic as "Apollo 13" but the point remain the same, even when engineers are not directly carrying out mathematical operations and analysis, it is their training and confidence in mathematics and fundamental sciences that empowers them to make wise choices.  Mathematics is not only the language of technology but also one it its corner stones. Mathematics is not "servicing" Engineering, it is a core topic, a central part of its nervous system and present in all its vital organs.

In summary, my advice to any young engineer is to pay close attention to your mathematics, develop your analytical skills and avoid supporting sportings teams that have only spasmodic success.




Saturday, August 4, 2012

Integration Using Wolfram Alpha

Wolfram Alpha is a web based tool that allows you carry out quite sophisicated mathematical operations, producing both analytical and graphical answers. The operations of Wolfram Alpha are based on the software "Mathematica" that was developed in the late 1980's by Stephen Wolfram and his team. The web tool is much more forgiving than the off line software in terms of syntax, though Mathematica is much more powerful and can be used as a sophisicated programming language.

However, Wolfram Alpha is simple to use, performs most mathematical opeations relevant to undergraduate and High School students and is FREE !!! 

To illustrate this great utility, head to www.wolframalpha.com, think of a mathematical operation and type in your question.

I typed in "Integrate cos(x) from x = -pi to pi" into the input box and pushed enter. If you don't feel so game as me, you can go to the example page where there are numerous examples of mathematical operations that can be performed and the input forms preferred by the program. If you guess the form, like I often do, the program will do its best to make sense of your crude mathematical jottings,

A few micro seconds later, the following output came back:





(Images from www. wolframalpha.com)

The graphs generated by Wolfram Alpha are good quality and can be saved as PDFs. I also think the graphical nature of the solution is most helpful in visualising the mathematical operation being performed. For example, the symmetry of cos(x) integral around the y axis is quite evident in the solution above. This property means that we classify cos(x) as an "even function". A parabola is another example of an even function. "y=x" and "y=sin(x)" are simple examples of functions that don't have this symmetry, which I will discuss in more detail in a later entry.

Of course, this problem is too simple, now I type in a problem that is a little more challenging:

"Integrate x^2 cos(x)"

Wolfram Alpha eats up problems like this (this one would take me several minutes using pen and paper and even a a few seconds using my well worn integral tables) and even provides the solution steps, which is an invaluable to any student (or even a rusty Professor) trying to get on top of the mysteries of integration.


and another useful graph



(Images from www.wolfamalpha.com)

Once again, note how the graphical representation of the function makes it immediately clear that the function has a particular symmetry.

Wolfam Alpha has it critics and Stephen Wolfram himself is a controversial figure but personally I am most grateful to have access to such a obviously useful tool.



Sunday, August 8, 2010

Out of the Flatlands !

Today, I commence lecturing in HMS 112 (the second session subject mathematics subject for first year students at Swinburne), which is exciting for me and hopefully also for the students ! Of course, I appreciate that students returning from the break may still be building up enthusiasm for the subject ... I suggest a shot of caffeine and a gentle start.

Why is it exciting ? Because I get to escape the "flatlands" of high school mathematics for once and all; I leave behind x y plots and simple one variable problems and head towards the valleys and byways of 3-D land, where unexpected dips and rises test your powers of visualisation and calculus. Where a slope is not a simple slope but needs to be defined relative to the land around it and where the mathematical symbols get curly and more cryptic !

Even at this stage of the adventure, our powers of imagination are being tested (was is the difference between a circular paraboloid and a two sheet hyperboloid ?) and we haven't even entered complex number land yet !!!!

My advice to students entering this new land .... hold on, enjoy the ride and keep a sense of humour.

Saturday, March 6, 2010

Fourier Series and other amazing feats on WolframAlpha


As occasional visitors of my blog would know, I am a great enthusiast for http://www.wolframalpha.com/. For those unfamiliar with the Wolframalpha website, it is a powerful online tool that allows you perform quite sophisticated algebraic feats with excellent graphical solutions provided with details of the algebra. Fortunately, the commands for the software are quite intuitive and easy to learn. I suggest going to the website and start playing (try "plot x^2sinx", "Integrate xcos(x^2) from x =1 to 3", "Differentiate x^2In(x)" and "Solve x^3-2x^2 + 6x - 10 =0" for starters - there is an example page to help you with syntax and common commands).

For students studying Fourier Series, the site is particularly useful. Some of the exercises I can recommends for students of the Fourier Series:

A. Visualising the periodicity of function with multiple terms

e.g. Compare a "Plot Sin(x/2) + Sin(x) + Sin(3x)" with "Plot Sin(5x) + Sin(x) + Sin(3x)"

B. Integrating terms in evaluating the coefficients of the Fourier Series

e.g. If you are determining the "a1" coefficients for f(x) = 2x + 3 over the period 2pi, "Integrate (2x+3) cos(x) from x = -pi to pi"

C. Carrying out a full Fourier expansion of f(x) over a period of 2pi for n terms

e.g. "FourierTrigSeries 2x+3, x, 6"

D. Checking whether a certain function is odd or even

e.g. "Plot x^2, sinx" to compare an even with an odd function, and "Plot x^2 sinx" to see what happens when you multiply an odd and even function.

E. Performing a half range cosine expansion of a function with a period of 2pi

e.g. "FourierCosSeries 2x+3, x, 6"

F. Performing a half range sine expansion of a function with a period of 2pi

e.g. "FourierSinSeries 2x+3, x, 6"

G. Carry our a Fourier series expansion in complex form

e.g. "FourierSeries 2x+3, x, 6"

In all cases, the software can be used to aid learning and also check the answers you are calculating or deriving, AND IT IS ABSOLUTELY FREE !

Wednesday, March 3, 2010

Going from words to symbols


One of the important skills that we develop in Engineering mathematics, is the ability to develop mathematical relationships from written (or verbal) descriptions. This translation (or perhaps interpretation ?) from "ideas" into equation form is challenging because its requires both mental dexterity and familiarisation with mathematical language.

It does take some confidence to translate "If you have a room of volume 60 cubic meters, that is one meter higher than it is wide and one meter longer than it is high, what are the dimensions of the room ?"

into

(x+1)(x+ 2) x = 60; w=x, h= (x+1) and L=(x+2), solve for x

This is particularly apparent when first year engineering mathematics students tackle vector problems that start with descriptions like "A ferry is crossing a river ....". I think this dis-comfort reflects a background of solving problems that either already defined in mathematical terms or has a ready made picture representation provided with the problem. Unfortunately, the problems presented to engineers and applied mathematicians are rarely presented so neatly.

My advice to developing this skill can be broken down into the following steps:

a) Try to represent the problem as a picture through a freehand sketch (labelling lines and symbols from the written description of the problem).

b) Try to visualise the problem from this picture representation, forming an image in our mind, identifying what specific problems you are trying to solve.

c) Express the problem in symbolic form, writing down definitions of the symbols you are using or any assumptions you need to make.

d) Solve the equation (or equations) you have formed, showing each step systematically.

e) Look at your answer and your original picture of the problem and ask yourself two important questions:

(i) Have you answered the original question ?

(ii) Does your answer make sense ? (Is it believable ?)

Of course, like any skill, practice will develop your abilities. It must also be admitted that there is an element of "art" to the processes described above that is beyond words or description .... which makes it fun and challenging !

Tuesday, March 2, 2010

Vectors made easy !


The unit vector notation used in Engineering mathematics is wonderfully simple and powerful.

Imagine we have a position in the x/y plane, lets call it P, and we want to form a vector from the origin to this point. We call that position vector OP.

Lets say that P is located at x=2 and y=3, now we can draw a line from the origin to P and put an arrow head along it. We have a vector.

Now lets define the unit vector (i.e. one unit in a particular direction) in the x direction as i and the unit vector in the y direction as j.

We can now say OP = 2i + 3j.

Lets try a few things ....

What is the magnitude of this vector ?

If we draw a right angled triangle from OP, we can quickly see that the magnitude of OP must be equal to the square root of (2 squared + 3 squared) = sqrt(13).

What is the unit vector of OP ?

It must be OP/sqrt(13) i.e. one unit in the direction of OP.

What about if we want to add another vector (OQ = 4i + 1j) to OP ?

OP
+ OQ = (4 + 2)i + (3 + 1)j = 6i + 4j.

What if I want to find the vector QO ?

QO
= -OQ = -(4i + 1j) = -4i-1j

What about if we want to find the vector PQ ?

We use the head to tail rule and say PO + OQ = PQ = -(2i + 3j) + (4i + 1j) = 2i - 2j.
This approach makes the whole problem of manipulating vectors easy and more powerful than constantly referring to angles and scalar qauntities.

Monday, March 1, 2010

Who was Fourier ?


Joseph Fourier (1768-1830) like many brilliant scientists and mathematicians before the 20th century and modern tendency towards narrow specialisation, excelled in many fields and combined theoretical brilliance with practical ability. An orphan at the age of ten, he was educated in a military school and an abbey, showing outstanding mathematical ability from a young age. Joseph was a man of his times and played his own role in the French Revolution, subsequently serving in Napoleons armies before taking up a position at the Governor of Lower Egypt (imagine, your mathematics lecturer being the governor of lower Egypt !). He loyalty to Napoleon continued, as he also served in his armies during Napoleon's brief return to power in 1815. Certainly, the revolution had been important in providing a person like Fourier of humble birth ( he was the son of a tailor) opportunities to excel and make a mark in French society.

After several adventures in Egypt, he returned to France and mixed his ability in administration with experimental science and mathematics. He was made a Baron in 1808 and served in senior roles in the Academy of Sciences. Fourier was particularly interested in finding mathematical methods for describing heat flow. It was in this context that Fourier developed the idea that any continuous or dis-continuous function could be expressed as a infinite series of trigonometric functions. He wasn't able to prove this to be correct or general but he did develop techniques that proved invaluable since for many wide ranging mathematical problems. It is Fourier who showed that any complex wave form could be broken down into a combination of simpler wave forms. This remains a brilliant insight that guarantees his place as one of the great figure of mathematics. Merci Monsieur Fourier !

PS. In recent times, people have argued that Fourier was also the first to correctly identify the mchanism of global warming (see http://www.aip.org/history/climate/co2.htm)

Sources:
Larousse, Dictionary of Scientists, 1994, New York
Delvin, The Language of Mathematics, 1998, New York
Wikipedia

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 !

Friday, April 24, 2009

Practical Implications of Calculus

Calculus is widely used by engineers and scientists to analyse practical problems. One common approach is to analyse a particular system using fundamental physics for a particular geometry (e.g. a force balance around a spherical particle falling in a liquid) to form equations. These equations are than either integrated or differentiated to produce useful relationships for a given set of boundary conditions (e.g. settling time of a particle as a function of size and density for a given initial particle velocity). The success of this approach normally depends on the nature of the phenomena being studied (some very chaotic and/or highly non-linear phenomena are difficult to model), the assumptions made in setting up the problems and the difficulty in solving the equations formed. Often, numerical techniques are used to find solutions to these equations and any good engineering mathematics course teaches a range of relevant numerical techniques to differentiate and/or integrate equations that are either difficult or impossible to solve directly.

Another interesting application of calculus is to analyse data. Consider a set of data collected in an experiment ..... imagine we are measuring X and Y simultaneously. When we plot X against Y, the curve generated may clearly show a relationship exists but the relationship is not simple or immediately apparent. A very simple method to start analysing this mysterious relationship, is to differentiate the X Y plot numerically (i.e. calculate the slope at points along the curve) and form a new plot of dX/dY vrs X. Now remember that we differentiate particular functions, new very specific relationships are formed. For example, differentiating a trigonometric function will generate another trigonometric function, and in the case of simple trigonometric functions like sine and cosine, functions are formed that have very specific geometric relationships to the original functions (e.g. cosine has the same shape and periodic form of sine but is "out of phase" with that relationship). In the case of polynomials, differentiating produces a function of lower order; the slope of a cubic follows a parabolic relationship, the differential of a parabolic functions produces a linear function and so on. This means that by differentiating a curve (i.e. measuring the slope of the curve at each point) some of these underlying relationships in the data maybe revealed.

This approach can be extended to differentiating the dX/dY curve formed, as double differentiation also can unlock some underlying relationship For example, differentiating sinX will form cosX and differentiating that relationship will produce a negative version of the original relationship. Double differentiation of a cubic function will generate a linear function (try it !). Thus, the "slope of the slope" can potentially tell alot about the original relationship. This line of attack can be extended to integration, through measuring the area under the Y curve and plotting this relationship against X. Of course, both taking the slope and measuring the area can be used in combination to tackle the problem.

The beauty of this methodology is that the procedure is very simple (e.g. measuring a slope of a line) and easily automated. You can try it yourself .... I suggest asking a mathematically inclined friend to dream up a complex function that is the combination of well known simple functions (e.g. cosx + x^3 + exp(x)), get him or her to form an x y table of values from this relationship and than ask you to derive the underlying relationship from this data set. The detective job in front of you is made simple by modern graphical/CAS calculators that allow ready numerical differentiation and integration of curves. Sometimes, a combination of intuition, luck and insight is required to identify the underlying relationship but the journey is normally fun. Try it !!!

Thursday, April 23, 2009

Thinking about the foundations of calculus

Just recently, I went through the standard derivation of the fundamental theorem of calculus with my students ..... forming tangent lines to a curve, calculating the gradient of that line using an increment, taking the increment towards infinity than repeating similar arguments for the area under a curve before forming the wonderful conclusion that the mathematics of calculating an area under a curve is the reverse of the process for calculating the gradient of a curve. In short, if you understand the mathematics of change, you also understand the mathematics of accumulation and vice versa. This was the brilliant insight that both Newton and Leibniz claimed as their own in the 17th century and formed the basis of the field we know as "Calculus".

This derivation is rightly considered one of the great mathematical breakthroughs of all time and its conclusions are indeed far reaching. During the lecture, I presented the orthodox view that Newton and Leibniz are the great intellectual heros of this breakthrough with a nod of appreciation to ancient Greeks like Archimedes who developed integral calculus via the method of exhaustion. As I was going through these arguments, I found myself questioning this idea of Newtons and Liebniz's pivotal role in the development of calculus. Wasn't the real breakthrough the idea that if you take an increment and imagine it decreasing towards infinity, you can drive useful geometrical relationships ? Isn't that idea, which I think we can accredit to Archimedes, the real intellectual breakthrough ? If you know that idea and have the tools of Cartesian co-ordinates (thank you Descartes !), than won't the relationships that Newton and Leibniz formed eventually fall out ?

Even as I write these heretical ideas down I feel my inner critic saying "No, these ideas only seem obvious because of the brilliant insights of Newton and Leibniz !" That may be true but historians of mathematics writing on calculus have shown that calculus quickly formed as a field after the developments in algebra instigated by Descartes and other mathematicis just proceeding Newton and Descartes. It is also acknowledged that Barrow (Newton's teacher at Cambridge) had an early form of differential calculus before Newton (see http://www.maths.uwa.edu.au/~schultz/3M3/L18Barrow.html for an excellent overview of his ideas). After consulting my inner critic, I think the view I am forming can be expressed as follows: understanding the importance of taking increments towards zero was a great intellectual breakthrough that allowed the development of calculus, simplifying algebra through the Cartersian co-ordinates provided wonderful tools by which to understand the mathematics of change and accumulation and the derivation of calculus by Newton and Leibniz represent the accumulation of this intellectual development. In short, their intellectual insights owe a great deal to Archimedes, Descartes and Barrow.

One of the interesting observation one can make from these discussions is that the way calculus is taught follows a very different route from its historical development. At high schools, we indoctrinate students in algebra, than introduce differential calculus and limits, and than form integral calculus. In history, calculus was formed in almost the opposite order. I suppose, as long as you understand the key intellectual points underpinning calculus, it doesn't really matter in which order you have learn't them.

Thursday, April 9, 2009

A very brief history of calculators or how my brother amazed my school


I started high school in 1973, three years after the end of the Beatles and a generation before the end of the cold war. Everybody wore their hair long, ludriciously wide ties were considered fashionable, most engineers (like my father) owned a slide rule and very simple electronic calculators were starting to become affordable. I remember my brother saving up several weeks of his paper round money to purchase a calculator with a square root button. The arrival of this calculator at our high school caused a sensation and my brother was asked to demonstrate this technological marvel to the headmaster. With the arrival of even more powerful devices throughout that decade, my brother and myself, and everybody else studying mathematics in the Western world, continued to be trained in the use of log tables for carrying out any calculation beyond 687 x 6578. I think the last time I used a log table Ronald Regan hadn't yet become president and computer programs were typed on cards and processed overnight.

During this time, serious letters to the papers and educational experts lamented the fall in educational standards, my year 10 geography teacher warned that global warming would see Sydney under a foot of water by 2000 and there was a general feeling with anyone over the age of 40 that using calculators was "cheating".

By the end of the 1970s and into the early 80s, calculators had advanced quickly and a range of programmable calculators were on offer. In this enlightened era, engineering students tended to be either "HP" or "Casio" adherents, though a few perverse souls identified with the reverse polish notation of the "TI" calculators. I remember quite distinctly slaving away on my Casio programmable calculator with its gigantic 2k of memory, writing quite intricate programs with the line numbering system of level 2 basic, a cute plug in ticker tape printer and an audio tape memory system. Armed with this calculating power, you felt that you could conquer the world or at least complete a pressure drop calculation for a piping system in under 10 minutes. Part of me (a very small part) still hankers for the happy chatter of my ticker tape Casio printer and the amazingly clunky graphics produced from this device. By this time, the scientific calculators familiar with modern students became standard and knowledge of the workings of a slide rule suggested either a perverted soul or a person lost in the past.

The calculator was here to stay ! My arrival in the Engineering profession coincided with the great personal computer revolution and in my own small way I lead the charge, using computer programs (now written in "high" level languages like GW Basic !!) to perform complex engineering calculations that had formerly been the province of "look up" tables and approximate solutions. Even with this shift towards computing, my scientific calculator (still a Casio man) was used on a daily basis. However, by this time my career had taken a sharp turn towards research and the graphics calculator revolution bypassed me, as I was knee deep in numerics, computational thermodynamics and writing unruly "programs" in Excel. It was only when I took my current position that I was handed my first graphics calculator. It was love at first sight ! I love the fact that I can "see" the solution of an equation, that I can calculate derivatives and integrals and even form the ABC TV symbol using parametric graphics. What is there not to love ! I even accepted the transition from being a Casio man to a TI man without suffering a nervous breakdown (OK I had a little therapy).

Interestingly, serious people are still lamenting the falling of educational standards, predicting that Sydney will be under a metre of water by ......, and most people over 40 think that using a CAS calculator is cheating.