Loney: If $\alpha$, $\beta$, $\gamma$ are the roots of $x^3 + px^2 + qx + p = 0$, then $\tan^{-1}\alpha + \tan^{-1}\beta + \tan^{-1}\gamma = n\pi$ 
If $\alpha, \beta, \gamma$ are the roots of the equation $$x^3 + px^2 + qx + p = 0,$$
  prove that $$\tan^{-1}\left(\alpha\right) + \tan^{-1}\left(\beta\right) + \tan^{-1}\left(\gamma\right) = n\pi$$ 
  except in one particular case. 

This question is from S. L. Loney's 'Plane Trigonometry' page 327 q13. 
It may be useful to note that this section utilises $$\tan\left(\alpha + \beta + \gamma + ...\right) = \frac{s_1 - s_3 + s_5}{1 - s_2 + s_4 - \cdots}$$
where
$s_1 =$ the sum of the tangents of the separate angles,
$s_2 =$ the sum of the tangents taken two at a time,
$s_3 =$ the sum of the tangents taken three at a time, and so on.
I do not know where I should start with this question. 
 A: Let $S=\tan^{-1}(\alpha) + \tan^{-1}(\beta) + \tan^{-1}(\gamma)$. Then, by your formula,
$$
\tan S = \frac{s_1 - s_3}{1-s_2},
$$
where $s_1 = \alpha+\beta+\gamma$, $s_2 = \alpha\beta + \beta\gamma + \gamma\alpha$ and $s_3 = \alpha\beta\gamma$. Using Vieta's formulas,
$$
s_1 = -p,\,\,\,s_2 = q\,\,\,\text{and }s_3=-p,
$$
therefore $\tan S = 0$, so $S=n\pi$ for some $n\in \mathbb{Z}$. The particular case is where $s_2 = q = 1$ (where you would get $0$ in the denominator), and then $\tan S = \pm \infty$, giving $S=n\pi/2$ for $n\in \mathbb{Z}$ not divisible by $2$.
A: By Vieta’s formula we have
$$-abc=p$$
$$-(a+b+c)=p$$
$$ab+ac+bc=q$$
By using the formula
$$\tan^{-1}u+\tan^{-1}v=\tan^{-1}\frac{u+v}{1-uv}\mod{\pi}\qquad{uv\ne 1}$$, we have
$$
\begin{align}
\tan^{-1}a+ \tan^{-1} b+ \tan^{-1} c
&= \tan^{-1} \frac{a+b}{1-ab}+ \tan^{-1} c \\
&=\tan^{-1}\frac
{\frac{a+b}{1-ab}+c}
{1-\frac{(a+b)c}{1-ab}} \\
&=\tan^{-1}\frac
{\frac{a+b+c-abc}{1-ab}}
{\frac{1-ab-ac-bc}{1-ab}} \\
&=\tan^{-1}\frac{(a+b+c)-abc}{1-(ab+ac+bc)} \\
&=\tan^{-1}\frac{-p+p}{1-q}\\
&=0 \mod{\pi}
\end{align}
$$
We have assumed that $ab\ne 1$ and $q\ne 1$.

It can be shown that
$$ab\ne 1\implies q\ne 1$$
Substitute $ab=1$ into the first three Vieta’s equations,
$$-c=p$$
$$a+b+c=-p\implies a+b=-p-c=0$$
$$1+(a+b)c=q\implies q=1$$
Therefore, $q\ne1$ is the stronger condition, and $q=1$ should be the only exception that the question expects you to give.
A: By Vieta's formulas we have that
$$\alpha + \beta + \gamma=\alpha \beta \gamma=p$$
then use that by Arctangent addition formula
$$\arctan(u) \pm \arctan(v) = \arctan\left(\frac{u \pm v}{1 \mp uv}\right) \pmod \pi \, , \quad u v \ne 1 $$
that is
$$\arctan(\alpha) + \arctan(\beta) = \arctan\left(\frac{\alpha + \beta}{1 - \alpha\beta}\right) $$
$$\arctan(\alpha) + \arctan(\beta)+ \arctan(\gamma) = \arctan\left(\frac{\frac{\alpha + \beta}{1 - \alpha\beta}+\gamma}{1-\frac{\alpha + \beta}{1 - \alpha\beta}\gamma}\right)= $$
$$=\arctan\left(\frac{\alpha + \beta+\gamma-\alpha \beta \gamma}{1-\alpha\beta-\beta\gamma-\gamma\alpha}\right)=0 \pmod \pi$$
except in the particular case
$$1-\alpha\beta-\beta\gamma-\gamma\alpha=0\implies q=\alpha\beta+\beta\gamma+\gamma\alpha=1$$
