If $x \geq 2$ prove that $\sum_{ n \leq x} \frac{1}{\phi(n)} = \mathcal{O}(\log(x))$.
This problem is from Apostol's analytic number theory book in the chapter 3 exercises. I am stuck on this problem as I am simply not sure how to do it.
I know from the previous chapters that the following relation exists
$$\phi(n) = \sum_{d \mid n}\mu(d) \frac{n}{d}$$
So I have $\sum_{n \leq x} \phi(n) = \sum_{n \leq x} \sum_{d \mid n}\mu(d) \frac{n}{d}$, where $\mu(d)$ is the Möbius function.
Can anyone offer some information on how to proceed or use this relation?
It is actually simpler to prove first that $\sum_{n\leq x}\frac{n}{\varphi(n)}=O(x)$ then apply summation by parts.
$$ \sum_{n\leq x}\frac{n}{\varphi(n)} = \sum_{n\leq x}\prod_{p\mid n}\left(1-\frac{1}{p}\right)^{-1}\leq \frac{\pi^2}{6}\sum_{n\leq x}\frac{\sigma(n)}{n} $$ but we have $$ \sum_{n\leq x}\frac{\sigma(n)}{n} = \sum_{n\leq x}\sum_{d\mid n}\frac{1}{d} = \sum_{d\leq x}\frac{1}{d}\left\lfloor\frac{x}{d}\right\rfloor = O(x)$$
as mentioned in the comments. If we apply summation by parts,
$$ \sum_{n\leq x}\frac{1}{\varphi(n)} = \sum_{n\leq x}\frac{1}{n}\cdot\frac{n}{\varphi(n)} = O\left(\sum_{n\leq x}\frac{1}{n}\right) = O(\log n)$$ easily follows.