Suppose $f(x)$ and $g(x)$ are piecewise smooth functions. For simplicity, we can assume that $f(x)$ has $m$ pieces, and $g(x):=\max_{i=1,2,\ldots, I}\left\{k_i~ x+b_i\right\}$.
I have two questions:
- Is $h(x):=\mathbb{E}_W[g(Wx)]$ a smooth function instead of a piecewise function? Here, $W$ is a continuous random variable.
- If Question 1 is true, then can I conclude that $h(f(x))$ has exactly $m$ pieces as $f(x)$, and they have exactly the same breakpoints?
My intuition behind Question 1: Integration can be viewed as summation. Suppose W is discrete, and can take 100 values, then $\mathbb{E}_W[g(Wx)]$ should have 100*I pieces. Now that $W$ is continuous, it can take infinitely many values, so the true $\mathbb{E}_W[g(Wx)]$ should have infinitely many pieces, effectively a smooth function. But how to properly prove it?
My intuition behind Question 2: If my above intuition is true and $h(x)=\mathbb{E}_W[g(Wx)]$ indeed is a smooth function, then by plugging $f(x)$ into $h(x)$, it should give me a piecewise function that has the same number of pieces and the same breakpoints as $f(x)$.