Prove the general arithmetic-geometric mean inequality

Wikipedia has the solution to this problem:

http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means#Proof_by_induction_using_basic_calculus

If you would like to attempt it again before looking at the solution, here is a hint:

Attempt a proof by induction (as usual, consisting of the base case, hypothesis, induction step and then a conclusion). The base case is $n=1$. For the hypothesis, choose some non-negative real number $n$. For the induction step, rearrange the inequality and write \begin{equation*} \frac{a_1+...+a_n+a_{n-1}}{n+1}-(a_1...a_na_{n-1})^{\frac{1}{n+1}}\geq 0. \end{equation*} If you consider the quantity on the left as a function $f$, then the problem reduces to analysing the critical points of $f$ using tools from calculus. Is this okay? You said you got stuck half-way so I am happy to go through anything in more detail if you like.