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.