Is there a smooth function in the unit ball with compact support?

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
12 replies · 2K views
docnet
Messages
796
Reaction score
487
Homework Statement
Is there a smooth function in the unit ball with compact support?
Relevant Equations
Functions of the form:
##\begin{cases}f(x,y,z) \geq 0 & \text{for}\quad ||x^2+y^2+z^2||<1 \\
0 & \text{elsewhere}\end{cases}##
Is there a function that takes positive values only in the unit ball not including the boundary points defined by the set ##\{x^2+y^2+z^2<1\}##, and ##0## everywhere else?
 
Physics news on Phys.org
So sorry, I forgot that one needs to attempt a solution.

In 1 dimension, I think a piece-wise polynomial function like
$$f(x)=\begin{cases}
0 & x<-1 \\ (x+1)^4 & -1\leq x < -\frac{1}{2} \\ 2x^4-\frac{3}{2}x^2+\frac{5}{16} & -\frac{1}{2} \leq x<\frac{1}{2} \\ (x-1)^4 & \frac{1}{2}\leq x<1 \\
0 & 1\leq x
\end{cases}$$
is ok. To extend this to the 3D case, maybe something like
$$g(x)=\begin{cases}
0 & |(x,y,z)|<-1 \\ (x+y+z+1)^4 & -1\leq |(x,y,z)| < -\frac{1}{2} \\ 2(x^4+y^4+z^4)-\frac{3}{2}(x^2+y^2+z^2)+\frac{5}{16} & -\frac{1}{2} \leq |(x,y,z)|<\frac{1}{2} \\ (x-y-z-1)^4 & \frac{1}{2}\leq |(x,y,z)|<1 \\
0 & 1\leq |(x,y,z)|
\end{cases}$$
is ok?
 
This was definitely not a precalculus sort of question, so I have moved it to the calculus section. "smooth" implies properties of both the function and its derivative.
 
  • Like
Likes   Reactions: docnet
@Office_Shredder, @Keith_McClary, @Mark44, Thank you so much for your advice about the smoothness and making ##f## a function of distance from the origin. Unfortunately I am busy with other classes for a few days. I will work on this problem in a few days and come back when I believe I have it right.
 
The piecewise polynomials will never work out as they will not be smooth due to having different derivatives at at least some order (if not they are the same polynomial). For example, if your polynomials are of order four you cannot have different coefficients in front of the ##x^4## term because that would mean that the fourth derivative with respect to ##x## would not be continuous.

Also, examples can be found on the Wikipedia page already posted ...
See also Bump function.
 
  • Like
Likes   Reactions: docnet
@Orodruin thank you for your thoughtful advice regarding piecewise polynomials. It makes intuitive sense that they are only smooth up to a degree.

Per the wikipedia page, the bump function is $$f(x,y,z)=e^{-\frac{1}{1-x^2-y^2-z^2}}$$ or $$f(r)= e^{-\frac{1}{1-r^2}}$$ in polar coordinates

over the domain defined by the unit disk and ##0## else.

Here is a graph of the case when ##f(x,y)=e^{-\frac{1}{1-x^2-y^2}}##

Screen Shot 2021-04-07 at 11.02.45 AM.png


A confusing aspect of this assignment is my professor asks us to plot the graph of the case ##f(x,y,z):\mathbb{R}^3\rightarrow \mathbb{R}##.

I wonder if he wants me to imagine an inventive way to illustrate the graph, explain why it is not possible, or maybe discover the ##4^{th}## spatial dimension using my portable pocket particle accelerator?
 
One interesting thing to note is that since all the derivatives at the boundary need to be 0, whatever function you are using inside the ball, it cannot be analytic (i.e. cannot be equal to its Taylor series locally at the boundary, since that Taylor series is identically zero).I have no idea how you are supposed to graph a 3d function.
 
  • Like
Likes   Reactions: docnet
Office_Shredder said:
One interesting thing to note is that since all the derivatives at the boundary need to be 0, whatever function you are using inside the ball, it cannot be analytic (i.e. cannot be equal to its Taylor series locally at the boundary, since that Taylor series is identically zero).I have no idea how you are supposed to graph a 3d function.
That is interesting and mysterious!