How does $\pi - \arctan(\frac{8}{x}) - \arctan(\frac{13}{20-x}) = \arctan(\frac{x}{8}) + \arctan(\frac{20-x}{13})$? How does $$\pi - \arctan(\frac{8}{x}) - \arctan(\frac{13}{20-x}) = \arctan(\frac{x}{8}) + \arctan(\frac{20-x}{13})$$
 A: Use the fact that for $t\not=0$,
$\displaystyle \arctan(t)+\arctan(1/t)=\mbox{sgn}(t)\cdot\frac{\pi}{2}$. 
See here for the details: $\arctan (x) + \arctan(1/x) = \frac{\pi}{2}$
Then for $x\not=0$ and $x\not=20$,
$$\arctan(\frac{8}{x})+\arctan(\frac{13}{20-x})+\arctan(\frac{x}{8}) + \arctan(\frac{20-x}{13})\\
=\mbox{sgn}(x)\cdot\frac{\pi}{2}+ \mbox{sgn}(20-x)\cdot\frac{\pi}{2}=\begin{cases}
\pi\quad \mbox{if $0<x<20$,}\\
0 \quad \mbox{if $x<0$ or $x>20$.}\\
\end{cases}$$
A: There's a trigonometric identity for $\arctan$: $\arctan(\alpha) \pm \arctan(\beta) = \arctan(\frac{\alpha \pm \beta}{1 \mp \alpha\beta})$.
In our case:
$$
\pi-\arctan(\frac{8}{x})-\arctan(\frac{13}{20-x})=\arctan(\frac{x}{8})+\arctan(\frac{20-x}{13})\\
\pi-\arctan(\frac{13}{20-x})-\arctan(\frac{20-x}{13})=\arctan(\frac{8}{x})+\arctan(\frac{x}{8})\\
\pi-(\arctan(\frac{13}{20-x})+\arctan(\frac{20-x}{13}))=\arctan(\frac{8}{x})+\arctan(\frac{x}{8})\\
\pi-\arctan(\frac{\frac{13}{20-x}+\frac{20-x}{13}}{1-(\frac{13}{20-x}\cdot \frac{20-x}{13})})=\arctan(\frac{\frac{8}{x}+\frac{x}{8}}{1-(\frac{8}{x}\cdot \frac{x}{8})})\\
\pi-\arctan(\frac{13^2+(20-x)^2}{0})=\arctan(\frac{8^2+x^2}{0})\\
$$
Note that the angle for $lim_{x\rightarrow \infty} \arctan(x) =\frac{\pi}{2}$ (in case $x<0$ we get $-\frac{\pi}{2})$.
hence, we get: $\pi - \frac{\pi}{2}=\frac{\pi}{2}$.
A: $$\frac{\pi}{2} - \arctan\left(\frac{8}{x}\right) +  \frac{\pi}{2} - \arctan\left(\frac{13}{20-x}\right) = \arctan\left(\frac{x}{8}\right) + \arctan\left(\frac{20-x}{13}\right)$$
$$\mbox{arccot} \left(\frac{8}{x}\right) +\mbox{arccot}\left(\frac{13}{20-x}\right)=\arctan\left(\frac{x}{8}\right) + \arctan\left(\frac{20-x}{13}\right)$$
$$\color{red}{\boxed{ \color{black}{\mbox{arccot} \left(\frac{1}{t}\right) =\arctan t}}} $$ 
$\color{red}{\text{This is valid only when}\qquad   t \gt 0}$
