Just learning a bit about big O notation and have come across this exercise.
The notation used is $$\sum_{n\le x}{\ln{n}}=x\ln{x}-x+O(\ln{x})$$ and I am assuming that is equivalent to $$\sum_{n=1}^{x}{\ln{n}}=x\ln{x}-x+O(\ln{x}).$$
I know that $$\int_1^x{\ln{t}}\operatorname{dt}=x\ln{x}-x+1$$ so I feel like I am almost there, just not entirely sure how to make the connection, in particular exactly how the big O comes into this.
Edit: I should make it clear, I can see (I have done a quick sketch) that the summation is an 'overshoot' of the integral, and that the difference between the summation and the integral is bounded by something, but I'm not sure how to get that it is precisely $\ln{x}$.
Also I have no idea what tags to use, feel free to change them.
Hint: Estimate the integral from above and below with step functions of step size 1, then subtract the integrals of the two step functions.
Edit: Here are more details, in response to questions in the comments. The estimate you get is (for an integer $x$): $$\sum_{n=1}^{x-1}\ln n<\int_1^x\ln t\,dt<\sum_{n=2}^x\ln x.$$ You can start the latter sum at $n=1$, since the first term is zero anyhow, and evaluating the integral in the middle you can rewrite all this as $$\Bigl(\sum_{n=1}^x\ln n\Bigr)-\ln x<x\ln x-x+1<\sum_{n=1}^x\ln x.$$ It may be best to rewrite the left inequality and move it to the right: $$x\ln x-x+1<\sum_{n=1}^x\ln x<x\ln x-x+1+\ln x,$$ and noting that $1+\ln x=O(\ln x)$ as $x\to\infty$. The extra $1$ makes no difference since it is negligible compared to $\ln x$ anyhow. For this, you only need the ridiculously week estimate $1+\ln x<2\ln x$, which holds for $x>e$.