A form for a piecewise continuous function?

774 Views Asked by At

$\def\rr{\mathbb{R}}$Take any $D \subseteq \rr$. Is it true that for any piecewise continuous function $f : D \to \rr$ there is an infinitely differentiable continuous function $g : D \to \rr$ and a piecewise constant function $h : D \to \rr$ and an infinitely differentiable continuous function $i : \rr^2 \to \rr$ such that $f(x) = i(g(x),h(x))$ for every $x \in D$?

1

There are 1 best solutions below

3
On BEST ANSWER

No, this does not work. In particular, let $$f(x)=\begin{cases}0 & \text{if }x\leq 0 \\ 1/x&\text{if }x>0\end{cases}$$ This function cannot be written in your form. To prove this, consider that, as $g$ is piecewise constant, there must be some interval of the form $(0,c)$ on which it is constant. Thus $\lim_{x\rightarrow 0^+}g(x)$ exists. Since $h$ is continuous, $\lim_{x\rightarrow 0^+}h(x)$ exists as well. Since $i$ is continuous and both these limits exist, we have that $\lim_{x\rightarrow 0^+}i(g(x),h(x))$ exists. However, $\lim_{x\rightarrow 0^+}f(x)$ does not exist, so $f(x)$ and $i(g(x),h(x))$ are not everywhere equal.

More generally, what this tells us is that if $f$ is a piecewise continuous function where one of its pieces cannot be continuously extended to a closed interval, then $f$ cannot be of this form - so a bounded example of such an $f$ is $$f(x)=\begin{cases}0 & \text{if }x\leq 0 \\ \sin(1/x)&\text{if }x>0\end{cases}.$$

Conversely, if each piece of $f$ can be continuously extended onto a closed interval, then it is relatively trivial to produce the suitable form. In particular, suppose the pieces of $f$ are the intervals $I_1,\ldots,I_n$ and $f_k$ is a continuous function $\overline{I_k}\rightarrow\mathbb R$ where $\overline{I_k}$ is the closure of $I_k$. Extend each $f_k$ continuous to a function $\mathbb R\rightarrow\mathbb R$ by making it a constant function extending from either endpoint of the interval. Then, if you choose $\delta_{i}(x)$ to be some continuous function* which is $1$ at $i$ and $0$ for any other $x\in \{1,\ldots,n\}$, we may write $$g(x)=x$$ $$\text{if }x\in I_k\text{ then }h(x)=k$$ $$i(x,y)=\sum_{k=1}^{n}f_k(x)\delta_i(y)$$ which is clearly correct, since in the interval $I_k$, we have that only $\delta_k(h(x))$ is non-zero, and hence the sum reduces to one term which is just $f_k(x)$, which agrees with $f$ on $I_k$.

(*There are plenty of choices for $\delta$. One would be to just use the Lagrange polynomial associated with our constraints, which is $\delta_i(x)=\frac{\prod_{k=1,k\neq i}^n(x-k)}{\prod_{k=1,k\neq i}^n(i-k)}$. Other choices would be tent maps, or shifted versions of $\operatorname{sinc}$.)