<s>[INST] Show $\cos\frac\gamma2=\sqrt{\frac{p(p-c)}{ab}}$ 
Show that the equality $$\cos\dfrac{\gamma}{2}=\sqrt{\dfrac{p(p-c)}{ab}}$$ holds for a $\triangle ABC$ with sides $AB=c,BC=a, AC=b$, semi-perimeter $p$ and $\measuredangle ACB=\gamma$.


I have just proved that $$l_c=\dfrac{2ab\cos\dfrac{\gamma}{2}}{a+b}$$
Is this a well known formula for angle bisectors?
Can we use it somehow?
Thank you in advance!
 [/INST] Form half-angle trig-identity
$$\cos\gamma=2\cos^2\frac{\gamma}{2}-1\iff \cos \frac{\gamma}{2}=\sqrt{\frac{1+\cos\gamma}{2}}$$
Substituting the value from cosine formula: $\cos \gamma=\frac{a^2+b^2-c^2}{2ab}$
$$\cos \frac{\gamma}{2}=\sqrt{\frac{1+\frac{a^2+b^2-c^2}{2ab}}{2}}$$
$$=\sqrt{\frac{(a+b)^2-c^2}{4ab}}$$
$$=\sqrt{\frac{(a+b+c)(a+b-c)}{4ab}}$$
$$=\sqrt{\frac{\left(\frac{a+b+c}{2}\right)\left(\frac{a+b+c}{2}-c\right)}{ab}}$$
$$=\sqrt{\frac{p(p-c)}{ab}}$$
</s>