# How to do continuous Fourier transform?

I want to do a Fourier transform to the below function by Mathematica. How can I do it? Here $$c$$, $$d$$, $$a$$, $$L$$ are constants.

$$w(r)= \left\{ \begin{array}{ll} -\frac{c}{\epsilon r} & r> L \\ -\frac{c}{\epsilon d}\left[\frac{a}{r}-\ln\left(\frac{r}{L}\right)\right] & a < r\leq L \\ -\frac{c}{\epsilon d}\left[\ln\left(\frac{a}{L}\right)\right] & r \leq a \\ \end{array} \right.$$

It looks like Mathematica can do this. Define something like this (I've simplified your version slightly)

w[r_] := Piecewise[{{-1/r, r > L}, {-1/d (a/r - Log[r/L]),
a < r <= L}, {-1/d Log[a/L], r <= a}}]


Mathematica will return a continuous Fourier transform

Assuming[0 < a < L, FourierTransform[w[r], r, k]]


I suggest you check the help for FourierTransform to ensure that the definition used is the one you want.

• Thank you @mikado! Is this 'Assuming[0 < a < L, FourierTransform[w[r], r, k]]' code only for the travel from 0 to L, exclude the r>L and r<= L? – aluuzz Sep 8 '19 at 22:50
• No, I'm just saying that a is positive and less than L – mikado Sep 9 '19 at 5:55