Why does the $\sum_{n=1}^x \frac {1}{n} \sim \mathrm {ln} x + \frac {1}{2}$ I was playing around with the Harmonic Series and I noticed that: $$\sum_{n=1}^x \frac {1}{n} \sim \mathrm {ln} x + \frac {1}{2}$$

I wanted to know if this is just some coincidence or if it is caused by something deeper. Thanks in advance
 A: $$\sum_{k=2}^{n}\frac1k <\int_1^n\frac {dt}t<\sum_{k=1}^{n-1}\frac1k$$
Then, if $H_n=\sum_{k=1}^n\frac1k$ we have
$$\frac1n<H_n-\ln n<1$$
A: Well, I see an answer that works something out that doesn't seem to me to quite answer the question, and another answer that answers the question with no proof (yes, there's a link). And of course several more now that I've typed this...
Here's the story:
Say $R_n$ is the rectangle in the plane with base equal to the interval $[n,n+1]$ on the $x$-axis and height $1/n$. In other words, $R_n=[n,n+1]\times[0,1/n]$. So the area of $R_n$ is exactly $1/n$. Now split $R_n$ into two pieces $$R_n=L_n\cup E_n,$$where $L_n$ is the part of $R_n$ lying below the curve $y=1/x$ and $E_n$ is the part above the curve. So the area of $L_n$ is $\int_n^{n+1}\frac{dt}t,$. Say $\delta_n$ is the area of $E_n$. So we have $$\frac1n=\delta_n+\int_n^{n+1}\frac{dt}t.$$Add those equations and you get $$H_n=\log(n+1)+\sum_{j=1}^n\delta_j.$$Subtract $\log(n)$ from both sides: $$H_n-\log(n)=\log\left(1+\frac1n\right)+\sum_{j=1}^n\delta_j.$$So we get $$\lim_{n\to\infty}(H_n-\log(n))=\sum_{j=1}^\infty\delta_j.$$Now the question is why that sum converges. 
Look at the picture and you see that in fact $$E_j\subset[j,j+1]\times[1/(j+1),1/j].$$So since $\delta_j$ is the area of $E_j$ we have $$0\le\delta_j\le\frac1j-\frac1{j+1}.$$ So the sum converges; the value of the sum is known as $\gamma$, and so $$H_n-\log(n)\to\gamma\quad(n\to\infty).$$
A: As you know, the logarithm is the antiderivative of the inverse function, and it is no surprise that the sum is well approximated by the integral.
More generally, a precise relation between a sum and integral is established by the Euler-Maclaurin formula.
More terms are
$$H_n=\ln(n)+\gamma+\frac1{2n}-\frac1{12n^2}+\frac1{120n^4}-\frac1{252n^6}\cdots$$
A: We have:
$$ H_N-\log(N+1) = -\int_{1}^{N+1}\frac{dx}{x}+\sum_{n=1}^{N}\frac{1}{n} = \int_{1}^{N+1}\left(\frac{1}{\lfloor x\rfloor}-\frac{1}{x}\right)\,dx $$
but the last integral is clearly convergent to some constant as $N\to +\infty$, since:
$$\frac{\{x\}}{x\lfloor x\rfloor}=O\left(\frac{1}{x^2}\right).$$
A: Since $\displaystyle\sum_{k=1}^n\frac{1}{k}=\frac{1}{n}+\int_1^n\frac{1}{\lfloor x\rfloor}dx$ and $\displaystyle\ln(n)=\int_1^n\frac{1}{x}dx$ we conclude
$$\begin{array}{ll} \displaystyle H_n-\ln(n)-\frac{1}{n} & \displaystyle =\int_1^n\left(\frac{1}{\lfloor x\rfloor}-\frac{1}{x}\right)dx \\ & \displaystyle =\int_1^n\frac{x-\lfloor x\rfloor}{\lfloor x\rfloor x}dx \\ & \displaystyle \le \int_1^n\frac{1}{\lfloor x\rfloor^2}dx \\ & \displaystyle = \int_1^2\frac{1}{\lfloor x\rfloor^2}dx+\int_2^n\frac{1}{\lfloor x\rfloor^2}dx \\ & \displaystyle \le 1+\int_1^\infty\frac{1}{x^2}dx \\ & = 2. \end{array} $$
Since $H_n-\ln(n)-\frac{1}{n}$ is increasing (the integrand in the first equation is nonnegative) and bounded, it has some limit. This implies $\lim\limits_{n\to\infty}\left[H_n-\ln(n)\right]$ exists.
The constant is not $\frac{1}{2}$, though. It's known as the Euler-Mascheroni constant, about $\gamma\approx 0.577\dots$
A: By partial summation $$\sum_{n=1}^{N}\frac{1}{n}=1+\int_{1}^{N}\frac{\left\lfloor t\right\rfloor }{t^{2}}dt=1+\log\left(N\right)-\int_{1}^{N}\frac{\left\{ t\right\} }{t^{2}}dt
 $$ where $\left\lfloor t\right\rfloor 
 $ is the integer part of $t
 $ and $\left\{ t\right\} 
 $ is the fractional part. The last integral is convergent because $$\int_{1}^{N}\frac{\left\{ t\right\} }{t^{2}}dt\leq \int_{1}^{N}\frac{1}{t^{2}}dt\leq1 .
 $$
