Am I way off on this proof of continuity of $f(x)=\frac{x+|x|}{2}$?

846 Views Asked by At

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:

  1. A function $f$ is continuous if $|x-a| < \delta$ then $|f(x)-f(a)| < \epsilon$.

  2. Alternatively express the above as $|f(x)-f(a)| < \epsilon$ if $|x-a| < \delta$

  3. 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.

4

There are 4 best solutions below

0
On

Yes, $f$ is continuous because $$|f(x)- f(a)| = \left|\frac{x+|x|}{2} - \frac{a+|a|}{2}\right| \leq \frac{|x-a|}{2} + \frac{||x|-|a||}{2}\leq |x-a|.$$ So, given $\epsilon>0$, take $0<\delta\leq \epsilon$ and for $|x-a|<\delta$, you have that $|f(x)-f(a)|<\epsilon$.

The same conclusion can be found by noting that $$\frac{x+|x|}{2}=\begin{cases} x&\text{if $x\geq 0$,}\\ 0&\text{if $x\leq 0$.} \end{cases}$$

3
On

You are working to hard. If Your function is just $f(x) =x$ if $x$ is non-negative, and $f(x)= 0$ if $x$ is non-positive. both formulas give $f(0) =0$ Surely you can show that $f$ is continuous on the non-positives and non-negatives hence on $\mathbb R$.

4
On

Why not with sequences ? Let $a \in \mathbb R$ and let $(a_n)$ be a sequence with $a_n \to a$. Then $|a_n| \to |a|$, hence

$f(a_n)=\frac{a_n+|a_n|}{2} \to \frac{a+|a|}{2}=f(a)$.

0
On

Technically, the by far easiest way (the way I used in my head when reading your question) is to use the fact that (finite) sums and compositions of continuous functions remains continuous. Now the identity function is clearly continuous, and the absolute function is too, and dividing by two is too, so done! Thus the only 'non-trivial' part is proving that the absolute function is continuous.