real analysis – Solution Check: Determine if $lim_{nrightarrow infty} int_X e^{-nf(x)} dmu(x) $ exists.

I would appreciate if I could get this proposed solution checked for correctness and rigor. Here is the question:

Let $(X,mathcal{M},mu) $ be a finite measure space. Let $f:Xrightarrow (0,infty) $ be measurable. If the following limit exists, determine its value:

$$lim_{nrightarrow infty} int_X e^{-nf(x)} dmu(x). $$

If it does not, explain. In either case, justify your claims.

Here is my solution:

Since f is a non negative function notice that
$$ e^{-nf(x)} leq e^{-n(0)} =e^0 =1.$$

Since $X $ is a finite measure space we have
$$ int_X 1 dmu(x)= mu(X) <infty$$

for some $Min (0,infty) $. Therefore by the Dominated Convergence theorem we have
$$lim_{nrightarrow infty} int_X e^{-nf(x)} = int_X lim_{nrightarrow infty} e^{-nf(x)}. $$

Suppose $f = 0 $ a.e., then
$$ int_X lim_{nrightarrow infty} e^{-nf(x)} = int_X 1 dmu(x) =mu(X).$$

On the other hand, if $f neq 0 $ a.e., then
$$ int_X lim_{nrightarrow infty} e^{-nf(x)} = int_X 0 dmu(x) =0.$$

Therefore the limit exists and we see that

$$lim_{nrightarrow infty} int_X e^{-nf(x)} dmu(x)=
begin{cases}
mu(X) & text{if } f= 0 text{ a.e.}\
0 & text{if } fneq 0 text{ a.e.}
end{cases}$$