Compute $\int_a^b e^x dx$ as a Riemann Sum I tried computing the integral $$\int_a^b e^x dx$$ as a Riemann sum. Therefore split the interval in to $n$ parts of the length $$\frac{b-a}{n}$$
and then took the limit of the Riemann sum.
$$\lim _{n \rightarrow \infty} \frac{b-a}{n} \sum_{k=0}^n e^{\frac{k(b-a)}{n}}$$.
When I computed this sum I got a limit, but not the right one.
$$
\begin{aligned}
& \int_a^b e^x d x=\lim _{n \rightarrow \infty} \frac{b-a}{n} \sum_{k=0}^n e^{\frac{k(b-a)}{n}} \\
& =\lim _{n \rightarrow \infty} \frac{b-a}{n} \sum_{k=0}^n\left(e^{\frac{b-a}{n}}\right)^k \\
& =\lim _{n \rightarrow \infty} \frac{b-a}{n}\left(\frac{\left(e^{\frac{b-a}{n}}\right)^{n+1}-1}{e ^{\frac{b-a}{n}}-1}\right) \\
& =\lim _{n \rightarrow \infty} \frac{(b-a)\left(\left(e^\frac{b-a}{n}\right)^{n+i}-1\right)}{n\left(e ^{\frac{b-a}{n}}-1\right)} \\
& =\lim _{n \rightarrow \infty} \frac{(b-a)\left(e^{\frac{(b-a)(n+1)}{n}}-1\right)}{n\left(\left(1+\frac{1}{n}\right)^{b-a}-1\right)} \\
& =\lim _{n \rightarrow \infty} \frac{(b-a)\left(e^{\frac{(b-a)(n+1)}{n}}-1\right)}{n\left(1+\frac{b-a}{n}-1\right)} \text { after  Taylor Expansion } \lim _{x \to 0}(1+x)^a=1+x \cdot a\\
& =\lim _{n \rightarrow \infty} e^{\frac{(b-a)(n+1)}{n}}-1 \\
& =\lim _{n \rightarrow \infty} e^{b-a}-1 \\
&
\end{aligned}
$$
Does somebody spot my mistake?

Three mistakes :

*

*the Riemann sum is over all integers $k$ in $[0,n-1]$ or $[1,n]$, not $[0,n]$.

*When you divide $[a,b]$ in $n$ intervals with length $(b-a)/n$, the bounds of those intervals are the points $a+(k/n)(b-a)$ where $k \in [0,n]$. This is why you do not get the right answer.

*Applying Taylor expansion as you do is not rigorous. You should use
$$\frac{e^{(b-a)/n}-1}{(b-a)/n} \to \frac{\mathrm{d}}{\mathrm{d}x}(e^x) \Big|_{x=0} = 1.$$
