Help to find the domain to this function $$
\sqrt{\log_\frac{1}{2}\left(\arctan\left(\frac{x-\pi}{x-4}\right)\right)}
$$
Please, could someone show me the steps to find the domain of this function?
It's the sixth time that I try to solve it, and I'm going to burn everything...

Here is a detailed outline. There is an obvious problem at $x=4$. But things also go bad if $\frac{x-\pi}{x-4}\le 0$, for then the $\arctan$ is $\le 0$, so the log does not exist.  As a first step to finding the bad places, solve the inequality
$$\frac{x-\pi}{x-4} \le 0.$$
The only places where this can change sign are $x=\pi$ and $x=4$.  Evaluate $\frac{x-\pi}{x-4}$ at three points, one less than $\pi$, one between $\pi$ and $4$, and one bigger than $\pi$.
Now we need to deal with the square root part.  What is inside the square root must be $\ge 0$.  The $1/2$ as a base for the logarithm is a nuisance. It may make things easier to note that $\log_{1/2} u =-\log_2 u$. So we want the log to the base $2$ to be $\le 0$.  That means that we want the $\arctan$ to be positive but $\le 1$.  So we want $0<\frac{x-\pi}{x-4}\le \tan(1)$.   
