I'm wondering how to construct a $C^{\infty}$ function which is positive on an open disk of radius $\delta$, centered at the point $(a,b)$ and vanishing outside of the disk. I know that in 1D, a function like $f(x)=e^{-(b-x)^{-1}} \cdot e^{-(a-x)^{-1}}$ would work, but what would the analog be in 2D?

I'm thinking that the function would have the form $u(x,y)=e^{x}e^{y}$. Then, using Euler's Formula, we would have $u(x,y)=u(?, ?) = r_1\cdot(cos(\theta_1)+isin(\theta_1)) \cdot r_2(cos(\theta_2)+isin(\theta_2))$. But then, we have a function in terms of $r$'s and $\theta$'s. Am I taking the right approach here?


2 Answers 2


For the circle of radius one centered in $(0,0)$ a function that satisfies your requirements is:

$$f(x,y)=\begin{cases}e^{-\frac{1}{(x^2+y^2-1)^2}}\ &\text{if}\ x^2+y^2<1\\ 0\ &\text{otherwise}\end{cases}$$

The general case for the circle of radius $\delta$ and center$(a,b)$ follows by translation and dilatation


In general, given a $C^\infty(\mathbb{R})$ function $h$ with compact support $[0,1]$, the function

$$g((x,y)):=h\left(\sqrt{x^2+y^2}\right)$$ works for the unitary circle

  • $\begingroup$ So does that mean, for radius $\delta$ and center $(a,b)$, we would have $f(x,y)=e^{-1/(((x-a)/\delta)^2+((y-b)/\delta)^2-1)^2}$ $\endgroup$
    – natn2323
    Mar 3, 2020 at 16:39
  • 1
    $\begingroup$ @natn2323 yes, that is one of the possible functions $\endgroup$
    – Caffeine
    Mar 3, 2020 at 17:13

If $f(t)>0$ for $0\leq t <\delta^{2}$ and $f(t)=0$ for $t >\delta^{2}$ then $f(\|(x,y)-(a,b)\|^{2})$ satisfies your requirements.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.