# Cubic Equation for the Sides of a Triangle

Here's a popular fact that is hard to locate on the web:

Let, $a,\,b,\,c,\,p,\,r,\,R$ be the sides, the semiperimeter, the inradius, and the circumradius of a triangle. Then $a,\,b,\,c$ are the roots of the cubic equation

$x^{3}-2px^{2}+(p^{2}+r^{2}+4rR)x-4prR=0.$

### Proof

The basic idea is to employ the relations between the roots and the coefficients of an equation, following Viète's theorem.

By definition, $2p=a+b+c$ which verifies the quadratic coefficient.

For the free coefficient, note that $S=pr,$ where $S$ is the area of the triangle, which also satisfies $abc=4SR.$

Thus we only have to show that $ab+bc+ca=p^{2}+r^{2}+4rR.$ I shall reduce that to a trigonometric identity. Let $\alpha,\,\beta,\,\gamma$ denote the angles of the triangle.

From the Law of Sines,

$ab+bc+ca=4R^{2}(\sin\alpha\sin\beta+\sin\beta\sin\gamma+\sin\gamma\sin\alpha ).$

Also,

$p=\displaystyle 4R\cos\frac{\alpha}{2}\cos\frac{\beta}{2}\cos\frac{\gamma}{2}$

and

$r=\displaystyle 4R\sin\frac{\alpha}{2}\sin\frac{\beta}{2}\sin\frac{\gamma}{2}$

It remains to show that $X=Y$ where

$\displaystyle X=\sin\alpha\sin\beta+\sin\beta\sin\gamma+\sin\gamma\sin\alpha$

and

\displaystyle\begin{align} Y&=4(\cos^{2}\frac{\alpha}{2}\cos^{2}\frac{\beta}{2}\cos^{2}\frac{\gamma}{2}\\ &+\sin^{2}\frac{\alpha}{2}\sin^{2}\frac{\beta}{2}\sin^{2}\frac{\gamma}{2}\\ &+\sin\frac{\alpha}{2}\sin\frac{\beta}{2}\sin\frac{\gamma}{2}). \end{align}

We'll need two identities:

\displaystyle\begin{align} \cos\frac{\alpha}{2}\cos\frac{\beta}{2}\cos\frac{\gamma}{2}&=\sin\alpha+\sin\beta+\sin\gamma,\\ \sin\frac{\alpha}{2}\sin\frac{\beta}{2}\sin\frac{\gamma}{2}&=\cos\alpha+\cos\beta+\cos\gamma-1. \end{align}

The substitution reduces $X=Y$ to

\begin{align} \cos (\alpha +\beta )&+\cos (\beta +\gamma )+\cos (\gamma +\alpha )\\ &+\cos\alpha+\cos\beta+\cos\gamma=0 \end{align}

which is obvious.