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.

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 !





What a wonderful celebration of Engineers and Scientists !




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, 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.

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

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 !





Saturday, March 6, 2010

Fourier Series and other amazing feats on WolframAlpha



A. Visualising the periodicity of function with multiple terms


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



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

D. Checking whether a certain function is odd or even



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


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

G. Carry our a Fourier series expansion in complex form

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