# How to prove the Lipschitz continuity of the following functions？

If $$f(x)=\frac{\cos(x)-\cos(a)}{x-a}$$, where $$a$$ is a fixed number, how to prove the following inequality $$\begin{equation} |f(x_1)-f(x_2)|\leq C|x_1-x_2|,\quad \forall~~ x_1,x_2\in \mathrm{R}.~~~~~~~~~~(1) \end{equation}$$

In particular, let $$a=0$$, we have $$f(x)=\frac{\cos(x)-1}{x}$$, I've plotted the graphic of $$f^{\prime}(x)$$ with $$x\in[-20\pi,20\pi]$$ by using MATLAB: It seems that $$f^{\prime}(x)$$ is bounded and the result $$(1)$$ holds. However, could anyone show me how to prove this conclusion $$(1)$$?

The MATLAB code is as follows:

x=-20*pi:0.003*pi:20*pi;
y1=(-x.*sin(x)-cos(x)+1)./(x.^2);
plot(x,y1)

• Hint: check mean value theorem. This looks like a textbook problem/assignment so I am going to give a full answer, but the hint should be more than enough for you to figure out the proof yourself. – Abdullah Ali Sivas Apr 5 at 13:35
• This is a math question. You should ask it on the Math StackExchange forum. – Wolfgang Bangerth Apr 6 at 2:37

## 1 Answer

In terms of divided differences, you have $$f(x)=g[x,a]$$, $$g(x)=\cos(x)$$. Then the divided difference of $$f$$ is, by the recursive definition of them and their symmetry, the order 2 divided difference of $$g$$, $$f[x,y]=\frac{g[a,y]-g[x,a]}{y-x}=g[x,a,y]=g[a,x,y]$$ It is known that there is some $$\xi$$ in the interval containing $$a,x,y$$ so that $$g[a,x,y]=\frac12g''(\xi)$$ If $$g''$$ is bounded, as here with $$g''(x)=-\cos(x)$$ by $$1$$, then this bound, divided by 2, is a Lipschitz constant for $$f$$.