Find the following limit, if it exists, and justify your calculation: $$\lim_{n\to \infty}\int_{0}^{n}(1+\frac{x}{n})^{-n}\log(2+\cos(\frac{x}{n}))\mathrm{d}x$$
where $\log$ denotes the natural logarithm.
This is a homework problem, and we have proved several theorems that may help with this - namely the Monotone and Dominated Convergence Theorems, as well as the fact that Riemann and Lebesgue integrals agree (provided that the integrand is both Riemann and Lebesgue integrable).
I have been thinking about the MCT and DCT. I thought there would be a problem with the fact that the limit as $n\to \infty$ is affecting the upper limit of the integral, but looking again at the theorem statements, they really do not say much about the particular set that one integrates over. However, if I take the limit inside of the integral and then integrate the result, I would be left with an answer which depends on $n$, and that clearly wouldn't happen if this was done as a Riemann integral.
Any hints would be appreciated, but since this is a homework problem, I would like only hints to be given, no solutions. Thanks!
EDIT:
Let $f_n(x)=(1+\frac{x}{n})^{-n}\log(2+\cos(\frac{x}{n}))$. Then $f_n(x)\rightarrow log(3)e^{-x}:=f(x)$ for all $x\in(0,\infty)$.
Since $1<\log(3)<2$, $|f_n(x)|=f_n(x)\leq f(x) \leq 2e^{-x}$ for all $x\in (0,\infty)$. Also, $2e^{-x}$ is Lebesgue integrable over $(0,\infty)$, since $\int_{(0,\infty)}2e^{-x}\mathrm{d}m=2$ (where $m$ is the Lebesgue measure).
Thus, by DCT, $$\lim_{n\to \infty}\int_{0}^{n}(1+\frac{x}{n})^{-n}\log(2+\cos(\frac{x}{n}))\mathrm{d}x=\lim_{n\to \infty}\int_{(0,\infty)}\chi_{(0,n)}(1+\frac{x}{n})^{-n}\log(2+\cos(\frac{x}{n}))\mathrm{d}m=\log(3)\int_{(0,\infty)}\chi_{(0,n)}e^{-x}\mathrm{d}m$$
Am I on the right track with this? Is this now simply a Riemann integral, and how does the characteristic function change the calculation?
First I should mention that there is already a complete solution to a very similar problem on this site and it can be found here.(it contains more than just a hint). Since the request here is different here is a hint.
You can replace the upper bound of integration with $\infty$ multiplying the integrand by the bounded function $\chi_{(0,n)}$. Understanding the behavior of the $\log$ term should not be a problem once you look closely at what is inside. As Ian noticed in the comments section above, $$\Big(1 + \frac{x}{n}\Big)^n \uparrow e^x.$$ Luckily the exponential term in your question is raised to the $-1$.
EDIT (to answer the edited question): you are almost there, but it is still not quite correct. First, the major flaw in your reasoning is you don't keep track of the dependence on $n$ of the characteristic function when you send $n$ to infinity. Once you take the limit on $n$ that variable is gone and it should not appear again.
The second problem is more subtle: you say that $f_n(x) \le 2e^{-x}$ since $\log(3) < 2$, but notice that
$$\Big(1 + \frac{x}{n}\Big)^{-n} \downarrow e^{-x},$$ so what you can say is that that estimate is satisfied for $n$ sufficiently large (you can make this precise if you wish so).
I'd suggest to start over again considering $$f_n(x) = \Big(1 + \frac{x}{n}\Big)^{-n}\log(2 + \cos(x/n))\chi_{(0,n)}(x).$$