12、已知函数$f(x) = ax + \ln a$,$g(x) = x + e^x - \ln x$,若关于$x$的不等式$f(x) > g(x)$在区间$(0, +\infty)$内有且只有两个整数解,则实数$a$的取值范围为
$A. \left( e, e^2 \right]$ $B. \left( e, \frac{e^2}{2} \right]$ $C. \left( e^2, e^3 \right]$ $D. \left( \frac{e^2}{2}, \frac{e^3}{3} \right]$
解:依题$ax + \ln a > x + e^x - \ln x$,$\therefore ax + \ln a + \ln x > x + e^x$
$\therefore ax + \ln ax > x + e^x$
$\therefore \ln ax + e^{\ln ax} > x + e^x$
设$h(x) = x + e^x$,显然$h(x)$单增
$\therefore \ln ax > x$
$\therefore \ln a > x - \ln x$
设$m(x) = x - \ln x$,则$m'(x) = 1 - \frac{1}{x} = \frac{x - 1}{x}$
$\therefore 0 < x < 1$时,$m(x)$单减,$x > 1$时,$m(x)$单增
$\therefore m(1) = 1$,$m(2) = \ln\frac{e^2}{2}$,$m(3) = \ln\frac{e^3}{3}$
$\because ax + \ln a > x + e^x - \ln x$在$(0, +\infty)$只有两个整数解
$\therefore \frac{e^2}{2} < a \leq \frac{e^3}{3}$