Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.8K Views
|
4 Replies
|
6 Total Likes
View groups...
Share
Share this post:

Why does FourierTransform return 0, while it's obviously incorrect?

Posted 5 years ago

Here are my calculations:

d = 10
s = 0.1
f = 1
wavelength = 0.0004
lens = Exp[(I*Pi*y^2)/(wavelength*f)]
aperture = Exp[-((y-d)^2)/(2*s^2)]*lens
APERTURE = FourierTransform[aperture, y, k] 

APERTURE gets evaluated as 0.0 + 0.0i, which is just not true... I can do this transform by hand... It's not that difficult, but for some reason Mathematica seems to choke on it... If I don't multiply by lens, it comes out okay... But I do need the lens term in there.

And this is just the first step, I could write what this evaluates to (since I did it by hand), but now I need to multiply APERTURE by Exp[-2*Pi*I*Sqrt[(1/wavelength^2-k^2)]] and take the inverse Fourier, which doesn't work either! (give 0 + 0i).

i.e.:

APERTURE = (1/Sqrt[(1/(2*Pi*s^2))-(I/(wavelength*f))])*Exp[-s^2*k^2/(2-4*Pi*s^2*I/(wavelength*f))+d*k/(i+2*Pi*s^2/(wavelength*f))-d^2*(wavelength*f-I*Pi*s^2)/(s^2*(wavelength*f-2*I*Pi*s^2))]
PROPAGATED = APERTURE*Exp[-2*Pi*I*Sqrt[(1/wavelength^2-k^2)]]
propagated = InverseFourierTransform[PROPAGATED,k,y]

get propagated evaluated as 0 + 0i.

Any idea how I can get this solved?

When calculating this numerically, I get the correct solution (when f is large enough), but for small f, I get a wrong solution, so I thought it might be a case of underflow.

With that in mind, I turned to try and solve it symbolically, so that I don't run into these type of trouble - but it would seem Mathematica has some trouble solving these Fourier transforms...

POSTED BY: feature engineer
4 Replies
POSTED BY: feature engineer
POSTED BY: Nikolay Shilov

@Nikolay Shilov is quite on target. Here is one plausible internal simplification that can be seen to give machine 0 on the FR input.

In[175]:= MapAll[Together, aperture]

(* Out[175]= 0. + 0. I *)

This is a consequence of chopping machine underflow to 0.0, coupled with the hard-to-predict and sometimes awkward way that functions like Together and Factor pull out approximate numeric constants from expressions. At some point we may have to just convert machine numbers to equivalent bignums inside those functions that were designed for symbolic manipulation, as they are the most vulnerable to such issues when given a mix of symbolic and approximate numeric input.

POSTED BY: Daniel Lichtblau

Use exact numbers not numeric.

d = 10;
s = 1/10;
f = 1;
wavelength = 4/10000;
lens = Exp[(I*Pi*y^2)/(wavelength*f)];
aperture = Exp[-((y - d)^2)/(2*s^2)]*lens;
APERTURE = FourierTransform[aperture, y, k]

(*E^(-5000 - (I (-1000 I + k)^2)/(200 (I + 50 \[Pi])))/(10 Sqrt[
 1 - 50 I \[Pi]])*)

For second question aka: Inverse FourierTransform ,

Do you have any reason to believe that a closed form solution should exist?

Questions like this should always indicate why it is reasonable to expect a solution.

POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard