# uniformly continuous difficult problem

prove that $$f(x)= \begin{cases} {1-cosx\over x^2}, & \text{if x\neq 0} \\ 1/2, & \text{if x= 0} \\ \end{cases}$$ is uniformly continuous in $\mathbb R$ I can´t derivate in this problem I have already asked this question but I can´t do this and here are my attempts:

I need to prove that $\forall \epsilon \gt 0$ $\exists \delta \gt 0$ so that $\forall x,y\in \mathbb R$, $|x-y|\lt \delta\ \Rightarrow |{1-cosx\over x^2}-{1-cosy\over y^2}|\lt\epsilon$ in my first attempt I went backwards in other words i wanted to have an expression that contains$|x-y|$: $|{1-cosx\over x^2}-{1-cosy\over y^2}|=|{{1\over x^2}-{cosx\over x^2}-{1\over y^2}+{cosy\over y^2}}|$ $\le {|{1\over x^2}|+|{-cosx\over x^2}|+|{-1\over y^2}|+|{cosy\over y^2}|}$ $={|{1\over x^2}|+|{cosx\over x^2}|+|{1\over y^2}|+|{cosy\over y^2}|}$ and $|cosx|\le1$ then ${|cosx|\over |x^2|}\le{1\over |x^2|}$ so ${|{1\over x^2}|+|{cosx\over x^2}|+|{1\over y^2}|+|{cosy\over y^2}|}\le {|{1\over x^2}|+{1\over |x^2|}+|{1\over y^2}|+{1\over |y^2|}}$ $={2\over x^2}+{2\over y^2}\le\epsilon$ and after this i dont know how to get the expression that contains $|x-y|$

in my second attempt I use the fact that if a function $f$ is continuous in $[0,\infty)$ and is uniformly continuous in $[k,\infty]$ for some $k\gt 0$ then $f$ is uniformly continuous in $[0,\infty)$, I plot the function in geogebra and in $[{3\pi\over 2}, \infty)$the function ${1-cosx\over x^2}\le{1\over x^2}$ but i dont know that in the definition of uniformly continuous function i can do: $|{1-cosx\over x^2}-{1-cosy\over y^2}|\le|{1\over x^2}-{1\over y^2}|\lt\epsilon$ so I am really desperate i need to this for tommorow and I don´t know how to do this a really need some help

-
as I said I have already asked the question in I answered that i would tried to do the problem but I can´t do it... – David Hernandez Nov 30 '13 at 5:13
Why not use commas and periods to separate sentences and paragraghs? – awllower Nov 30 '13 at 5:15
I am sorry :) I am not very good at writing in mathjax – David Hernandez Nov 30 '13 at 5:24

Helpful identity: note that $$1 - \cos(x) = 2\frac{1 - \cos(2\frac{x}{2})}{2} = 2 \sin^2\left(\frac{x}{2}\right)$$ so that our function is simply $$f(x)= \begin{cases} 2 {\sin^2(\frac x2)\over x^2}, & \text{if x\neq 0} \\ 1/2, & \text{if x= 0} \\ \end{cases}$$ With that in mind, we can find (assuming $x,y \neq 0$) \begin{align} \left|f(x)-f(y)\right| &= 2\left| \left(\frac{\sin(\frac y2)}{y}\right)^2 - \left(\frac{\sin(\frac x2)}{x}\right)^2 \right|\\ &=2\left| \left(\frac{\sin(\frac y2)}{y}\right) + \left(\frac{\sin(\frac x2)}{x}\right) \right| \left| \left(\frac{\sin(\frac y2)}{y}\right) - \left(\frac{\sin(\frac x2)}{x}\right) \right| \end{align} Now, we just have to work with $\left| \left(\frac{\sin(\frac y2)}{y}\right) - \left(\frac{\sin(\frac x2)}{x}\right) \right|$ to get out a $|x-y|$.
thank you!! and we also have that ${|xsin(y)-ysin(x)|\over |xy|}\le{|x-y|\over |xy|}$ is this correct? – David Hernandez Nov 30 '13 at 5:50
I think there is a typo. $\frac{2\sin^2(x)}{x^2}$ should be $\frac{2\sin^2(x/2)}{x^2}$ and similarly for the rest – E.O. Nov 30 '13 at 6:00
@E.O. thank you, duly noted. David: I'm not sure you can make that simplification directly; doing so assumes $\sin(y/2)$ and $\sin(x/2)$ have the same sign. Maybe there's some condition on $\delta$ that allows you to do that though – Omnomnomnom Nov 30 '13 at 6:10
Maybe you can say something like "as shown in the text/class, $\sin(x/2)/x = \frac 12 \frac{\sin(x/2)}{x/2}$ is uniformly continuous" – Omnomnomnom Nov 30 '13 at 6:13