15. 已知正实数 $x,y$ 满足 $\ln x= y\mathrm{e}^x+\ln y$,则 $x(y-x+4)$ 的最大值为_.
解: $\because \ln x=y\mathrm{e}^x+\ln y$
$$\therefore \ln\dfrac{x}{y}=y\mathrm{e}^x$$
$$\therefore \dfrac{\ln\dfrac{x}{y}}{y}=\dfrac{y\mathrm{e}^x}{y}$$
$$\therefore \dfrac{x}{y}\ln\dfrac{x}{y}=x\mathrm{e}^x$$
$$\therefore \ln\dfrac{x}{y}\cdot\mathrm{e}^{\ln\frac{x}{y}}=x\mathrm{e}^x$$
设 $f(x)=x\mathrm{e}^x$,则 $f'(x)=\mathrm{e}^x(x+1)>0$,$\therefore x>0$ 时 $f(x)$ 单增,
$$\therefore \ln\dfrac{x}{y}=x,\quad y=\dfrac{x}{\mathrm{e}^x}$$
$$\therefore x(y-x+4)=x\left(\dfrac{x}{\mathrm{e}^x}-x+4\right)$$
设 $g(x)=\dfrac{x^2}{\mathrm{e}^x}-x^2+4x$,则 $g'(x)=(2-x)\left(\dfrac{x}{\mathrm{e}^x}+2\right)$,
$\therefore 0<x<2$ 时,$g(x)$ 单增;$x>2$ 时,$g(x)$ 单减,
$$\therefore g(x)_{\text{最大值}}=g(2)=\dfrac{4}{\mathrm{e}^2}+4$$
$$\therefore x(y-x+4)\ \text{最大值}\ \dfrac{4}{\mathrm{e}^2}+4$$
答案: $\dfrac{4}{\mathrm{e}^2}+4$