Consider the function $$f(x)={\begin{cases}\arctan({ \frac{\tan{x}}{2} })&{\mbox{ for }}x <\frac{\pi}{2} \\\arctan({ \frac{\tan{x}}{2} })+\pi&{\mbox{ for }}x>\frac{\pi}{2} \\\end{cases}}$$ Show that $f$ can be defined at $\frac{\pi}{2}$, in such a way that the function is continuous at that point. Check if $f$ becomes differentiable in this way at $\frac{\pi}{2}$.
Honestly, I'm completely clueless. Any tips on how to solve this one?
Hint. First you have to find the limits $$\lim_{x\to \pi/2^-}f(x)=\lim_{x\to \pi/2^-}\arctan( \tan(x)/2)=L_-\quad \mbox{and}\quad\lim_{x\to \pi/2^+}f(x)=\lim_{x\to \pi/2^+}\arctan( \tan(x)/2)+\pi=L_+.$$ Then $f$ can be extended by continuity at $\pi/2$ iff $L_+=L_-$.
If this happens, let $f(\pi/2):=L_+=L_-$. Then differentiability follows iff the following limit exists and it is finite $$\lim_{x\to \pi/2}\frac{f(x)-f(\pi/2)}{x-\pi/2}.$$ For the above limit you may use L'Hopital's rule.