<s>[INST] Is it possible for Riemann Sum and Standard Integration to have different answers? I have a specific question for this equation :
$$\frac{1}{x+1}
$$
Using Standard Integration,
$$\int_{0}^{1} \frac{1}{x+1}
$$
which is approximately 0.69
Using Riemann Sum (right end point), however, I get this
$$ \lim _{n \to \infty }  \Sigma ^n _{i=1} \frac{1}{n+i}
$$
$$ = \lim _{n \to \infty } ( \frac {1} {n+1} + \frac {1} {n+2} + \frac {1} {n+3} + ... +\frac {1} {2n} )
$$
$$ = \lim _{n \to \infty } (\frac{1}{n})( \frac {1} {1+\frac{1}{n}} +  \frac {1} {1+\frac{2}{n}} +  \frac {1} {1+\frac{3}{n}} + ... +\frac {1} {2} )
$$
$$=  (\frac{1}{\infty})( \frac {1} {1+0} + \frac {1} {1+0} + \frac {1} {1+0} + ... +\frac {1} {2} )
$$
$$= 0
$$
Is this right?
 [/INST] Yes, it's possible to show both expressions equal $\ln(2)$. Just like how others pointed out, we can't just "plug in $\infty$" all the time and get the right answer because $\infty$ is not a real number. To show our Riemann Sum converges to $\ln{(2)}$, we do
$$\eqalign{
\lim_{n\to\infty}\sum_{i=1}^{n}\frac{1}{n+i} &= \lim_{n\to\infty}\sum_{i=1}^{n}\frac{1}{n\left(1+\frac{i}{n}\right)} \cr
&= \lim_{n\to\infty}\sum_{i=1}^{n}\left(\frac{1}{1+\frac{i}{n}}\right)\left(\frac{1-0}{n}\right).
}$$
Recall the definition of Riemann Sums on $\left[a,b\right]$ using $n$ subintervals that $x_i = a+i\Delta x$ and $\Delta x = \frac{b-a}{n}$. Let $b=1$ and $a=0$ so that $\Delta x = \frac{1-0}{n}$ and $x_i = 0 + i\left(\frac{1-0}{n}\right) = \frac{i}{n}$. Then we get the sum to equal
$$\int_0^1 \frac{1}{1+x}dx,$$
which equals $\ln{(2)}$.
Does that make sense?
</s>