What is the proof that for an integer $x$, $\phi(x^2) = x \phi(x)$, where $\phi$ is Euler's totient function?
I know about $\phi(ab) = \phi(a) \phi(b)$ when $\gcd(a,b) = 1$, but for $x = a = b$, the $\gcd(a,b) = \gcd(x,x) = x \neq 1$, so how do I show that $\phi(x^2) = x \phi(x)$?
How many numbers between $0$ and $x$ are coprime with $x^2$? How many numbers between $x$ and $2x$ are coprime with $x^2$? Between $2x$ and $3x$? Between ...
Adding up all of these intervals, how many numbers between $0$ and $x^2$ are coprime with $x^2$?