Epsilon - delta proof $\lim_{x \to \frac{\pi}{4}} \tan(x)=1$ I need to prove the limit using the definition of limit $$\lim_{x\to c}f(x)=L \leftrightarrow \forall \epsilon >0  \hspace{0.5 cm} \exists \delta >0 : 0<|x-c|<\delta \rightarrow |f(x)-L|<\epsilon $$
My attempt
$$|\tan(x)-1|<\epsilon\\ -\epsilon <\tan(x)-1 < \epsilon\\ \tan^{-1}(-\epsilon+1)<x<\tan^{-1}(\epsilon +1)\\ \tan^{-1}(-\epsilon+1)- \frac{\pi}{4}<x-\frac{\pi}{4}<\tan^{-1}(\epsilon +1)-\frac{\pi}{4}$$
I don't know if with this I can give an adequate value for $\delta$. Any advice on how to solve it would be very helpful, thank you.
 A: Here is a more explicit way to do it, without using arctan of epsilon.
Since $\tan(x)$ has an asymptote at $x=\frac{\pi}{2}$, we should stipulate at the outset a maximum value of delta which is less than the distance from the point we are working at and the asymptote (this distance is $\frac{\pi}{4}$), for instance $\delta<\frac{\pi}{8}$. So in what follows we will consider only $x \in (\frac{\pi}{4}-\frac{\pi}{8},\frac{\pi}{4}+\frac{\pi}{8})=(\frac{\pi}{8},\frac{3\pi}{8})$. Now, if we suppose that $\epsilon$ is arbitrary and $0<|x-\frac{\pi}{4}|<\delta$ holds, we have
$$ |\tan(x)-1| = \left|\frac{\sin(x)}{\cos(x)}-\frac{\sin \left(\frac{\pi}{4} \right)}{\cos \left(\frac{\pi}{4} \right)} \right| = \left|\frac{\sin(x)\cos \left(\frac{\pi}{4} \right)-\sin \left(\frac{\pi}{4} \right) \cos(x)}{\cos(x)\cos \left(\frac{\pi}{4} \right)} \right|=\frac{|\sin\left(x-\frac{\pi}{4} \right)|}{|\cos(x)|\cos \left(\frac{\pi}{4} \right)}$$
Now in the numerator we can use the inequality $|\sin \left(x-\frac{\pi}{4} \right)| \leq |x-\frac{\pi}{4}|$ while to bound the denominator we notice that cosine is decreasing on the interval $(\frac{\pi}{8},\frac{3\pi}{8})$ and so $\frac{1}{|\cos(x)|} <\frac{1}{\cos (\frac{3\pi}{8})}$. These two inequalities allow us to write
$$ \frac{|\sin\left(x-\frac{\pi}{4} \right)|}{|\cos(x)|\cos \left(\frac{\pi}{4} \right)} < \frac{|x-\frac{\pi}{4}|}{\cos \left(\frac{3\pi}{8} \right) \cos \left(\frac{\pi}{4} \right)}<\frac{\delta}{\cos \left(\frac{3\pi}{8} \right) \cos \left(\frac{\pi}{4} \right)} \leq \epsilon $$
If we chose $\delta = \min \{\frac{\pi}{8}, \cos \left(\frac{3\pi}{8} \right)\cos \left(\frac{\pi}{4} \right) \epsilon \}$.
A: Alternative approach:
$\underline{\textbf{Preliminary Results }}$
Result-1
$\displaystyle \lim_{x \to 0} ~\tan(x) = 0.$
Proof: 
Attempting to stay within the spirit of the problem, 
since the sine function is continuous, I will assume that :

*

*$\displaystyle \lim_{x \to 0} \sin(x) = \sin(0) = 0.$
Edit
If you are given that $~ \displaystyle \lim_{x \to 0}\frac{\sin(x)}{x} = 1, ~$ 
then the above assumption is a consequence of that.
For $~\epsilon > 0,~$ set $~ \displaystyle \epsilon_1 = \frac{\epsilon}{\sqrt{2}}.$ 
$\exists ~\delta_1 > 0~$ such that
$~|x| \leq \delta_1 \implies |\sin(x)| < \epsilon_1$. 
Also, $~\displaystyle |x| \leq (\pi/4) \implies \frac{1}{\sqrt{2}} \leq \cos(x) \leq 1.$
For $\epsilon > 0,~$ set $~\delta = \min(\delta_1, \pi/4).$ 
Then $~\displaystyle |x| \leq \delta \implies$

*

*$\displaystyle |\sin(x)| < \frac{\epsilon}{\sqrt{2}}$


*$\displaystyle \frac{1}{\sqrt{2}} \leq |\cos(x)| \leq 1 \implies 1 \leq \frac{1}{\cos(x)} \leq \sqrt{2}.$
Therefore, $~\displaystyle |x| \leq \delta = \min(\delta_1, \pi/4) \implies $
$\displaystyle |\tan(x)| = \left|\frac{\sin(x)}{\cos(x)}\right| < \frac{\epsilon}{\sqrt{2}} \times \sqrt{2} = \epsilon.$
Result-2
$\displaystyle \tan(a + b) = \frac{\tan(a) + \tan(b)}{1 - \tan(a)\tan(b)}.$
Proof:
See wikipedia trig angle sum identities.

$\underline{\textbf{Main Problem}}$
Given $~\epsilon > 0,~$ set $\epsilon_2 = \min[(1/2), \epsilon/5].$
Invoke Result-1. 
Then, there exists a $~\delta_2 ~$ such that 
$-\delta_2 < y < \delta_2 \implies |\tan(y)| < \epsilon_2.$
Suppose $-\delta_2 < [x - \pi/4] < \delta_2.$ 
Set $y = [x - \pi/4] \implies$

*

*$x = (y + \pi/4) \implies \tan(x) = \tan(y + \pi/4)$

*$-\delta_2 < y < \delta_2 \implies -\epsilon_2 < \tan(y) < \epsilon_2.$
Invoke Result-2.
Then
$$\tan(x) = \tan(y + \pi/4) = \frac{\tan(y) + 1}{1 - \tan(y)}.\tag1 $$
In (1) above, let $N$ denote the numerator and let $D$ denote the denominator.
Then $1 - \epsilon_2 < N < 1 + \epsilon_2$ 
and $1 - \epsilon_2 < D < 1 + \epsilon_2.$
Therefore
$$\frac{1 - \epsilon_2}{1 + \epsilon_2} < \frac{\tan(y) + 1}{1 - \tan(y)} < \frac{1 + \epsilon_2}{1 - \epsilon_2}. \tag2 $$

However, because $~\epsilon_2 = \min[(1/2), \epsilon/5],~$
you have that

*

*$\displaystyle 1 - \epsilon < 1 - 2\epsilon_2 < 1 - \frac{2\epsilon_2}{1 + \epsilon_2} = \frac{1 - \epsilon_2}{1 + \epsilon_2}.$


*$\displaystyle \frac{1 + \epsilon_2}{1 - \epsilon_2} = 1 + \frac{2\epsilon_2}{1 - \epsilon_2} \leq 
1 + \frac{2\epsilon_2}{(1/2)} = 1 + 4\epsilon_2 < 1 + \epsilon.$
Therefore $\tan(x) = \tan(y + \pi/4)$ and
$$1 - \epsilon < \tan(y + \pi/4) < 1 + \epsilon.$$
