# Finding an inverse Fourier transform using the Laplace transform

• MATLAB
Hi,

This thread is an extension of this discussion where @DrClaude helped me. I thought that it'd be better to separate this question.

I couldn't find any other way to post my work other than as images so if any of the embedded images are not clear, just click on them. It'd make them clearer. I'd really appreciate if you can help me.

Original expression: Laplace transform of the expression: The graph of the expression is shown below.    High res image for the above embedded image: https://imagizer.imageshack.com/img924/2191/JaiscO.jpg High res image for the above embedded image: https://imagizer.imageshack.com/img921/3007/iPI3pi.jpg

Matlab:
clear all; close all; clc;

sig=1;
b=2;
t=linspace(0,30,3000);

for it=1:3000 %index for t varible

[email protected](w)(1/pi).*(((10.*(sig.^3-sig.*w.^2+b.*sig.^2+10.*sig-2.*sig.*w.^2-b.*w.^2))/(sqrt(w.^6+w.^4.*(b.^2+2.*b.*sig+3.*sig.^2-20)+w.^2.*(2.*b.^2.*sig.^2+4.*b.*sig.*(sig.^2+5)+3.*sig.^4+100)+(b.^2.*sig.^2+2.*b.*sig.*(sig.^2+10)+sig.^4+20.*sig.^2+100).*sig^2))).*cos(w.*t(it))+(10.*(2.*sig.^2.*w+sig.*b.*w+w.*sig.^2-w.^3+b.*sig.*w+10.*w)/(sqrt(w.^6+w.^4.*(b.^2+2.*b.*sig+3.*sig.^2-20)+w.^2.*(2.*b.^2.*sig.^2+4.*b.*sig.*(sig.^2+5)+3.*sig.^4+100)+(b.^2*sig.^2+2.*b.*sig.*(sig.^2+10)+sig.^4+20.*sig.^2+100).*sig.^2))).*sin(w.*t(it)));
F(it)=integral(f,0,100); %evaluating the integral from w=0 to w=100

end

plot(F) % F is inverse Fourier transform of f(t)
Sadly there is something wrong and I'm not getting the original f(t)=1-(1/3)e^(-t)sin(3t)-e^(-t)cos(3t). Please see the plot below. Where am I going wrong? #### Attachments

Last edited:

Related MATLAB, Maple, Mathematica, LaTeX News on Phys.org
jasonRF
Gold Member
EDIT: I just realized that this was an older post from you. My first sentence is therefore probably wrong - this may be the first thread where you ask this question. Sorry if my reply seems a little impatient!

This is the second thread where you are doing the same thing: taking the Laplace transform of a function, then trying to use the inverse Fourier transform to get that function back.

This time the algebra is much messier than the first time (so I will not even attempt to check it), plus you now have the case where the region of convergence is ##real(s)>0##. To get the Fourier transform ##\hat{F}(\omega)## from the Laplace transform ##F(s)## for this case, it is NOT true that ##\hat{F}(\omega) = F(\sigma + j\omega)## for any ##\sigma>0##. To get the Fourier transform from the Laplace transform for this case, you basically need to do at limit: ##\hat{F}(\omega) = \lim_{\sigma\rightarrow 0^+} F(\sigma + j \omega)##, and that limit needs to be in the sense of generalized functions (distributions). For example, for ##f(t) = u(t)##, (which is part of your original function, of course),
$$\begin{eqnarray*} F(s) & = & \frac{1}{s}\\ \hat{F}(\omega) & = & \lim_{\sigma\rightarrow 0^+} F(\sigma + j \omega) \\ & = & \lim_{\sigma\rightarrow 0^+} \frac{1}{\sigma + j \omega} \\ & = & \pi \delta(\omega) + \frac{1}{j \omega} \end{eqnarray*}$$

To learn how to figure out those limits for yourself you need to learn a little about generalized functions (also called distribution theory). That would also let you know the proper way to interpret the ##1/j\omega## term (it isn't exactly what you think it is). But that seems way beyond the scope of your exercise. There might be a clever way to enable you to do what you seem to be trying to do, but I will leave that up to you and others to figure it out. I suspect it won't be a fruitful exercise.

Why don't you just find the Fourier transform of your signal in the first place? Then you will see that it has a delta function in it.

jason

Last edited:
• PainterGuy
EDIT: I just realized that this was an older post from you. My first sentence is therefore probably wrong - this may be the first thread where you ask this question. Sorry if my reply seems a little impatient!
No problem, Sir!

This is the second thread where you are doing the same thing: taking the Laplace transform of a function, then trying to use the inverse Fourier transform to get that function back.
Yes, I have been trying to understand Laplace transform, and how it relates to physical systems.

To get the Fourier transform from the Laplace transform for this case, you basically need to do at limit: ##\hat{F}(\omega) = \lim_{\sigma\rightarrow 0^+} F(\sigma + j \omega)##, and that limit needs to be in the sense of generalized functions (distributions). For example, for ##f(t) = u(t)##, (which is part of your original function, of course),
$$\begin{eqnarray*} F(s) & = & \frac{1}{s}\\ \hat{F}(\omega) & = & \lim_{\sigma\rightarrow 0^+} F(\sigma + j \omega) \\ & = & \lim_{\sigma\rightarrow 0^+} \frac{1}{\sigma + j \omega} \\ & = & \pi \delta(\omega) + \frac{1}{j \omega} \end{eqnarray*}$$

To learn how to figure out those limits for yourself you need to learn a little about generalized functions (also called distribution theory). That would also let you know the proper way to interpret the ##1/j\omega## term (it isn't exactly what you think it is). But that seems way beyond the scope of your exercise. There might be a clever way to enable you to do what you seem to be trying to do, but I will leave that up to you and others to figure it out. I suspect it won't be a fruitful exercise.
Actually I was working on this limit problem last night but couldn't make any sense of it.

\begin{eqnarray*}
& & \lim_{\sigma\rightarrow 0^+} \frac{1}{\sigma + j \omega} \\
\end{eqnarray*}

Anyway, the following expression which I mentioned in my first post in this thread: is a solution to the differential equation y′′(t)+2y′(t)+10y(t)=10. The Laplace transform of expression is Y(s)=(4s+8) / (s²+2s+10). Later I was able to see that the expression, y(t)=1-(1/3)e^-t*sin(3t)-e^-t*cos(3t), doesn't have Fourier transform since the expression does not converge.

To resolve the issue, I instead used the differential equation, y′′(t)+2y′(t)+10y(t)=0. Its solution is y(t)=4e^-tcos(3t)+1.333e^-t*sin(3t). In this case y(t) converges and has Fourier transform. The laplace transform is Y(s)=(4s+8) / (s²+2s+10)

I was able to solve it and code it successfully. I didn't share the solution here because I had to change the original differential equation to a new one whose solution, y(t), converges, as stated above.

Thank you!

jasonRF
Gold Member
Actually I was working on this limit problem last night but couldn't make any sense of it.

\begin{eqnarray*}
& & \lim_{\sigma\rightarrow 0^+} \frac{1}{\sigma + j \omega} \\
\end{eqnarray*}
It is not easy. What that relation means is that for any "nice" function ##\phi(\omega)##,
$$\lim_{\sigma\rightarrow 0^+} \int_{-\infty}^{\infty} \frac{\phi(\omega)}{\sigma + j\omega} d\omega = \pi \phi(0) + \lim_{\epsilon\rightarrow 0^+}\left[ \int_{-\infty}^{-\epsilon} \frac{\phi(\omega)}{j\omega} d\omega + \int_{\epsilon}^\infty \frac{\phi(\omega)}{j\omega} d\omega \right]$$

There are two standard ways of proving this. Perhaps the most common one for physicists and engineers uses contour integration from the theory of complex variables. A second way to prove it uses the theory of generalized functions, also called distribution theory. The different proofs will require different properties of the function ##\phi(\omega)## (that is, different definitions for what "nice" means).

Unless you are really familiar with complex variables and/or distribution theory, cases like ##u(t)## are better solved by directly computing the Fourier transform, since you should be able to just look up the answer in a table. That is why I think your approach of taking the Laplace transform then trying to transform it to a Fourier transform is not a good one in general. If you want the Fourier transform, just take Fourier transform. Why mess with the Laplace transform at all?

Jason

• PainterGuy
That is why I think your approach of taking the Laplace transform then trying to transform it to a Fourier transform is not a good one in general. If you want the Fourier transform, just take Fourier transform. Why mess with the Laplace transform at all?
Thank you for the advice. I was making it more complicated. I'm not familiar with complex variables and/or distribution theory but I understand it now.