Fourier Transform: Not Just an Analyzer of Frequency

Introduction of Using Fourier Transform to Solve PDEs

A guest post by iGEM NCKU

Dry lab is an important part of iGEM project. Among those criteria in dry lab, model is a main part that connects wet experiment with dry work, in order to prove that our design works theoretically. While building a model in biological system, partial differential equation (PDE) is a common strategy to predict the behavior of chemicals, bacteria… and so on. 

However, solving a PDE is a huge obstacle, since not every PDE has solutions in formula form. Even the formula do exist, it’s hard to find it out. Therefore, we introduce Fourier transform, and explain how it works as a technique to solve PDEs.

So, what is PDE (Partial Differential Equation)?

Differential Equation: Functions to Describe Behaviors

Sometimes, we want to describe a observed phenomenon, like diffusion of chemicals or transduction of heat, but we don’t know the function of them, we just know the rules they obey. In this case, we will need differential equations to describe their behavior.

As the name of differential equation indicates, it’s a function that contains differential items in it. For example: 

These are all differential equations. By mathematical operations, we can find out the formula of target function. Note that a differential equation may have more than one solution, thus we need boundary conditions to confirm the formula we need. Boundary conditions are known conditions for our solutions. For examples, we know that function y follows (2), and we know that when x=0, y is a constant. This is called boundary condition, we can find possible solutions according to it.

What’s the difference between ODE and PDE?

ODE (Ordinary Differential Equation) means that the function y contains only one variable x, there’s no other variables in whole equations. (1) and (2) mentioned above are ODEs.

PDE (Partial Differential Equation) means that there are more than one variables that are correlated with function y. For example:

(3) means that there are two variables correlated with y, and they are x and t. We can see that in (3), there are items for partial differential for t and x, this kind of equation is called PDE. 

In most of the situations, our target function has more than one variables, thus PDEs are much common than ODEs. However, since PDEs are much more complicated compared with ODEs, there’s no fixed steps for solving PDEs, causing most of the PDEs have no solutions in formula. 

How to Setup a PDE?

For example, we want to describe the diffusion of a chemical A in water. The phenomenon we observed is that: 

“Time rate of change of [A] has a linear relation with second order differentiation by distance.”

Where [A] represents the concentration of A. Then, how do we find out the function of concentration of A? 

First, we should describe this phenomenon, in other words, behavior of A, mathematically. The meaning of ”time rate of change” is the partial differentiation of [A] by t; “second order differentiation by distance” means the second order differentiation of [A] by x. Thus, we can set up a PDE as below:

By solving this equation, we can find out the function of [A]. One of the answer will be: 

Next, we’ll introduce how to use Fourier transform to get this result. Before that, we’ll first introduce what is Fourier transform. 

How about Fourier Transform?

Fourier Transform: a Tool to Analyze Periodic Functions

Fourier transform is a process to change f(x) of time domain into F() of frequency domain. Let F(ω) be the Fourier transform of f(x); definition of Fourier transform is as below:

In fact, there are different type of Fourier transform according to the characteristic of the origin function. Examples like Fourier cosine transform, which can be applied on even function; Fourier sine transform, which can be applied on odd function. But every functions’ Fourier transform can be expressed as above.

What’s the use of Fourier transform? Usually, Fourier transform is used to analyze periodic functions’ composition of frequencies. Just like every function can be expressed as Maclaurin series, every periodic function can be expressed as linear summation of sine function and cosine function with different frequencies, which can further be analyzed. 

Here we demonstrate how to analyze frequencies by Fourier transform. Here we use fast Fourier transform (FFT) to demonstrate. Below is a graph of a man’s heart rate. 

By using Matlab’s FFT function, we can get the composition of the frequencies of the above data as below:

As we can see, there are some of the frequencies that are higher than others, and one of the higher ones is 39. If we calculate the waves in origin data, we can find that there are exactly 39 waves, which indicates that the frequency in given time is 39. 

Table of Fourier Transform

It seems that Fourier transform is a powerful tool. But how can I get the function of F(ω)? The calculation of (6) is not easy. Therefore, people established a table of Fourier transform and list out all the known forms. Tables can be found on internet. 

How Can We Use Fourier Transform to Solve PDE?

Transforming PDE to ODE

Just as previously mentioned, ODE is much easier to solve than PDE since there is only one variable in ODE. But how do we convert PDE into ODE? 

The answer is Fourier transform. Take the previous function as an example:

We apply Fourier transform on both side with variable x, then we can get: 

Where Fx means Fourier transform with variable x. Let Fx{C} = U(ω), then we can get:

(7) is an ODE! We can easily solve this ODE. The answer will be: 

Inverse Fourier Transform

Now, we have obtained U. Then, we need to get the real function of C, which is the inverse Fourier transform of U. Since we get U by Fourier transform with x to ω, we need to get C by inverse Fourier transform of U with ω to x. 

By searching table of Fourier transform, we can get that:

Thus, we can get:

That’s very close to (5), which is the known solution of diffusion equation. We just need to prove that A=1/√2π. In fact, the value of A is determined by the boundary condition of the function. Different conditions lead to different solutions of A. We can see that (9) fits (4), no matter the value of A.

Shortage of Fourier Transform

Usually, PDEs are solved by a kind of skill called “separation of variable”, but it costs a lot of time, and most of the time, with no answer. Fourier is a fast and easy way to deal with PDEs by transforming it into ODEs. However, there are some shortages of Fourier transform:

  1. Not all kinds of functions are listed on table of Fourier transform: Since the definition of Fourier transform needs integration, and not all of them has a known result. 
  2. If the original function has items that contains C(x,t) with different power, then Fourier transform will become very complicated. Examples like:

Since there are, c2 it’s hard to transform it into ODE.

To sum up, Fourier transform can not only be used to analyze periodic functions in frequencies, but also be used to deal with some difficult PDEs. It might be helpful for all iGEM teams while doing models, providing them with an alternative and easy way to cope with those PDEs.

Find iGEM NCKU Tainan on social media!

Instagram @igemncku

Facebook iGEM NCKU-Tainan

iGEM NCKU Tainan
+ posts