Why is the free energy minimized by the Boltzmann distribution?

Can someone show me, without glossing over anything, why $F = E - TS$ is minimized when $p_i = e^{-U_i/k_bT}/\sum_ie^{-U_i/k_bT}$? I understand it conceptually, but am having difficulty showing it formally.

-
Where are you having trouble? –  Michael Brown Feb 22 '13 at 1:15
I know that $E-TS=\sum_iU_ip_i+k_BT*\sum_ip_iln(p_i)$ I take the derivative of F with respect to $p_i$, yielding $\sum_iU_i+k_BT*\sum_i(1/p_i)$, and substitute the Boltzmann distribution for $p_i$ expecting to get 0, but I'm having trouble with the algebra. Is this a reasonable approach? –  user21243 Feb 22 '13 at 1:19
@user21243 - It would be a good idea to post what you've tried along with your question. –  Kitchi Feb 22 '13 at 5:24