<s>[INST] Proving Gerretsen's Inequality Today in class we were shown Gerretsen's inequality: 
$$16Rr-5r^2\leq s^2 \leq 4R^2+4Rr+3r^2$$
Where $R$, $r$, and $s$ are the circumradius, in radius, and semiperimeter of a triangle. After some research, I found that this inequality was proven by showing the following:$$IH^2=4R^2+4Rr+3r^2-\frac{1}{4}\left(a+b+c\right)^2$$
$$9IG^2=\frac{1}{4}(a+b+c)^2-16Rr+5r^2$$
Where $IH$ is the distance between the incenter and the orthocenter, $IG$ is the distance between the incenter and the centroid, and $a$, $b$, and $c$ denote the sides of the triangle. How are these two equalities derived? Any help is very much appreciated. 
 [/INST] Your question is very interesting. Let me give my idea.
Firstly, we will compute $IG$. Note that we have $$\vec{GA} + \vec{GB} + \vec{GC} = \vec{0}.$$ Then, $$3\vec{IG} = \vec{IA} + \vec{IB} + \vec{IC}.$$
$$9IG^2 = \sum_{\circlearrowleft} IA^2 + 2\sum_{\circlearrowleft}\vec{IA}\vec{IB} $$
Recall that $IA^2 = r^2 + (s-a)^2$ (I don't go to this detail, but you can see it easily), and $2\vec{IA}\vec{IB} = IA^2 + IB^2 - AB^2$.
Then, one has: \begin{eqnarray}9IG^2 &=& 3\sum_{\circlearrowleft} IA^2 - \sum_{\circlearrowleft} a^2 = 9r^2 + 3[(s-a)^2 + (s-b)^2 + (s-c)^2] - (a^2+b^2+c^2) \\ &=& 9r^2 + 5s^2 - 4(ab+bc+ca). \ \ \ (1)\end{eqnarray}
Now, use the Heron's formula, we have $$S = sr = \sqrt{s(s-a)(s-b)(s-c)}$$.
So, $$sr^2 = s^3 - s^2(a+b+c) + s(ab+bc+ca) - abc = - s^3 + s(ab+bc+ca) -abc.$$
Note that $abc= 4RS = 4Rrs$. We get $$sr^2 = -s^3 + s(ab+bc+ca) -4Rrs$$ or $$ab+bc+ca = r^2+s^2+4Rr\ \ \ \ (2)$$
Substitute (2) to (1), we get $$9IG^2 = 9r^2 + 5s^2 - 4(r^2 + s^2 + 4Rr)  = 5r^2 + s^2 - 16Rr.$$
EDIT: Let me compute the $IH$. I use two lemmas.
Lemma 1 One has $$a\vec{IA} + b\vec{IB} + c\vec{IC} = \vec{0}.$$
Lemma 2 One has $$HA^2 = 4R^2 - a^2; HB^2 = 4R^2 - b^2; HC^2 = 4R^2-c^2.$$
I don't give the detail prove of two above lemmas, but you can see it like this: 


*

*lemma 1: the bisector of angle A divides the side $BC$ by ratio $b:c$, and so on with two other bisectors.

*lemma 2: it is easy to use the Euler line, which implies that $HA$ is two times of the distance from the circumcenter to the side $BC$.


Using lemma 1, we have $$2s \vec{HI} = a\vec{HA} + b\vec{HB} + c\vec{HC}.$$
Then, \begin{eqnarray}4s^2 HI^2 &=& \sum_{\circlearrowleft} a^2HA^2 + 2\sum_{\circlearrowleft} ab \vec{HA}\vec{HB}\\
&=& \sum_{\circlearrowleft} a^2(4R^2 - a^2) + \sum_{\circlearrowleft} ab (HA^2 + HB^2 -AB^2)\ \ \ \ \ \mbox{(using the lemma 2)}\\
&=& 4R^2(a^2+b^2+c^2) - (a^4+b^4+c^4) + \sum_{\circlearrowleft} ab (8R^2 - a^2-b^2-c^2) \\
&=& 4R^2(a^2+b^2+c^2 + 2ab +2bc +2ca) - (a^4+b^4+c^4) - (ab+bc+ca)(a^2+b^2+c^2) \\
&=& 16R^2s^2 - (a^4+b^4+c^4) - (ab+bc+ca)(a^2+b^2+c^2).\end{eqnarray}
I leave the part $(a^4+b^4+c^4) + (ab+bc+ca)(a^2+b^2+c^2)$ for you, because of the simple but long computation.
I give the answer, $$4s^2IH^2 = 16R^2s^2 + 16Rrs^2 + 12r^2s^2 - 4s^4.$$
Then, you get the equality.
</s>