Archive for June 2007
Ain’t so convoluted
What’s a convolution, you ask? If you have two functions and
, the convolution of f and g, is defined as
where u is the dummy variable of integration.
The notation is also used to denote the convolution of f and g, although I’ll be using the former notation. Note that the convolution of f and g is itself a function of x. That is,
Here’s one way to visualize the convolution. If you have two functions f and g with respect to the dummy variable, what the convolution actually does is,
STEP 1: “Flips” one of the functions about the y-axis. For example, to
STEP 2: Shifts it by an amount x. ie, to
STEP 3: “Slides” along the u-axis by keeping u fixed, and allowing x to vary all the way from
to
. The value of the convolution at some point
, is
So, if you consider the convolution integral, the value of the product , and hence
is zero when the two functions do not intersect. However, when the two functions do intersect, the value of the convolution at that point will be the integral of the product over the entire overlapping region (where the product is non-zero), and this value is simply the area of the overlapping region.
You can see detailed animated illustrations of this idea at Wolfram’s MathWorld.
Another useful way of thinking about the convolution of two functions, is by the concept of a functional. We can consider as a functional of the function
. That is, for every given function
, there will be a corresponding value of
. So, to calculate the value of
at some point
, we still need to know the entire function
.
There are useful properties associated with convolution. For example, convolutions are
(i) Commutative
So, it doesn’t matter which function you flip.
(ii) Associative
(iii) Distributive
Convolution theorem:
The convolution theorem is immensely useful to calculate fourier transforms and find fourier pairs. It states that, if and
,
It’s an interesting result that the fourier transform of the convolution of two functions, is the product of the corresponding fourier transforms of the individual functions. This means that a convolution in the normal domain, becomes a product in the fourier domain and vice-versa
It’s actually easy to prove this useful result. For, if the convolution of two functions is given as
Then the fourier transform of h(x) is
Since x is a dummy variable, set , while holding u constant, so that the integral reduces to
We can apply this theorem to find various convolutions. Here’s an example.
(i) Convolution with a delta function
Let
We’re now interested in the convolution of f with a shifted delta function,
To find this, let’s apply the convolution theorem. We know that and
. Therefore
And taking the inverse fourier transform of , we find that
is
. Notice that f(x) is shifted by an amount a.
Finally, I’ll discuss one more property I’ll need to use before I move on to a part of what I’m currently working on, which is the application of fourier analysis in interferometry and diffraction. This property is the derivative of fourier transforms.
If, ,
and therefore,
which you can easily check this, by use of the Leibniz rule. This property of fourier transforms is useful in solving linear PDE’s.
More on “the museum”
Here’s a follow up to the museum of horrors. Last week, a bunch of scientists1 visited the creation museum and explored the place while trying to figure out just how bad it actually was. You can take a look at the reports which they’ve put up on their blogs on the brutal butchery of science.
- Field trip to the Creation Museum – Tara
- Adam and Steve Steve in the Garden of Eden
- Visit to the Creation Museum, Part 1 – Wesley
- The Creation Museum I: Getting Our Foot in the Door – Jason
Notes
[1] – Among them were Prof Steve Steve, Dr Tara, Dr Jason
FT of some common functions
In this post, let’s look at the fourier transform of some functions which are quite useful.
(i) The rectangle function
We’ll start with the rectangular function, also called the box function. It’s defined as
Now, consider the fourier pair of . We have,
So, the fourier transform of the boxcar function is the sinc function!
I’ll revist this fourier pair again, while discussing the wave theory of light. In fact, we can use this fourier pair to show that the interference pattern we get in a double slit experiment is infact the sinc function!
(ii) The Gaussian function
Next, we’ll look at the gaussian function. The gaussian function has the interesting property that it’s fourier pair is also a gaussian function! Consider,
Let’s caculate the fourier pair, .
To evaluate this integral, use the substitution,
After evaluating the integral and substituting the limits, the expression for is obtained as,
which is also a gaussian.
Also, if you try plotting the fourier pairs for different values of a (and hence, different widths of the gaussian), you’ll notice that the wider the gaussian in x-space, the narrower it is in p-space (ie, the transform space), and vice versa.
(iii) The delta function
The dirac delta function (although, not strictly a function), can be represented as
Now let’s apply the fourier transform to the delta function. We get,
and by the property of the delta function, this is,
Therefore, we find that the fourier pair of the delta function is unity. That is
Also, notice that
and hence,
(iv) The Shah function
The shah function, also known as a Dirac comb, is an infinite combination of evenly spaced dirac functions.
The fourier transform of the shah function is also another shah function, with a period of 1/a. You’ll find that the shah function is quite invaluable in convolutions, where it’s role is to create infinte “copies” of the original function, with period equal to the spacing between the teeth of the comb.
In my next post, I’ll explain more about convolution, especially the convolution theorem which is a real time saver in performing transforms, and other theorems relating to fourier transforms
Note: If you find any errors, please do inform me, and I’ll correct them. Also, click on the thumbnail images to get a detailed graph
Fourier transforms for the practical person
In this series of posts, I plan to outline some basic ideas which I’ve learnt on the theory of Fourier transforms, and it’s practical applications in a non-rigorous manner. Once I’ve laid out the basics, I’ll then show you some interesting stuff from what I’m currently working on.
Let’s start with Fourier series. It’s actually a remarkable fact, that we can express any arbitrary periodic function, simply as the sum of the ordinary sine and cosine functions we’ve all studied at high school. If is a periodic function, then we have
The Fourier transform is an extension of this, as the period of the function approaches infinity, and the gap between successive harmonics approaches 0. So, in some sense, the fourier transform decomposes a function into it’s frequency components.
For a non-periodic function which satisfies certain conditions, there are many conventions of describing the fourier transform. Following one such convention which is widely used, the forward fourier transform is
While, the inverse fourier transform is
Notice that, if is a continuous time signal, then it’s transformed into the frequency domain by the forward transform. One of the properties of the fourier transforms is that,
and
are transforms of each other, and form a fourier pair, and are represented by
.
This means that, if , then
if isn’t discontinuous. If it is discontinuous, then the value at that point will be the average of the value around the discontinuity. So, we can simplify our terminology and say that the fourier transform of
is
and vice versa.
In the next post, I’ll look at the fourier transform of some useful functions, but before that, there’s one more nice result. For an Electromagnetic wave, or a signal in a wire, the fourier transform of the voltage can be complex. However the conjugate product , is real and is proportional to the power density (or, power per unit frequency). This is know as the spectral power density.
Fishy Medicine
It’s time again for the annual “miracle fish cure”. You’ve all probably heard of the amazing fish “medicine” that the Bathini Goud family offers to people who suffer from Asthma. This year’s event has recently started in Hyderabad1.
Asthmatics gather in Hyderabad for “miracle cure”
Thousands of asthmatics have lined up in Hyderabad to take the ”fish medicine” that the Bathini Goud family has been administering since 1845.
It’s a purported miracle cure, where patients swallow a live fish whole, to be cured of asthma.
…
One memember of the family which gives the “medicine”, claims (emphasis mine)
Cheating means to cheat someone. Here the crowds have come themselves, ask them if they are being charged without getting cured. That would be cheating. These people do not even know what cheating is,”
That’s the pity. But, I think he should know. Raising hopes with a false claim, whose efficacy has never been verified in any test, and potentially endangering the lives of asthmatics who move away from conventional (yet exteremly effective) inhalers and corticosteroids, is very much cheating.
It saddens me somewhat, that such rubbish is still being practised freely. How hard would it be to conduct a double blind experiment to see if the drug really works? And if it works, to analyze the ingredients and try understanding the chemical basis for it’s efficacy, and improving it? Why doesn’t any one in our government intervene to put an end to this nonsense2?
I long for the day when the majority of our society wakes up from a demon haunted world. IMO, public awarness of science can play a large role and serve as a candle in our dark, superstitous society.
Notes [1] – Asthmatics gather in Hyderabad for “miracle cure” [2] – Purely rhetorical. The answer, obviously, is votes.
Creation Museum
Imagine that you’re visiting a museum for the first time on a bright sunny afternoon, perhaps with your family or kids. You say to yourself “Hey, this is going to be a great experience. It’ll be wonderful to look at fossils, learn about the history of the earth, the time scale involved and about evolution”.
But then, when you enter the museum, you notice something peculiar. A T-rex grazing in a meadow with human children playing around it? Museum guides calmly explaining that the Earth is 6000 years old? A Triceratops wearing a saddle? What’s going on?
Well, It sure ain’t Kansas anymore. Belive it or not, these are scenes from the recently opened, 27 million dollar, Creation Museum in Kentucky.
The Creation Museum proudly claims to present a “walk through history”, and bring the pages of the Bible to life. In fact, the co-founder of the museum claims that “It’s a great place for children who are in public school and haven’t really decided what to believe yet”. Really? Take a look at a photographic tour of the exhibits for yourself.
What’s more astonishing is that museum opened to a full crowd, with more than 4000 visitors in the first day. A related survey conducted by the Princeton Survey Research Associates International, showed that 48% of Americans polled believed that “God created humans pretty much in the present form at one time within the last 10,000 years or so” 1.
The first time I read this, all I could think was
HUH?? IS THIS FOR REAL?
Passing of lies to young children as science is beyond shameful, it’s criminal.
Although I’m sorely tempted to rant further about this atrocity, I’ll simply end with the Wizard’s First Rule
People are stupid; given proper motivation, almost anyone will believe almost anything. Because people are stupid, they will believe a lie because they want to believe it’s true, or because they are afraid it might be true. People’s heads are full of knowledge, facts, and beliefs, and most of it is false, yet they think it all true. People are stupid; they can only rarely tell the difference between a lie and the truth, and yet they are confident they can, and so all are easier to fool.
Notes [1] -NEWSWEEK Poll,March 31, 2007: Conducted by Princeton Survey Research Associates International.
All original work on this blog is licensed under a