I have some exercise that asks me this:
Find $f$ and $g$ discontinuos such that $f+g$ is continuous. This is what I tought:
$$f = \mbox{sign}(x)$$ $$g = -\mbox{sign}(x)$$
Where $\mbox{sign}(x)$ is the function that maps to $1$ if $x\ge0$ and $-1$ if $x<0$. Then, the two are discontinuous in $0$, but the sum, is continuous, because it's equal to $0$ in every point. First of all, is this example correct?
The exercise also asks me to find examples such that:
$f,g$ discontinuous, but $f$ composed with $g$ is continuous. (need help)
$f$ continuous, $g$ discontinuous but the composite $f$ with $g$ is continuous.
(for the second one, if I take $g=\mbox{sign}(x)$ and $f=|x|$, then $fog = 1$. Is this right?
Could you guys give at least a hint, or a less poor example?