How are asymptotic estimates found in analytic number theory?

55 Views Asked by At

I have begun to study analytic number theory using the book Analytic Number Theory: Exploring the Anatomy of Integers by Jean-Marie De Koninck & Florian Luca (I'm only in chapter 2). There are a lot of asymptotic expansions talked about within the book, for example Stirling's formula $$n!\sim n^ne^{-n}\sqrt{2\pi n}$$ the prime number theorem$$\pi(x) \sim \frac {x}{\log x}$$ and $$\sum_{p\le x} \frac 1p\sim \log\log x$$ my question is, how are results like these derived? And what methods can be used to prove them?