Fourier Transform and Convolution

In summary: Your approach is valid if you let your function ##f\left(t\right)## and ##g\left(t\right)## be equal to zero for ##t > 1## and for ##t < 0##.
  • #1
ecastro
254
8
Considering two functions of ##t##, ##f\left(t\right) = e^{3t}## and ##g\left(t\right) = e^{7t}##, which are to be convolved analytically will result to ##f\left(t\right) \ast g\left(t\right) = \frac{1}{4}\left(e^{7t} - e^{3t}\right)##.

According to a Convolution Theorem, the convolution of two functions can be solved by the use of Fourier Transforms. The theorem states that,

##f\left(t\right) \ast g\left(t\right) = \mathcal{F}^{-1} \left\{\mathcal{F}\left[f\left(t\right)\right] \cdot \mathcal{F}\left[g\left(t\right)\right]\right\}##.

Thus, if I were to transform ##f\left(t\right)## and ##g\left(t\right)##, multiply them per component and take the inverse transform, I should get the same function that was solved analytically. I tried doing this in MatLab, but they're two totally different functions. Also, I tried using MatLab's built-in function for convolution ##\texttt{conv}##, but the resulting size of the matrix is almost twice as large, and the graph is off by several units (although the graph from the Fourier Transform approach and the latter share the same shape). Did I miss anything on why this is so?

Here is my code:
Code:
clear; clc;

t = 0:0.01:1;
y = (1/4).*(exp(7.*t) - exp(3.*t));

f = exp(3.*t); g = exp(7.*t);
F = fft(f); G = fft(g);

FG = ifft(F.*G); FG2 = conv(f, g);
t2 = 0:0.005:1;

The variable ##\texttt{t2}## is for the drawing of the plot of the Fourier Transform approach and the ##\texttt{conv}## approach in the same graph.
 
Physics news on Phys.org
  • #2
How do you get this
ecastro said:
##f\left(t\right) \ast g\left(t\right) = \frac{1}{4}\left(e^{7t} - e^{3t}\right)##.
?
 
  • #3
blue_leaf77 said:
How do you get this
?

Replacing ##t## to ##x##, ##f\left(x\right) = e^{3x}## and ##g\left(x\right) = e^{7x}##. The definition of convolution is,

##\begin{eqnarray*}f\left(t\right) \ast g\left(t\right) &=& \int^t_0 f\left(x\right) g\left(t - x\right) dx \\
&=& \int^t_0 e^{3x} e^{7\left(t - x\right)} dx \\
&=& \int^t_0 e^{3x} e^{7t} e^{-7x} dx \\
&=& \int^t_0 e^{-4x} e^{7t} dx \\
&=& e^{7t} \int^t_0 e^{-4x} dx \\
&=& e^{7t} \cdot \left.-\frac{1}{4} e^{-4x}\right|^t_0 \\
&=& e^{7t} \left[-\frac{1}{4} e^{-4t} + \frac{1}{4} e^{-4\left(0\right)}\right] \\
&=& e^{7t} \left[-\frac{1}{4} e^{-4t} + \frac{1}{4}\right] \\
&=& -\frac{1}{4} e^{-4t} e^{7t} + \frac{1}{4} e^{7t} \\
&=& \frac{1}{4} \left(e^{7t} - e^{3t}\right) \end{eqnarray*}##
 
  • #4
To be honest I have never known the definition of convolution you used there. What I know about a convolution between functions ##f(x)## and ##g(x)## is
$$
[f(x) \ast g(x)](t) = \int_{-\infty}^{\infty} f(x) g(t-x) dx
$$
 
  • #5
I restricted my function to an extent so that I can compare it with a numerical solution, or this is not the way to compare an analytical and numerical solution?
 
  • #6
The exponential functions such as those in your example cannot be calculated using computer to begin with. You can try analytically calculate the convolution using the standard definition I wrote in post #4, you will immediately find that the integral diverges at any ##t##.
 
  • #7
blue_leaf77 said:
The exponential functions such as those in your example cannot be calculated using computer to begin with.

How about the ##\texttt{exp}## function?

blue_leaf77 said:
You can try analytically calculate the convolution using the standard definition I wrote in post #4, you will immediately find that the integral diverges at any ##t##.

Is my approach valid if I let my function ##f\left(t\right)## and ##g\left(t\right)## be equal to zero for ##t > 1## and for ##t < 0##?
 
  • #8
In addition, I saw this video:


At the middle of the video, he multiplied the result of the convolution with the value of the time step. He mentioned that it is for the calculation of a continuous time signal result. I don't quite understand why it must be so.
 

Related to Fourier Transform and Convolution

1. What is a Fourier Transform?

The Fourier Transform is a mathematical tool used to decompose a signal or function into its constituent frequencies. It converts a signal from the time domain to the frequency domain, where the amplitude and phase of each frequency component can be analyzed.

2. How is the Fourier Transform related to Convolution?

The Convolution theorem states that convolution in the time domain is equivalent to multiplication in the frequency domain. This means that the Fourier Transform of a convolution of two functions is equal to the product of their individual Fourier Transforms.

3. What is the difference between the Fourier Transform and the Inverse Fourier Transform?

The Fourier Transform converts a signal from the time domain to the frequency domain, while the Inverse Fourier Transform does the opposite, converting a signal from the frequency domain back to the time domain. The two transforms are related by complex conjugation and a scaling factor.

4. What are some practical applications of the Fourier Transform and Convolution?

The Fourier Transform and Convolution have numerous applications in fields such as signal processing, image processing, and differential equations. They are used for filtering, noise reduction, feature extraction, and solving differential equations.

5. How is the Fast Fourier Transform (FFT) different from the regular Fourier Transform?

The FFT is an algorithm that computes the Fourier Transform more efficiently by reducing the number of calculations needed. It is particularly useful for analyzing large datasets, such as digital signals or images, as it can significantly reduce the processing time compared to the regular Fourier Transform.

Similar threads

  • Topology and Analysis
Replies
1
Views
456
  • Calculus and Beyond Homework Help
Replies
1
Views
820
Replies
4
Views
840
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
460
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
Replies
4
Views
432
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
293
Back
Top