Asymptotic formula for the summatory totient function (source code)

= Asymptotic formula for the summatory totient function
{title2=$\sum_{n\le x}\varphi(n)\sim3x^2/\pi^2$}

A smoothed form of the <summatory totient function> satisfies
$$
\sum_{n\le x}\varphi(n)(x-n)=\frac{x^3}{\pi^2}+O(x^{5/2}).
$$
Use the <Dirichlet series> $\zeta(s-1)/\zeta(s)$ and the kernel $x^s/[s(s+1)]$ to write the left side as a vertical <contour integral>. Move the line from real part greater than two to $3/2$. The only crossed pole is at two, with residue $x^3/(6\zeta(2))=x^3/\pi^2$; the remaining vertical integral is $O(x^{5/2})$ by the standard zeta bounds in the half-strip. If $A(x)=\sum_{n\le x}\varphi(n)$ and $S(x)=\int_0^xA(t)\,dt$, positivity of the summands makes $A$ nondecreasing. The backward and forward difference quotients of $S$ bound $A(x)$. Insert $S(x)\sim x^3/\pi^2$, then let the relative difference-quotient step tend to zero, proving the displayed asymptotic. This <monotone integral Tauberian lemma> justifies the passage from a smoothed estimate to an unsmoothed one.