Suppose that $H,C_G(H) \leq G$ where $G=HC_G(H)$. I want to show that $H\cap C_G(H) \leq Z(G).$(H being a subgroup, $C_G$ the centraliser of H and Z the centre of the group.)
My attempt :
$H,C_G(H) \leq G, \Rightarrow H \cap C_G(H) \leq G$ and that $|HC_G(H)|=\tfrac{|H||C_G(H)|}{|H\cap C_G(H)|}$
However
$|HC_G(H)|=|C_G(H)| \Rightarrow |H\cap C_G(H)|=|H|$.
Next consider Z(G)
$|Z(G)|=|G|-\sum|K(g)|$
But looking at K(g) and G
$K(g)=\{y \in G | y=x^{-1}gx , x \in G\}$
$G=\{hg|g=h^{-1}gh\}$ which means that for all g, |K(g)|=0.
and so we are left with $|Z|=|G|$.
Now we know that $|H|$ divides $|G|$, which means that $|H\cap C_G(H)|$ divides $|Z(G)|$ and so by lagrange's theorem $|H\cap C_G(H)|\leq |Z(G)|$