Prove that the trigonometric function is uniformly continuous 
In my assignment I have to prove that the following function is uniformly continuous in $(0,\frac{\pi}{2})$:
$$f(x)=\frac {1-\sin x}{\cos x}$$

Here is my suggestion for solution. Please let me know if I'm wrong somewhere:
I have to prove that if $|x_1-x_2|<\delta $ then  $|f(x_1)-f(x_2)|<\epsilon$:
$$\left|f(x_1)-f(x_2)\right|=\left|\frac {1-\sin x_1}{\cos x_1}-\frac {1-\sin x_2}{\cos x_2}\right|$$
$$=\left|\frac{1}{\cos x_1}-\frac{\sin x_1}{\cos x_1}-\frac{1}{\cos x_2}+\frac{\sin x_2}{\cos x_2}\right|$$
Since |$\sin x|\le 1$ we can write the following, since the following term is bigger:
$$=\left|\frac{1}{\cos x_1}-\frac{\sin x_1}{\cos x_1}-\frac{1}{\cos x_2}+\frac{1}{\cos x_2}\right|$$
$$=\left|\frac{1}{\cos x_1}-\frac{\sin x_1}{\cos x_1}\right|$$
Since $\frac{\sin x}{\cos x}=\tan x$:
$$=\left|\frac{1}{\cos x_1}-\tan x_1\right|$$
Now since the interval which the function is the defined in this particular question is $(0,\frac{\pi}{2})$, $\tan x_1>0$. Therefore, if we write the following term, we'll make it bigger:
$$=\left|\frac{1}{\cos x_1}-\tan x_1\right|<\left|\frac{1}{\cos x_1}-0\right|$$
Now we will choose $\delta=\frac{\cos x_1}{\epsilon}$:
$$\left|\frac{1}{\cos x_1}-0\right|<\frac{\cos x_1}{\epsilon}$$
Divide by $\cos x_1$ which is positive in the open interval $(0,\frac{\pi}{2})$:
$$\left|\frac{1}{1}\right|<\frac{1}{\epsilon}<\epsilon$$
Did I get it right?
Thanks,
Alan
 A: You could also just show both $\lim_{x\to 0^+} f(x)$ and $\lim_{x\to \pi/2^-} f(x)$ exist. That implies $f$ extends to be continuous on $[0,\pi/2],$ hence the extension is uniformly continuous there.
A: I assume you want to use $\epsilon$-$\delta$  (there are much easier ways).
Multiply top and bottom by $1+\sin x$. We get $\frac{\cos x}{1+\sin x}$.
We want to make $|f(x)-f(y)|\lt \epsilon$. We have
$$f(x)-f(y)=\frac{\cos x}{1+\sin x}-\frac{\cos y}{1+\sin y}=\frac{\cos x+\cos x\sin y-\cos y-\sin x\cos y}{(1+\sin x)(1+\sin y)}.$$
This has absolute value less than the absolute value of the numerator. So we want to bound
$$|\cos x+\cos x\sin y-\cos y-\sin x\cos y|,$$
which is less than or equal to
$$|\cos x-\cos y|+|\sin(x-y)|.$$
A: I suggest using the lipschitz condition so you just to need to prove that the derivative of f is bounded given interval. 
If you differentiate f, its derivative turns out to be $\frac{-1}{1+sin(x)}$ ( if i didn't make mistakes) which is surely bounded in the given interval!
