Smoothing Inequalities Can anyone explain to me how the "smoothing argument for inequalities" works?
I know that basically it can be used to prove an inequality $f(a_1,a_2,\cdots,a_n)\geq C$ subject to the constraint $a_1+a_2+\cdots+a_n=k$ (for constants $C,k$) if equality holds when all $a_i$ are equal. I've heard that the basic idea is to push the $a_i$ closer together, showing that this is pushing $f(a_1,a_2,\cdots,a_n)$ to an extrema. 
After doing some research, I saw that this can be rigorously defined by showing inequalities of the form $f(a_1,a_2,\cdots,a_n)\geq f(\frac{k}{n},x_1+x_2-\frac{k}{n},\cdots,x_n)$, but I don't really see a pattern here (why do you replace $a_1$ with $\frac{k}{n}$, $a_2$ with $x_1+x_2-\frac{k}{n}$, etc.) Can someone explain this?
Finally, could someone show me how to apply this to an actual inequality problem? For example, how would one solve the following inequality using smoothing (yes, I am aware that there is a quite simple solution using substitutions and AM-GM)?
Let $a_1,\cdots a_n$ be real numbers in the interval $(0,\frac{\pi}{2})$ such that $\sum_{i=0}^n \tan(a_i-\frac{\pi}{4})\geq n-1$. Prove that $\prod_{i=0}^n\tan(a_i)\geq n^{n+1}$ 
 A: The general idea is that,once you know that a  min of some function F exists,it can only occur when all the variables are equal,by showing that if they are not, then a small change in one or two of them will lower the value of F. For the example you give, first some simplification: Let $b_i= \tan {(a_i- \pi /4)}$ .Then $ -1 < b_i < 1$ and $\tan a_i = (1+b_i)/(1-b_i)$. Now the logarithm of the product in the example is $$F= \sum ^n_{i=o} \log [(1+b_i)/(1-b_i)].$$  Let us try to minimize this, subject to $$n-1 \le S= \sum ^n_{i=0} b_i$$  and   each $|b_i| < 1  $..... Observe that the second derivative of $ g(x)= \log [(1+x)/(1-x)]$ is continuous and positive for $|x| <1$ which implies that $ 2g([x+y]/2) < g(x)+g(y)$ when $-1 < x <y < 1$. THEREFORE if $a_i \ne a_j$ for some $i,j$ then $b_i \ne b_j$ so $$2g([b_i+b_j]/2)<g(b_i)+g(b_j).$$ SO... if we replace each of these unequal $b_i,b_j$ with their average then $F$  is lowered while $S$ is unchanged.So F cannot have a minimum except possibly when all the $a_i$ are equal. In this problem,if we do this replacement repeatedly,choosing the largest and smallest  $b_i$ and $b_j$, they will all converge to the average of the original set of $b_i$'s, which is in the allowable domain and F is continuous, so the minimum (for a given $S$, at least $n-1$ ) occurs there.(Note that for a given $S$ ,it doesn't matter what the original set is.) For some problems,proving that a minimum exists is easier, for example if the domain is closed and bounded in $R^n$ and $F$ is continuous, it will.
