Assuming $p_k > 0$, $1 \leq k \leq n$ and $p_1 + p_2 + \cdots + p_n = 1$, show that:
$$\sum_{k=1}^n \left( p_k + \frac{1}{p_k} \right)^2 \geq n^3 + 2n + 1/n$$
and determine necessary and sufficient conditions for equality to hold.
This comes from Michael Steele's 'Cauchy-Schwarz Master Class' book, exercise 1.6. I was able to solve the first part using Cauchy-Schwarz multiple times:
$$p_1 + \cdots + p_n = 1 \leq \sqrt{n} \left( \sum_{k=1}^n p_k ^2 \right)^{1/2}$$
$$\frac{1}{p_1} + \cdots + \frac{1}{p_n} \leq \sqrt{n} \left( \sum_{k=1}^n \frac{1}{p_k ^2} \right)^{1/2}$$
$$n \leq \left( \sum_{k=1}^n \frac{1}{p_k} \right)^{1/2}$$
using these 3 inequalities leads to the inequality.
However for the second part, I'm not sure how Cauchy Schwarz (or some other technique, however this is the 1st chapter in the book) could be used to show instead:
$$\sum_{k=1}^n \left( p_k + \frac{1}{p_k} \right)^2 = n^3 + 2n + 1/n$$
I was aware (as well an answer here) that the above equality holds iff $p_1 = ... = p_n$ but am not sure how to prove that the equality implies that $p_1, p_2, \cdots = 1/n$. Any hints would be greatly helpful.
By C-S $$\sum_{k=1}^n\left(p_k+\frac{1}{p_k}\right)^2=\frac{1}{n}\sum_{k=1}^n1^2\sum_{k=1}^n\left(p_k+\frac{1}{p_k}\right)^2\geq\frac{1}{n}\left(\sum_{k=1}^n\left(p_k+\frac{1}{p_k}\right)\right)^2=$$ $$=\frac{1}{n}\left(1+\sum_{k=1}^np_k\sum_{k=1}^n\frac{1}{p_k}\right)^2\geq\frac{1}{n}(1+n^2)^2=n^3+2n+\frac{1}{n}.$$ The equality occurs, when $$(\sqrt{p_1},\sqrt{p_2},...,\sqrt{p_n})||\left(\frac{1}{\sqrt{p_1}},\frac{1}{\sqrt{p_2}},...,\frac{1}{\sqrt{p_n}}\right)$$ or $$(p_1,p_2,...,p_n)||(1,1,...1),$$
which with $p_1+p_2+...+p_n=1$ gives $p_1=p_2=...=p_n=\frac{1}{n}.$
By the way, our inequality is obviously true by Jensen.