# FourierTransform bug

I have been having some issues with FourierTransform in Mathematica 13.1 which I believe boil down to this simple example.

Consider the Fourier transform of the function Sin[ax]/x. Using the built in Fourier transform function we get the correct answer

In[1]:= FourierTransform[Sin[a x]/x, x, p] // FullSimplify
Out[1]:= 1/2 Sqrt[Pi/2] (Sign[a-p]+Sign[a+p])


This function is even, and so should not be affected by the replacement $$x\to \sqrt{x^2}$$. However, in that case, Mathematica gives the wrong answer:

In[2]:= FourierTransform[Sin[a Sqrt[x^2]]/Sqrt[x^2], x, p] // FullSimplify
Out[2]:= (I (Log[-I a]-Log[I a]))/Sqrt[2 Pi]]


More generally, FourierTransform seems to give wrong answers when the integrand has quantities like Sqrt[x^2] or Abs[x]. Is there a simple reason why this is happening, or some kind of fix to get FourierTransform to give the correct answer?

Seems to give the correct answer on an Apple, Mathematica version 13.3.0.0

With $$a$$ unspecified, we get a long expression that reduces to this (which checks out for $$a$$ real:

• Set $a=3$ before obtaining this.
– mjw
Jul 17, 2023 at 22:34
• I see, seems I just need to update! Jul 17, 2023 at 22:37
• It takes a long time (many seconds) so Mathematica must be doing something much more complicated than with the simpler expression. The answer (before simplifying contains over 20 terms of sums and products of "unit steps".
– mjw
Jul 17, 2023 at 22:39