# Is there a built-in for "circle function"?

Is there a built-in function in Mathematica for this function?

$$$${\displaystyle \operatorname {Circ} (r)=\left\{{\begin{array}{rl}1,&{\text{if }}r<{1}\\{\frac {1}{2}},&{\text{if }}r={1}\\0,&{\text{if }}r>{1}.\end{array}}\right.}$$$$ where $$r=\sqrt{x^2+y^2}$$

I use:

UnitBox[1/2*Sqrt[x^2 + y^2]]

and the function is equivalent, but Mathematica doesn't do the Fourier transform in my system (MMA v. 11.0).

• FourierTransform[UnitBox[1/2*Sqrt[x^2 + y^2]], {x, y}, {u, v}] returns a result on my machine. Jan 22, 2021 at 14:14
• MMA version 12.1 on PC returns: 1/2 Hypergeometric0F1Regularized[2, 1/4 (-u^2 - v^2)] Jan 22, 2021 at 14:21
• well, my computer is simple, maybe because of this he doesn´t do the transform, my wolfram version is 11.0 Jan 22, 2021 at 14:26
• the fourier transform of circ is a bessel function J1(2*Pi*r)/r Jan 22, 2021 at 14:27
• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! Jan 22, 2021 at 17:15

\$Version

(* "12.2.0 for Mac OS X x86 (64-bit) (December 12, 2020)" *)


The functions are equivalent for integration but they have different values for r == 1. Use PiecewiseExpand to convert the expression

Assuming[Element[{x, y}, Reals],
UnitBox[1/2*Sqrt[x^2 + y^2]] // PiecewiseExpand]


Assuming[Element[{x, y}, Reals],
FourierTransform[
UnitBox[1/2*Sqrt[x^2 + y^2]] // PiecewiseExpand, {x, y}, {u, v}]]


% // FullSimplify


You can obtain a result in terms of Bessel functions using FunctionExpand:

FunctionExpand@
FourierTransform[UnitBox[1/2*Sqrt[x^2 + y^2]], {x, y}, {u, v}]

(* Out: BesselI[1, Sqrt[-u^2 - v^2]]/Sqrt[-u^2 - v^2] *)