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.

Replace all $\cot x = \frac{\cos x}{\sin x}$ and expand straightforwardly as follows,
$$RHS = \frac{\frac{\cos \frac A2}{\sin \frac A2}+\frac{\cos \frac B2}{\sin \frac B2}+\frac{\cos \frac c2}{\sin \frac C2}}
{\frac{\cos A}{\sin A}+\frac{\cos B}{\sin B}+\frac{\cos C}{\sin C}}$$
$$= \frac{\cos \frac A2\sin \frac B2\sin \frac C2+\cos \frac B2\sin \frac C2\sin \frac A2+\cos \frac C2\sin \frac A2\sin \frac B2}
{\cos A\sin B\sin C+\cos B\sin C\sin A+\cos C\sin A\sin B}
\cdot 8 \cos \frac A2\cos\frac B2\cos \frac C2$$
$$= \frac{(1+\cos A)\sin B\sin C+(1+\cos B)\sin C\sin A+(1+\cos C)\sin A\sin B}
{\cos A\sin B\sin C+\cos B\sin C\sin A+\cos C\sin A\sin B}
$$
$$= 1+ \frac{\sin B\sin C+\sin C\sin A+\sin A\sin B}
{\cos A\sin B\sin C+\cos B\sin C\sin A+\cos C\sin A\sin B}
$$
$$= 1+ \frac{2\sin B\sin C+2\sin C\sin A+2\sin A\sin B}
{\sin A\sin (B+C)+\sin B\sin (C+A)+\sin C\sin (A+B)}
$$
$$= 1+ \frac{2\sin B\sin C+2\sin C\sin A+2\sin A\sin B}
{\sin^2 A+\sin^2 B+\sin^2 C}
$$
$$= 1+ \frac{2bc+2ca+2ab}
{a^2 +b^2 +c^2 } = \frac{(a+b+c)^2}{a^2+b^2+c^2}=LHS$$
