<s>[INST] Prove $\frac{(a+b+c)^2}{(a^2+b^2+c^2)}=\frac{\cot(A/2)+\cot(B/2)+\cot(C/2)}{\cot(A)+\cot(B)+\cot(C)}$ $\frac{(a+b+c)^2}{(a^2+b^2+c^2)}=\frac{\cot(A/2)+\cot(B/2)+\cot(C/2)}{\cot(A)+\cot(B)+\cot(C)}$
I need to solve this trigonometric identity for a trianlge. 
I'm not allowed to use the formula $a+b+c=s$ where 's' is perimeter.
My Try
Using sine rule I was able to simplify,
\begin{align}\text{L. H. S.}& =\frac{(\sin A+\sin B+ \sin C)^2}{\sin^2A+\sin^2B+\sin^2C} \\
&=\frac{4\cos^2\dfrac C2\Bigl(\dfrac{\cos(A-B)}{2}+\sin\frac C2\Bigr)^2}{\sin^2A+\sin^2B+\sin^2C}
\end{align}
I'm unable to simplify further, Please give me hint. Thanks in advance.
 [/INST] For a triangle ABCz, we have denominator of LHS as
$$D=(a^2+b^2+c^2)=[(b^2+c^2-a^2)+(c^2+a^2-b^2)+(a^2+b^2-c^2)]$$ $$=[2bc \cos A+2ca \cos B+ 2ab \cos C]=2abc[\cos A/a+\cos B/b+\cos C/c]=\frac{abc}{R}[\cot A+\cot B+\cot C].~~~~(1)$$ In the last step we have used $ a/\sin A=b/\sin B=c/\sin C=2R.$
Next take the numerator  of  RHS as
$$N=(a+b+c)^2=4R^2[\sin A+ \sin B+\sin C]^2=64R^2[\cos^2(A/2) \cos^2(B/2) \cos^2(C/2)]$$
$$\implies N=\frac{16R^3 (\sin A \sin B \sin C) (64R^2[\cos^2(A/2) \cos^2(B/2)\cos^2(C/2)}{16R^3 (\sin A \sin B \sin C)}$$
$$\implies \frac{4(2abc)}{R}\frac{\cos^2(A/2) \cos^2(B/2)\cos^2(C/2)}{8(\sin(A/2) \cos(A/2)(\sin (B/2) \cos (B/2)(\sin (A/2) \cos (A/2)}$$
$$\implies N=\frac{abc}{R}[\cot(A/2) \cot(B/2) \cot(C/2)]=\frac{abc}{R}[\cot(A/2)+\cot(B/2)+\cot(C/2)]~~~~(2)$$
From (1) and (2) the required result follows.
Lastly we have used $$\cot(A/2)\cot(B/2)\cot(C/2)=\cot(A/2)+\cot(B/2)+\cot(C/2)]$$
in the triangle ABC.
</s>