# Does uniform continuity of |f| imply uniform continuity of f?

• B
• Eclair_de_XII

#### Eclair_de_XII

TL;DR Summary
Define a function ##f:D\longrightarrow \mathbb{R}## such that for some ##a\in D##, ##f(x)>0## if ##x>a## and ##f(x)\leq 0## if ##x\leq a##. Note: ##f(a)=0## by the IVT. If ##|f|## is uniformly continuous on ##D##, then does that mean ##f## is also uniformly continuous?
I'd say yes, it is. Suppose ##|f|## is uniformly continuous on ##D##.

Then for all ##\epsilon>0## there is ##\delta>0## (call this ##\delta'##) such that if ##x,y\in D##, then ##||f(x)|-|f(y)||<\epsilon##.

Define sets:

##D^+=\{x\in D: x>a\}##

##D^-=\{x\in D: x<a\}##

Restrict the domain of ##f## to ##D^+##; note that ##f=|f|## here so it follows that ##f## is uniformly continuous here. In other words, if you want the distance between the images any two points ##x,y\in D^+## to be as small as possible, you need only ensure that the distance between ##x,y## is at most ##\delta'##.

Now restrict the domain of ##f## to ##D^-##. Let ##\epsilon>0## and choose ##\delta'##. Note that if ##x,y\in D^-##, then:

\begin{align}
|f(x)-f(y)|&=&|-|f(x)|-(-|f(y))|\\
&=&|-|f(x)|+|f(y)|| \\
&<&\epsilon
\end{align}

since ##|f|## is uniformly continuous.

Finally, note that ##|f|## is continuous at ##x=a## and moreover, to ensure that the image of a point ##x## is within ##\epsilon## of ##f(a)=0##, you can choose an ##x## within ##(a-\delta',a+\delta')##, since ##|f|## is uniformly continuous.

Let ##\epsilon>0## and choose ##\delta=\delta'>0##. Suppose ##x\in D^+ \cup D^-##. Then:

\begin{align}
|f(x)-f(a)|&=&|f(x)|\\
&=&||f|(x)|\\
&<&\epsilon
\end{align}

Does it even imply continuity?
\begin{align*}
1\text{____________________________}&\\
&\text{_______________________________________}-1
\end{align*}

• Eclair_de_XII
Oh! So ##f(x)=1## if ##x<a## and ##f(x)=-1## if ##x\geq a##.

##|f|(x)=1## for all ##x##, so it is uniformly continuous, but ##f## is not even continuous much less uniformly.

No, it doesn't. Thanks.

I think I made a mistake when I assumed that ##f## was continuous when citing the IVT.

Note: ##f(a)=0## by the IVT.

Last edited:
Does it even imply continuity?
\begin{align*}
1\text{____________________________}&\\
&\text{_______________________________________}-1
\end{align*}
But does this satisfy the stipulation that |f| is uniformly continuous at the point x=a, where f(a)=0? Does D omit a?

But does this satisfy the stipulation that |f| is uniformly continuous at the point x=a, where f(a)=0? Does D omit a?
Seems I only answered to the title. If ##f(a)=0,## and ##|f|## is uniformly continuous at ##a##, then it there probably won't be a significant difference between ##f## and ##|f|## at ##a##, since all terms are only locally defined.

But does this satisfy the stipulation that |f| is uniformly continuous at the point x=a, where f(a)=0? Does D omit a?

The problem statement is confused. Consider the first sentence:

Summary:: Define a function ##f:D\longrightarrow \mathbb{R}## such that for some ##a\in D##, ##f(x)>0## if ##x>a## and ##f(x)\leq 0## if ##x\leq a##.

Here there is no requirement that $f$ be continuous, or that $f(a) = 0$. A function like $$g : x \mapsto \begin{cases} -1 & x \leq a \\ 1 & x > a \end{cases}$$ satisfies the given condition. Note that $|g| = 1$ is uniformly continuous, but $g$ itself is not continuous at $a$.

But then it is said that

Note: ##f(a)=0## by the IVT.

This implies that $f$ is continuous, since if it weren't the IVT simply would not apply. I think the OP needs to clarify whether this is actually part of the problem statement or whether it is a conclusion they have arriced at themselves, and if so their justification for it.

If ##|f|## is uniformly continuous on ##D##, then does that mean ##f## is also uniformly continuous?

As the example above shows, you also require continuity of $f$, which was not expressly stated to be the case.

The condition does imply that for $x \leq a$ we have $f = -|f| \leq 0$ which is uniformly continuous if $|f|$ is, and for $x > a$ we have $f = |f| > 0$ which again is uniformly continuous if $|f|$ is. (If $|f|$ is uniformly continuous on $D$ then it is uniformly continuous on any subset of $D$: the same $\delta$ will work as for all of $D$.)

If $f$ is actually restricted to be continuous then by the above argument it is indeed uniformly continuous on $D$.

OP needs to clarify whether this is actually part of the problem statement

Sorry. That was sort of an assumption that I made on my own. It was not actually part of the assignment.

If ##f## is uniformly continuous, does it follow that ##|f|## is also uniformly continuous? If ##|f|## is uniformly continuous, does it follow that ##f## is uniformly continuous? Answer the same questions with uniformly continuous replaced with ''continuous''. Explain why.

After the preceding discussion, what are your answers to the exact assignment questions?

After the preceding discussion, what are your answers to the exact assignment questions?
If ##f(a)=0## then ##||f(x)|-|f(a)||=|f(x)-f(a)|##.

If ##f(a)=0## then ##||f(x)|-|f(a)||=|f(x)-f(a)|##.
I was meaning to ask the OP how he would answer the actual problem as stated in post #7. It is quite different.

answers to the exact assignment questions

Yes, uniform continuity of ##f## implies uniform continuity of ##|f|##. If ##\epsilon>0##, then for some ##\delta>0##, if ##x,y\in D##, then ##|x-y|<\delta## implies ##||f(x)|-|f(y)||\leq |f(x)-f(y)|<\epsilon##.

Conversely, no. Let:

##
f(x)=
• 