12

Determine whether the function$$f(x)={\sin x \over x}$$is uniformly continuous in $\mathbb{R}$.

I am using the definition that for $\epsilon>0$ there exists $\delta>0$ such that $|f(x)-f(y)|<\epsilon$ whenever $|x-y|<\delta$.

Dan Rust
  • 30,973
Aman Mittal
  • 2,145

4 Answers4

47

One has $$f(x):={\sin x\over x}=\int_0^1 \cos(\tau x)\ d\tau\ .$$ It follows that $$|f(x)-f(y)|\leq \int_0^1|\cos(\tau x)-\cos(\tau y)|\ d\tau\leq \int_0^1\tau |x-y|\ d\tau={1\over2}|x-y|\ .$$ This proves that $f$ is even Lipschitz-continuous.

  • 8
    Now this is a damn beautiful, simple, elegant and nice answer! +1 – DonAntonio Jul 05 '13 at 22:55
  • Christian Blatter I have a little doubt. Unless we know the value of $f(0)$ how can we talk about the continuity of $f$ on entire R? – KON3 Nov 07 '14 at 10:04
  • 1
    @AnjanDebnath: The defining formula indeed gives no value for $f(0)$. I have tacitly filled this value in by putting $f(0)=1$, as everyone does. – Christian Blatter Nov 07 '14 at 10:20
  • fine. doubt is clear – KON3 Nov 07 '14 at 10:29
  • @ChristianBlatter: Can you explain how $|\cos(\tau x)-\cos(\tau y)|\leq\tau|x-y|$ arises, please? Thanks alot. – freishahiri Dec 02 '14 at 02:06
  • 1
    @Freeze_S: It is a consequence of the mean value theorem. If $g(x) = \cos(\tau x)$, then for $x\neq y$ $\dfrac{g(x)-g(y)}{x-y}=g'(z)$ for some $z$ between $x$ and $y$. Note that $|g'(z)|\leq \tau$. – Jonas Meyer Dec 02 '14 at 06:49
  • @JonasMeyer Even more elementary, we have $$\begin{align} |\cos(\tau x)-\cos(\tau y)|&=\left|2\sin\left(\frac{\tau(x-y)}{2}\right)\sin\left(\frac{\tau(x+y)}{2}\right)\right|\\ &\le |\tau (x-y)| \end{align}$$ – Mark Viola Nov 11 '20 at 20:04
9

The function $f$ has bounded derivative over $\Bbb R$, given by $$f'(x)=\frac{\cos x}{x}-\frac{\sin{x}}{x^2}$$

It is bounded for $x$ outside a neighborhood of $x=0$. Now note that by definition, the derivative at $0$ is $$\mathop {\lim }\limits_{h \to 0} \frac{1}{h}\left( {\frac{{\sin h}}{h} - 1} \right) = \mathop {\lim }\limits_{h \to 0} \frac{{\sin h - h}}{{{h^2}}} = \mathop {\lim }\limits_{h \to 0} \frac{{\cos h - 1}}{{2h}} = 0$$

by an application of L'Hôpital's rule. Thus $f'(0)=0$. Now, note that again $$\mathop {\lim }\limits_{x \to 0} f'(x) = \mathop {\lim }\limits_{x \to 0} \left( {\frac{{x\cos x - \sin x}}{{{x^2}}}} \right) = \mathop {\lim }\limits_{x \to 0} \frac{{ - x\sin x}}{{2x}} = 0$$ by L'Hopital. Thus $f'$ is continuous over the real line, and bounded. It follows $f$ is Lipschitz continuous, with constant $M=\sup_{x\in\Bbb R}|f'(x)|$

Pedro
  • 125,149
  • 19
  • 236
  • 403
7

Hint:

  1. $\lim_{x \to \pm \infty} \frac{\sin x}{x} =0$;
  2. $f$ is continuous (I tacitly assume you have defined $f(0)=1$).

Use 1. to split $\mathbb{R} = (-\infty, - M ) \cup [-M,M] \cup (M,+\infty)$, and prove that $f$ is separately UC on each interval. For the middle one, you must know that continuity on a compact set implies uniform continuity.

Siminore
  • 35,786
  • 4
    I don't understand how you are suggesting to prove that $f$ is uniformly continuous on $(M,\infty)$. It is true of course, but it would easier I think to do the breaking up into $[-M,M]$ vs. $\mathbb R\setminus [-M,M]$ after an $\varepsilon>0$ has been fixed in the proof that $f$ is uniformly continuous on $\mathbb R$, because $M$ will have to be chosen based on a fixed $\varepsilon$, not to work for all $\varepsilon$. To prove that $f$ is uniformly continuous on $(M,\infty)$ would be just as much work as showing it is uniformly continuous on $\mathbb R$. Am I misunderstanding? – Jonas Meyer Jul 05 '13 at 15:47
  • 1
    I don't understand why $\mathbb{R} \setminus [-M,M]$ should be easier to deal with than $(-\infty,M) \cup (M,+\infty)$. – Siminore Jul 06 '13 at 08:13
  • It isn't. Apparently I was unclear. I mentioned $(M,\infty)$ for brevity because it is obvious that there is no difference between $(-\infty,-M)$ and $(M,\infty)$. The problem I have with this answer is that you state your hint as though showing uniform continuity separately on $[-M,M]$ and its complement is significantly easier, without indicating how. I would say that it is a good idea to use your observations 1. and 2. to prove uniform continuity on all of $\mathbb R$. Note what I wrote in the rest of my comment: You can choose $M$ based on $\varepsilon$, not before. – Jonas Meyer Jul 06 '13 at 18:01
  • @JonasMeyer: It is easier because: The derivative is bounded on $(-\infty,-\varepsilon)\cap(\varepsilon,\infty)$ so the function is uniformly continuous there. Also it is continuous on $[-\varepsilon,\varepsilon]$ so by compactness uniformly continuous here, too. Thus it is uniformly continuous on the whole real after fiddling in an adjusting argument for the patching. – freishahiri Dec 02 '14 at 02:15
  • @JonasMeyer: Ah ok the derivative is for this example even everywhere bounded. But this technique applies quite well to say $x^2\sin(\frac{1}{x})$. – freishahiri Dec 02 '14 at 02:25
  • @Freeze_S: Thanks, Siminore never replied, but perhaps that is what they had in mind, and that sure does work (the derivative is bounded, as you said in your first comment). Pedro's answer uses the derivative well. But that would make point 1 above superfluous, whereas I had in mind a proof that would work for an arbitrary continuous function satisfying $\lim\limits_{|x|\to\infty}f(x)=0$. Siminore never said what proof they have in mind. – Jonas Meyer Dec 02 '14 at 03:13
  • @JonasMeyer: You're welcome. Well, you need point 1 in order to check uniform continuity outside zero. What proof did you have in mind? – freishahiri Dec 02 '14 at 08:40
  • @Freeze_S: No you don't, particularly not if you are going to use boundedness of the derivative as you suggested. The function is Lipschitz, much stronger than uniform continuity, and that is not implied by points 1 and 2. If you are going to use point 1 however, you need only continuity. Given $\varepsilon>0$, choose $M>1$ such that $|f(x)|<\varepsilon/2$ when $|x|>M$. Using continuity of $f$ on the compact set $[-2M,2M]$, choose $\delta>0$, (and $\delta<1$) such that for all $x$ and $y$ with $|x|<2M$ and $|y|<2M$, $|x-y|<\delta\implies |f(x)-f(y)<\varepsilon$. – Jonas Meyer Dec 02 '14 at 14:09
  • (continued) @Freeze_S: Then for all $x$ and $y$ in $\mathbb R$, if $|x-y|<\delta$, then either $|x|<2M$ and $|y|<2M$, in which case $|f(x)-f(y)|<\varepsilon$ as in the previous sentence, or $|x|>M$ and $|y|>M$, in which case $|f(x)-f(y)|\leq |f(x)|+|f(y)|<\varepsilon$. – Jonas Meyer Dec 02 '14 at 14:12
2

This query has been used as a reference to justify voting to close a new query. However, the new query specifically requires that $~\epsilon, \delta~$ be employed. Therefore, I am filling the gap so that the new query is answered here.

Define $f(x)$ so that $~f(0) = 1,~~$ and for all $~\displaystyle x \neq 0, ~~f(x) = \frac{\sin ~x}{x} ~\implies$
[since $\lim_{x \to 0} ~f(x) ~= ~1$] $~f(x) ~$ is continuous everywhere.

I will employ an $\epsilon, \delta$ approach to demonstrate that $f$ is uniformly continuous throughout $\mathbb{R}.$ This answer will then constitute a stronger result than the OP in the new query is asking for.


To Prove

For any $~\epsilon > 0~$ there exists $~ \delta > 0 ~$ such that
$|~f(x) ~-~ f(y) ~| ~<~ \epsilon~$ whenever $~|~x ~-~ y ~| ~<~ \delta$.


Let $~g(x) ~\equiv ~x (\cos x) - (\sin x) ~\implies ~g(0) ~= ~0.$
Let $~h(x) ~\equiv ~(\sin x) ~- ~x (\cos x) ~- ~x^2 ~\implies ~h(0) ~= ~0.$
For any fixed value of $~x, ~$ and any variable value of $~\delta,$
$~~~~~~~~~~~~$let $~J_x(\delta) ~\equiv ~f(x) ~- ~f(x + \delta) ~- ~\delta ~\implies ~~J_x(0) ~= ~0.$
Let $~k(x) ~\equiv ~f(0) ~- ~f(x) ~- ~x ~\implies ~k(0) ~= ~0.$
Let $~m(x) ~\equiv ~(\sin ~x) ~- ~x ~\implies ~m(0) ~= ~0.$


$\underline{\textbf{Lemma 1:}}$
$-\pi/2 ~< ~x ~< ~0 ~\implies ~g(x) ~> ~0 ~~$ and
$0 ~< ~x ~< ~\pi/2 ~\implies ~g(x) ~< ~0.$
$\underline{\text{Proof:}}$
$g'(x) ~= ~x (-\sin ~x) ~+ ~(\cos ~x) ~- ~(\cos ~x) ~= ~-x (\sin ~x).$
Therefore,
for $~-\pi/2 ~< ~x ~< ~0, ~g(x) ~$ is strictly decreasing $~~$and
for $~0 ~< ~x ~< ~\pi/2, ~g(x) ~$ is strictly decreasing.

$\underline{\textbf{Lemma 2:}}$
For $-\pi/2 ~< ~x ~< ~0, ~f(x) ~$ is strictly increasing $~~$ and
for $~0 ~< ~x ~< ~\pi/2, ~f(x) ~$ is strictly decreasing.
$\underline{\text{Proof:}}$
For $\displaystyle ~x ~\neq ~0, ~f'(x) ~= ~\frac{x (\cos ~x) ~- ~(\sin ~x)}{x^2} ~= ~\frac{g(x)}{x^2}.$
Invoke Lemma 1.

$\underline{\textbf{Lemma 3:}}$
For $0 ~< ~x, ~h(x) ~< ~0 ~~$ and
for $~x ~< ~0, ~h(x) ~< ~0.$
$\underline{\text{Proof:}}$
$h'(x) ~= (\cos ~x) ~+ ~x(\sin ~x) ~- ~(\cos ~x) ~- ~2x$
$= ~x(\sin ~x) ~- ~2x ~= x(\sin ~x - 2).$
Noting that $~h(0) ~= ~0,$
for $~x ~< ~0, ~h(x) ~$ is strictly increasing $~~$ and
for $~x ~> ~0, ~h(x) ~$ is strictly decreasing.

$\underline{\textbf{Lemma 4:}}$
For $~0 ~< ~x, ~0 ~< ~\delta, ~J_x(\delta) < 0.$
$\underline{\text{Proof:}}$
$\displaystyle ~J_x(\delta) ~= ~\frac{\sin ~x}{x} ~- ~~\frac{\sin ~(x + \delta)}{x + \delta} ~- ~\delta ~\implies$

$\displaystyle ~\frac{d ~J_x(\delta)}{d ~\delta} ~= ~- ~\frac{(x + \delta) (\cos[x + \delta]) ~- ~(\sin[x + \delta])} {(x + \delta)^2} ~- ~1$

$\displaystyle ~= ~\frac{(\sin[x + \delta]) ~- ~(x + \delta)(\cos[x + \delta]) ~- ~(x + \delta)^2}{(x + \delta)^2}$

$\displaystyle ~= ~\frac{h(x + \delta)}{(x + \delta)^2}.$

Invoke Lemma 3, noting that $~J_x(0) ~= ~0.$

$\underline{\textbf{Lemma 5:}}$
For $~0 ~< ~x ~< \pi/2, ~k(x) < 0.$
$\underline{\text{Proof:}}$
Since $~f(0) ~= ~1, ~k(x) ~= ~1 ~- ~f(x) ~- ~x.$

By the analysis in the proof to Lemma 2,
$\displaystyle k'(x) ~= ~- ~\frac{g(x)}{x^2} ~- ~1 ~= ~\frac{h(x)}{x^2}.$

By Lemma 3, this implies that for $0 ~< ~x ~< \pi/2, ~k'(x) < 0.$
Noting that $~k(x) ~= ~0, ~$ the Lemma is proven.

$\underline{\textbf{Lemma 6:}}$
For $~0 ~< ~x, ~m(x) < 0.$
$\underline{\text{Proof:}}$
$m'(x) ~= ~(\cos ~x) ~- ~1 ~\implies$
for $~x ~< ~\pi/2, ~m'(x)~$ is strictly negative.
Thereafter, $~m'(x)~$ is never $~> ~0.$
Therefore, with $~m(0) = 0, ~m(x)$
is strictly decreasing on $~(0, ~\pi/2)~$ and
thereafter, is strictly non-increasing.

$\underline{\text{Identity 7:}}$
For $~0 ~< ~|a - b| ~< ~(\pi/4),$

$\displaystyle |(\sin ~a) ~- ~(\sin ~b)| ~= ~2\left|\left(\sin\frac{a - b}{2}\right) ~\left(\cos\frac{a + b}{2}\right)\right|$

$\displaystyle \leq ~2\left|\left(\sin\frac{a - b}{2}\right) \right|$

$\displaystyle = ~2 \times \left(\sin ~\left|\frac{a - b}{2}\right|\right) ~< ~\text{[by Lemma 6]} ~|a - b|.$


WLOG $~x ~< ~y.$
Set $\displaystyle ~\delta = \min\left[\left(\frac{\pi}{4} \times \epsilon/2\right), ~\left(\pi/4\right)\right] ~\implies \frac{\delta}{\pi/4} ~< ~(\epsilon/2).$

Note that $~\forall ~x, ~f(x) ~= ~f(-x). ~$ Assume that $~|x - y| ~< ~\delta.$

$\underline{\text{Case 1:} ~~x ~< ~0 ~\leq ~y}$
$|f(x) - f(y)| ~\leq ~|f(x) - f(0)| ~+ |f(0) - f(y)|~$
$= ~|f(-x) - f(0)| ~+ ~|f(0) - f(y)|.$
By Lemma 5, each of the two terms in the line above is $~< ~\delta.$
Therefore, their sum is less than $~\epsilon.$

$\underline{\text{Case 2:} ~~x ~= ~0 ~< ~y}$
By Lemma 5, $~|f(x) - f(y)| ~< ~\delta ~< ~\epsilon.$

$\underline{\text{Case 3:} ~~0 ~< ~x ~< ~\pi/4 ~~~~ \text{and} ~~~~x ~< ~y}$
Let $~\alpha ~= ~(y - x) ~\implies ~\alpha ~< ~\delta.$
Then, by Lemma 4,
$~|f(x) - f(y)| ~= ~J_x(\alpha) ~+ ~\alpha ~< ~\alpha ~< ~\delta ~< ~\epsilon.$

$\underline{\text{Case 4:} ~~\pi/4 ~\leq ~x ~< ~y}$
Let $~\alpha ~= ~(y - x) ~\implies ~\alpha ~< ~\delta.$

$\displaystyle |f(x) - f(y)| ~= ~\left|\frac{\sin ~x}{x} ~- ~\frac{\sin ~y}{y}\right|$

$\displaystyle = ~\left|\frac{\sin ~x}{x} ~- \frac{\sin ~x}{y} ~+ \frac{\sin ~x}{y} ~- ~\frac{\sin ~y}{y}\right|$

$\displaystyle \leq ~\left|\frac{\sin ~x}{x} ~- \frac{\sin ~x}{y}\right| ~+ ~\left|\frac{\sin ~x}{y} ~- ~\frac{\sin ~y}{y}\right|.$

Using Lemma 6,

$\displaystyle ~ \left|\frac{\sin ~x}{x} ~- \frac{\sin ~x}{y}\right| ~= \left(\frac{1}{x} - \frac{1}{y}\right) ~|\sin ~x|$

$\displaystyle < ~\left(\frac{y - x}{xy}\right) \times (x) ~= ~\frac{\alpha}{y} ~< ~\frac{\delta}{\pi/4} ~< ~\frac{\epsilon}{2}.$

Using Identy 7,

$\displaystyle \left|\frac{\sin ~x}{y} ~- ~\frac{\sin ~y}{y}\right| ~= ~\left(\frac{1}{y}\right) \times \left|\sin ~x ~- ~\sin ~y\right|$

$\displaystyle < ~\left(\frac{1}{\pi/4}\right) \times (\alpha) ~< ~\frac{\delta}{\pi/4} < \frac{\epsilon}{2}.$

Thus, $~|f(x) - f(y)| ~< ~\epsilon.$

$\underline{\text{Case 5:} ~~x ~< ~y ~\leq ~0}$
Since $~f(x) = f(-x), ~|f(x) - f(y)| ~= ~|f(-x) - f(-y)| .$
Therefore, Case 5 is proven by Cases 2 through 4, collectively.

user2661923
  • 42,303
  • 3
  • 21
  • 46