# What does it mean for a function to have compact support?

In PDEs, we often see problems that say "assume the function has compact support" but I am really unsure of what this means. From a definition standpoint, I understand that a function has compact support if it is zero outside of the compact set but how does this help when looking for solutions?

Let $$I = (a,b)\subset \mathbb{R}$$, $$a, be an interval. Let $$\varphi \in C_c^\infty(I)$$, hence, $$\phi$$ is smooth and has compact support in $$I$$. Since $$\varphi$$ has compact support on an interval $$[c,d] \subset (a,b)$$, we can extend it to a function on $$\mathbb{R}$$ by setting $$\varphi=0$$ on $$\mathbb{R}\setminus [c,d]$$. Now we have $$\varphi\in C_c^\infty(\mathbb{R})$$ with $$\varphi(a)=0=\varphi(b)$$. Moreover, all derivatives of $$\varphi$$ also vanish on $$a,b$$. For example $$\varphi'(a)=0=\varphi'(b)$$.

Now, how does this help us finding solution of pdes? Let's make an example. Assume we want to solve Poisson's equation with Dirichlet boundary condition, i.e., \begin{align*} \Delta u(x) &= f(x) & &\text{in } I, \\ u(x) &= 0 & &\text{on } \partial I = \{a,b\}, \end{align*} where $$f \in C([a,b])$$ is given. We would like to show that there exists a function $$u \in C([a,b]$$ that solves this problem. Furthermore, we would like $$u$$ to be in $$C^2(I)$$ such that all derivatives are well-defined. The usual way to show this is as following

1. Show that there exists $$u$$ solving the problem in a weak sense.
2. Show that $$u$$ is actually in $$C^2(I)$$.

Hence, one shows that there exists a $$u$$ that solves this equation in some sense but $$u$$ is not assumed to be in $$C^2(I)$$. After that, one shows that $$u$$ is actually in $$C^2(I)$$ after all. So what do we mean by $$u$$ solves the problem in a weak sense? This is where the functions with compact support are important. Let $$u\in L^1_{\text{loc}}(I)$$, i.e., $$u$$ is locally integrable. Then we say that $$v\in L^1_{\text{loc}}(I)$$ is the weak derivative of $$u$$ if $$\int_I u \varphi' \, dx = - \int_I v \varphi \, dx,$$ for all $$\varphi \in C^\infty_c$$. Why does this make sense? Assume $$u\in C^1([a,b])$$, then integration by parts yields $$\int_I u \varphi' \, dx = - \int_I u' \varphi \, dx,$$ since the boundary terms vanish, because $$\varphi$$ has compact support. In this case the weak derivative of $$u$$ is $$u'$$, but if $$u$$ is not differentiable then any function $$v$$ satisfying the above is called the weak derivative of $$u$$. The standard example is $$u(x) = |x|$$. Classically $$u$$ doesn't have a derivative since it is not differentiable at $$0$$, but in the weak sense with the definition above we see that $$v(x) = 1,$$ for $$x\geq 0$$ and $$v(x) = -1,$$ for $$x>0$$ is a weak derivative of $$u$$.

Now going back to Poisson's equation with Dirichlet boundary condition. We first derive the weak formulation of $$\Delta u = f$$. Assume a solution $$u$$ exists with $$u\in C^2(I)$$. multiply $$\Delta u = f$$ by $$\varphi \in C_c^\infty(I)$$ and integrate over $$I$$. We get $$\int_I \Delta u \varphi \ dx = \int_I f \varphi \, dx.$$ Another integration by parts yields $$\int_I \nabla u \nabla\varphi \ dx = \int_I f \varphi \, dx.$$ Note in the one dimensional case this means $$\int_I u' \varphi' \ dx = \int_I f \varphi \, dx.$$ Hence we are looking $$u$$ that has a weak derivative $$u'$$, which has a weak derivative $$u''=f$$. Using theories from pdes, one can show that such an $$u$$ actually exists. In another step one then shows that $$u$$ is actually in $$C^2$$.

This might all seem a little bit confusing if you haven't seen those things in your courses yet. But the basic point is that one can use functions with compact support to define weak derivatives of functions. Using weak derivatives one then shows that there exists a function $$u$$ that solves the pde. However, we don't know that $$u$$ is in $$C^2$$ yet. In another step one then shows that $$u$$ is actually in $$C^2$$. The reason why one does this, is that, it is easier to show that there exists a general function that satisfies the pde and then shows that this function is actually in $$C^2$$, than to show that there exists a $$C^2$$ function that satisfies the pde directly.

As seen above it is not easy to show why functions with compact support are useful for pdes. However, one of the most useful properties of functions with compact support is that they and all their derivatives vanish on the boundary. This simplifies many calculations (e.g. integration by parts).

• Thank you so much! This really helped me to understand the idea of compact support. Commented Oct 18, 2020 at 0:13