How prove this $\cos{x}+\cos{y}+\cos{z}=1$ Question:

let $x,y,z\in R$ and such $x+y+z=\pi$,and such
  $$\tan{\dfrac{y+z-x}{4}}+\tan{\dfrac{x+z-y}{4}}+\tan{\dfrac{x+y-z}{4}}=1$$
  show that
  $$\cos{x}+\cos{y}+\cos{z}=1$$

My idea: let $$x+y-z=a,x+z-y=b,y+z-x=c$$
then
$$a+b+c=\pi$$
and
$$\tan{\dfrac{a}{4}}+\tan{\dfrac{b}{4}}+\tan{\dfrac{c}{4}}=1$$
we only prove
$$\cos{\dfrac{b+c}{2}}+\cos{\dfrac{a+c}{2}}+\cos{\dfrac{a+b}{2}}=1$$
Use
$$\cos{\dfrac{\pi-x}{2}}=\sin{\dfrac{x}{2}}$$
$$\Longleftrightarrow \sin{\dfrac{a}{2}}+\sin{\dfrac{b}{2}}+\sin{\dfrac{c}{2}}=1$$
let
$$\tan{\dfrac{a}{4}}=A,\tan{\dfrac{b}{4}}=B,\tan{\dfrac{\pi}{4}}=C$$
then
$$A+B+C=1$$
and use $$\sin{2x}=\dfrac{2\tan{x}}{1+\tan^2{x}}$$
so we only prove
$$\dfrac{2A}{1+A^2}+\dfrac{2B}{1+B^2}+\dfrac{2C}{1+C^2}=1$$
other idea:let
$$\dfrac{y+z-x}{4}=a,\dfrac{x+z-y}{4}=b,\dfrac{x+y-z}{4}=c$$
then we have
$$a+b+c=\dfrac{\pi}{4},\tan{a}+\tan{b}+\tan{c}=1$$
we only prove
$$\cos{(2(b+c)}+\cos{2(a+c)}+\cos{2(a+b)}=\sin{(2a)}+\sin{(2b)}+\sin{(2c)}=1$$
then I fell very ugly, can you some can help?
Thank you very much!
 A: 
Looking down at the positive octant , ( arrow tips are coordinate axes).
$x+y+z=\pi$  ( the cyan colored plane. )
$\cos{x}+\cos{y}+\cos{z}=1$ , ( the pink colored area. )
$\tan{\dfrac{y+z-x}{4}}+\tan{\dfrac{x+z-y}{4}}+\tan{\dfrac{x+y-z}{4}}=1$ , (the light gray colored area. )
I can see three solutions where the gray central area, surrounded by pink triangle meets the cyan plane. 
Just a picture!
A: 
An interesting view of the surface $ \cos x + \cos y + \cos z = 1 $ Three lines ( in red ) are added for clarity. We can see that even along the plane $ x + y + z = \pi $ we must add a network of lines to encompass the simple periodicity condition.
A: Now,I have solution this problem:let $x,y,z\in R$ and such $x+y+z=\pi$,and
$$\tan{\dfrac{y+z-x}{4}}+\tan{\dfrac{x+z-y}{4}}+\tan{\dfrac{x+y-z}{4}}=1$$
show that
$$\cos{x}+\cos{y}+\cos{z}=1$$
$$\dfrac{y+z-x}{4}=a,\dfrac{x+z-y}{4}=b,\dfrac{x+y-z}{4}=c$$
we have
$$a+b+c=\dfrac{\pi}{4},\tan{a}+\tan{b}+\tan{c}=1$$
we only prove following
$$\cos{(2(b+c)}+\cos{2(a+c)}+\cos{2(a+b)}=\sin{(2a)}+\sin{(2b)}+\sin{(2c)}=1$$
since $$\tan{a}+\tan{b}+\tan{(\dfrac{\pi}{4}-a-b)}=1\Longrightarrow
\tan{a}+\tan{b}+\dfrac{1-\tan{(a+b)}}{1+\tan{(a+b)}}=1$$
$$\tan{a}+\tan{b}=\dfrac{2\tan{(a+b)}}{1+\tan{(a+b)}}$$
$$\Longrightarrow 1=\tan{a}+\tan{b}-\tan{a}\tan{b}$$
then
$$\sin{(a+b)}=\cos{(a-b)}$$
other hand we have 
\begin{align*}\sin{(2x)}+\sin{(2y)}+\sin{(2z)}&=2\sin{(x+y)}\cos{(x-y)}+1-2\sin^2{(x+y)}\\
&=2\sin{(x+y)}[\cos{(x-y)}-\sin{(x+y)}]+1\\
&=1
\end{align*}
