Calculating the expectation in limiting case I am interested in calculating the expectation of the following function:
$\log(1+xa)$ with respect to the random variable $x$, with distribution $f(x),x \in [0,\frac{1}{a}]$ when $a\to \infty$.
thus,
$\lim_{a \to \infty}\mathbb E[\log(1+ax)] = \lim_{a \to \infty}\int_{0}^{\frac{1}{a}} \log(1+xa)f(x)dx$
I can take the function inside the integral as $g(x,a)$. Thus I need to find the area of the curve $g(x,a)$ when a is very small. As per my understanding, as $\frac{1}{a} \to 0$, the area will become the realization of the function $g(x,a)$ at $0$(The area will become infinitesimally small, and thus the realization of the function at a given point).
thus $\lim_{a \to \infty}\mathbb E[\log(1+ax)] = g(0,a) = f(0)$. But this is not correct as the answer is given as $\mathbb P(x\leq \frac{1}{a})$.
Where did I go wrong in my understanding? How to achieve the correct answer?
Thank You!
Edit: If it helps then the distribution of $f(x) \sim \exp(1)$
 A: Question : Given $f: [0,\infty) \to [0,\infty)$, what can be the nature of the limit $$
\lim_{a \to \infty} \int_0^\frac 1a \log(1+ax)f(x)dx
$$Must it exist? What can its values be?

Note that the limit and integral cannot be exchanged : the dominated convergence theorem doesn't apply (and using a partial converse of DCT from Brezis, it's possible to prove that the limit and integral exchange actually lead to different answers in some cases) because the function $\log(1+ax)f(x)$ is unbounded in $a$. This is why the argument presented in the original post fails.
If this could have been done, then the answer would have been expected as $f(0)$, as shown in the original post.

The usual way to get rid of this issue is to do an integration-by-parts. Let $g$ be any anti-derivative of $f$(assume that $f$ is integrable on $[0,1]$). Note that we haven't specified $g$ at a point : so we know that the answer must not involve the value of $g$ at any point (but maybe a difference at two points). We have $$
\int_0^\frac 1a \log(1+ax)f(x)dx = \left[\log(1+ax)g(x)\right]^{\frac 1a}_{0} - \int_0^\frac 1a g(x) \frac{a}{1+ax} dx \\ = \ln(2)g\left(\frac 1a\right) - \int_0^{\frac 1a} \frac{ag(x)}{1+ax}dx
$$
where we can now focus on the RHS. Now, $g$ is continuous so the first term will go to $\log(2)g(0)$ as $a \to \infty$. The second term can be tackled using dominated convergence : which leads to the rigorous answer. For doing this, we write $$
\int_0^{\frac 1a} \frac{ag(x)}{1+ax}dx = \int_0^{1} \frac{g(x)}{\frac 1a+x}1_{[0,\frac 1a]}(x) dx 
$$
The pointwise limit of this quantity is $0$. Note that it is dominated by $\frac{g(x)}{x}$ for all $a$. However, if $\frac{g(x)}{x}$ is integrable on $[0,1]$ then we must have $g(0)=0$ (which shows that we have lost arbitrariness of the anti-derivative). Thus, the following result holds :

If $f$ is an integrable function such that $\frac{g(x)}{x}$ is integrable on $[0,1]$ where $g$ is the integral of $f$ with $g(0)=0$, then $\lim_{a \to \infty} \int_0^{\frac 1a} \log(1+ax)f(x)dx = 0$.

This would capture many, many functions like constant $f$, or $f(x) = \frac 1{\sqrt x}$ and so on. It holds for $f(x) = e^{-x}$ as well : the antiderivative $g(x) = 1-e^{-x}$ is adjusted to give $g(0)=0$ , and $\frac{1-e^{-x}}{x}$ is integrable on $[0,1]$.
You can use the above to prove the following :

Suppose that $f$ is measurable and satisfies $\lim_{x \to 0} xf(x) = 0$. Then, $\lim_{a \to \infty} \int_0^{\frac 1a} \log(1+ax)f(x)dx = 0$.


However, here's a question : what happens if $f$ is on the edge of integrability, like say $f(x) = \frac 1x$, which is not integrable on $(0,1)$?
The answer for $f(x) = \frac 1x$ is itself quite interesting : the integral $$
\int_{0}^{\frac 1a} \frac{\log(1+ax)}{x}dx
$$
doesn't depend upon the value of $a$. To see this, perform the change of variable $Cu = x$ where $C$ is any positive constant, and get $$
\int_{0}^{\frac {1}{Ca}} \frac{\log(1+Cau)}{u/C}du/C = \int_{0}^{\frac {1}{b}} \frac{\log(1+bu)}{u}du
$$
where $b=Ca$. Since $C$ was arbitrary (positive), the answer is independent of $a$, and it will therefore equal the value for $a=1$, which is $\int_0^1 \frac{\log(1+x)}{x}dx$, some positive quantity. (Turns out, it's $\pi^2/12$). With this and a simple use of the comparison principle, one can prove the following :

Suppose that there exist constants $C_1,C_2$ such that $C_1<xf(x)<C_2$ for all $x \in [0,\delta)$ for some $\delta>0$. Then, $\lim_{a \to 0} \int_0^{\frac 1a} \log(1+ax)f(x)dx$ exists and is some positive constant.

What about $f$ going even slower? Once again, one can use a comparison principle (with the previous result) to see that if $xf(x)$ is unbounded in a neighborhood of $0$, then $\lim_{a \to 0} \int_0^{\frac 1a} \log(1+ax)f(x)dx$ is positive infinite.
Therefore, to summarize, the limit $\lim_{a \to \infty} \int_{0}^{\frac 1a} \log(1+ax)f(x)dx$

*

*is $0$ if $\lim_{x \to 0} xf(x) = 0$.


*is a positive finite quantity if $C_1<xf(x)<C_2$ for positive $C_1,C_2$ in a neighborhood of $0$.


*is $+\infty$ if $xf(x)$ is unbounded in a neighborhood of $0$.
A: Define
$$\phi_a(x)=\mathbb{1}_{(0,1/a]}\log(1+ax), \qquad a>0$$
if $0<x<1/a$ then $1<1+ax<2$ and so, $0<\phi_a(x)\leq \log 2$ in $(0,1/a]$. Consequently
$|\phi_a|\leq\log2\mathbb{1}_{(0,1/a]}\leq\log2$
Notice $\lim_{a\rightarrow0}\phi_a(x)=0$ for all $x>0$.
The rest is dominated convergence:
$$\lim_{a\rightarrow\infty}E[\phi_a(X)]=E[\lim_{a\rightarrow\infty}\phi_a(X)]=0$$
or if dominated convergence is not within your grasp,
$$ E[\phi_a(X)]\leq\log2 P[X\leq1/a]\xrightarrow{a\rightarrow\infty}\log2 P[X=0]=0$$
since $X$ has a distribution that admits density.
