I tried to integrate the following in Mathematica.
$\int\limits_{-\infty}^\infty\cfrac{\text{e}^{\text{i}ax}}{x^2-b^2}\text{d}x$ where $a,b>0$
The analytical result is well known.
$-\cfrac{\pi}{b}\sin(ab)$
I used the following code
Integrate[E^(I a x)/(x^2 - b^2), {x, -Infinity, Infinity},
Assumptions->{a > 0, b != 0, b ∈ Reals}]
But Mathematica returned something else
-((π (I Abs[b] Cos[a b] + b Sin[a b]))/b^2)
How can I get the above analytical expression?
b != 0
in your assumptions to Integrate? Have you tried specifying that b is positive, rather than nonzero? $\endgroup$b != 0 && b ∈ Reals
is equivalent tob > 0
since the integral only hasb^2
. $\endgroup$Assumptions -> {a > 0, b > 0, b \[Element] Reals}
. But then it fails to converge. $\endgroup$-((2 π Sin[a b])/b)
. $\endgroup$1/(x^2-b^2)
. To get the FT one can doIn[14]:= FullSimplify[ Sqrt[2*Pi]* FourierTransform[1/(x^2 - b^2), x, a, Assumptions -> {a > 0, b != 0, Element[b, Reals]}]] Out[14]= -((\[Pi] Sin[a b])/b)
$\endgroup$