<s>[INST] 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.
 [/INST] 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 \}$.
</s>