We're asked to determine where $f(x)=\frac{x+|x|}{2}$ is continuous and prove. Clearly, it is continuous on $\mathbb{R}$.
The answer that I was able to find involved splitting it into three separate intervals $(x<0, x = 0, x>0)$. Intuitively, that is how I decided it was continuous on $\mathbb{R}$, but it seems to me a simpler $\epsilon-\delta$ proof is as follows:
A function $f$ is continuous if $|x-a| < \delta$ then $|f(x)-f(a)| < \epsilon$.
Alternatively express the above as $|f(x)-f(a)| < \epsilon$ if $|x-a| < \delta$
Suppose $|x-a| < \delta$. Then: $$|f(x)- f(a)| = \left|\frac{x+|x|}{2} - \frac{a+|a|}{2}\right| < \epsilon$$ rearrange, and use triangle inequality: $$|x+|x|-(a-|a|)| = \left|x-a-(|x|-|a|)\right|\leqslant |x-a| + ||x|-|a|| <2\epsilon$$
Using the above definition of $\delta$ and the second triangle inequality $$|x-a| + ||x|-|a|| < |\delta| + \left||x|-|a|\right| \leqslant |\delta| + |x-a| \leqslant |\delta| +|\delta| =2\delta <2\epsilon$$
Therefore, if $|x-a|<\delta, |f(x)-f(a)| < \epsilon$, and $\epsilon>\delta$, so we can pick $x$ "close enough" (i.e., within $\delta$ of the a) so the function is continuous
I want to know if that is just totally wrong, so that I don't go about trying to prove things in a similar manner to find out I'm missing the point.