Using random numbers to evaluate $\sum_{k=1}^{10000}e^{\frac{k}{10000}}$ I tried using the Monte Carlo Method to approximate the sum $\sum_{1}^{10000}e^{\frac{k}{10000}}$.  First I genarating 100 random numbers in (1, 10000). Then by the strong law of large numbers:
$$\sum_{i=1}^{100}\frac{f(U_i)}{k} \to E[f(U)] = \theta$$
where:
$$\theta = \int_{1}^{10000}e^{\frac{x}{10000}}dx$$
The exercise says to use only 100 random numbers. So dont know if that thought is right, because this method requires k→∞

You are confusing a few different concepts:


*

*You write $\frac{1}{k}\sum_{i=1}^{100}f(U_i)\to\mathbb{E}[f(U)]$ when you clearly mean $\frac{1}{100}\sum_{i=1}^{100}f(U_i)\approx\mathbb{E}[f(U)]$.

*You talk about random numbers in $\{1,\dots,10000\}$ (implying that you choose them uniformly). This is therefore a discrete random variable. To evaluate its expectation, you then integrate between 1 and 10000 as if it were continuous (and you don't even normalize the density).


Let us go back to the basics. You know that for any continuous function $f$ on $[0,1]$, 
$$\frac{1}{N}\sum_{k=0}^Nf\left(\frac{k}{N}\right)\xrightarrow[N\to+\infty]{}\int_0^1f(x)\,\mathrm{d}x.$$
By identification, do you see what function $f$ you should choose to approximate $\sum_{k=1}^{10000}e^{k/1000}$?
Let us assume that you have found such an $f$, and $\sum_{k=1}^{10000}e^{k/1000}\approx\int_0^1f(x)\,\mathrm{d}x$. You may write 
$$\int_0^1f(x)\,\mathrm{d}x=\mathbb{E}[f(U)],$$
where $U$ is a uniform random variable on $[0,1]$. Then, do you see how to approximate $\mathbb{E}[f(U)]$ by using the Monte Carlo techniques you mention in your post?
