Proving inequality $(a+\frac{1}{a})^2 + (b+\frac{1}{b})^2 \geq \frac{25}{2}$ for $a+b=1$ If $a, b$ are positive real numbers and $a+b = 1$, prove that :
$$\left(a+\frac{1}{a}\right)^2 + \left(b+\frac{1}{b}\right)^2 \geq \frac{25}{2}$$
I can see that the value $\frac{25}2$ is attained for $a=b=\frac12$. But I do not know how to show that this is the minimal possible value.
Thank you.

Generalization: 
If $\sum_{1\le r\le n}a_r=S$ where $a_i$s are positive real numbers
$$\sum_{1\le r\le n}\left(a_r+\frac1{a_r}\right)^2=\sum_{1\le r\le n}a_r^2+\sum_{1\le r\le n}a_r^{-2}+2n$$
We know $$\frac{\sum_{1\le r\le n}a_r^m}n> \text{ or } <\left(\frac{\sum_{1\le r\le n}a_r}n\right)^m$$ according as $m$ lies  or does not lie in $(0,1)$
Putting $m=2,$  $$\frac{\sum_{1\le r\le n}a_r^2}n>\left(\frac{\sum_{1\le r\le n}a_r}n\right)^2=\left(\frac Sn\right)^2=\frac{S^2}{n^2}$$
Putting $m=-2,$  $$\frac{\sum_{1\le r\le n}a_r^{-2}}n>\left(\frac{\sum_{1\le r\le n}a_r}n\right)^{-2}=\left(\frac Sn\right)^{-2}=\frac{n^2}{S^2}$$
On simplification, $$\sum_{1\le r\le n}\left(a_r+\frac1{a_r}\right)^2\ge \frac{(n^2+S^2)^2}{S^2n}$$
Here $S=1,n=2$
