Inequality $(1-e^x)\ln(1-xe^{-x})\leq x^2$ This inequality, which appears to hold for all $x\in\Bbb R$,$$(1-e^x)\ln(1-xe^{-x})\leq x^2$$ arose when I tried to prove that the positive root of $x-\frac{x^2}{a}-\log(x+1)$ is bounded above by $a-\log(a+1)$.
Note that for the question linked, it suffices to prove the inequality for $x>0$, but I found it holds for $x<0$ too. The LHS is neither even nor odd so we will need to consider each case separately.
Near zero, the bound is very tight; for example, expressing the inequality as an integral $$\int_0^x\left(1-3t-\frac{(t-1)^2}{e^t-t}-e^t \ln\left(1-t e^{-t}\right)\right)\,dt<0$$ fails since both $1-3t-\frac{(t-1)^2}{(e^t-t)}$ and $e^t\ln(1-te^{-t})$ are strictly decreasing.
Can the inequality be analytically proven?
 A: Sketch of a proof:
We split into three cases.
Case 1: $x = 0$
The desired inequality is clearly true.
Case 2: $x \le 1$ and $x \ne 0$
It suffices to prove that
$$\frac{-x}{1 - \mathrm{e}^x} \ge \frac{\ln(1 - x \mathrm{e}^{-x})}{-x}.$$
We use the Tangent Line (TL) trick.
It suffices to prove that
$$\frac{-x}{1 - \mathrm{e}^x} \ge 1 - \frac{x}{2} \tag{1}$$
and
$$1 - \frac{x}{2} \ge \frac{\ln(1 - x \mathrm{e}^{-x})}{-x}. \tag{2}$$
The proofs of (1) and (2) are not difficult.
Case 3: $x > 1$
Using $u \ge \ln(1 + u)$ for all $u > -1$, we let $u = \frac{1}{1 - x\mathrm{e}^{-x}} - 1$ to get
$$-\ln (1 - x\mathrm{e}^{-x}) \le \frac{x\mathrm{e}^{-x}}{1 - x\mathrm{e}^{-x}}.$$
Since $\mathrm{e}^x - 1 > 0$, it suffices to prove that
$$(\mathrm{e}^x - 1) \cdot \frac{x\mathrm{e}^{-x}}{1 - x\mathrm{e}^{-x}}
\le x^2$$
or
$$\frac{x(x - 1)(\mathrm{e}^x - 1 - x)}{\mathrm{e}^x - x} \ge 0$$
which is true (using $\mathrm{e}^x \ge 1 + x$ for all $x \in \mathbb{R}$).
We are done.
A: We define: $$f(x)=\ln(1-xe^{-x})-\frac{x^2}{1-e^x}$$
$f(0)=0$, Consider $x>0$
$$f'(x)=\frac{(e^x-1-x)(1-2x-e^x(1-3x+x^2))}{(e^x-1)^2(e^x-x)}$$
$$e^x-1-x>0,~~~e^x-x>0,~~~(e^x-1)^2>0$$
So the sign of $f'(x)$ only depends on the sign of $~g(x)=(1-2x-e^x(1-3x+x^2))$
$g(0)=0$, $g(\epsilon^+)>0$ and $\lim_{x\rightarrow\infty}g(x)\to-\infty$
We can show $g(x)$ has only one positive root, namely $g(r)=0$. I put this proof in the very end.
Therefore, $g(x)$ is positive on $(0,r)$ and goes to negative on $(r,\infty)$
So $f(x)$ first increases till $x=r$ to reach the maxima, then goes decreasingly forever. Also asymptotically, $\lim_{x\to\infty} f(x)=0$, and this asymptotic limit guarantees $f(x)$ stays always above x-axis.
Because assume at some $x_p$, $f(x_p)<0$, since $\lim_{x\to\infty} f(x)=0$, which means when $x$ is sufficiently large, we can find some $x_s$, such that $x_p<x_s$, but $f(x_p)<f(x_s)<0$. This contradicts with the fact that $f(x)$ decreases forever on $(r,\infty)$. Therefore, $f(x)$ asymptotically goes to  $0$ and always stays above x-axis.
From all above, $f(x)$ is positive on $(0,\infty)$.
--------Appendix--------
In this section, we want to show there is only one positive root for $g(x)=0$
Assume the opposite is true, where $g(x)$ has at least two distinct positive roots. Let $x_1$ be the first positive root. Two cases:
Case $(1)$: $g(x_1)=0$ and $g'(x_1)=0$
In this case, $x_1$ is the touching point with x-axis. So we have $g(x_1+\epsilon)>0$. Since $\lim_{x\rightarrow\infty}g(x)\to-\infty$, there is at least another root $x_2$. So we have $g(0)=g(x_1)=g(x_2)=0$, where $x_1<x_2$. By Mean Value Theorem, there exists $t_1\in(0,x_1)$ and $t_2\in(x_1,x_2)$, such that $g'(t_1)=g'(t_2)=0$. Together with $g'(x_1)=0$, $t_1<x_1<t_2$, we have three distinct positive roots for $g'(x)=0$.
Again, by Mean Value Theorem, there are two distinct positive roots for $g''(x)=0$. But $g''(x)=-e^x(x^2+x-3)$, only one positive root. So we get contradiction for Case $(1)$.
Case $(2)$: $g(x_1)=0$ and $g(x_1+\epsilon)<0$
Case $(2.a)$: the next root $x_2$ (which is the closest to $x_1$) is a touching point to x-axis, namely $g'(x_2)=0$. By Mean Value Theorem, there exists $t_1\in(0,x_1)$ and $t_2\in(x_1,x_2)$, such that $g'(t_1)=g'(t_2)=0$. Together with $g'(x_2)=0$, then we have three distinct positive roots for $g'(x)=0$, hence two distinct positive roots for $g''(x)=0$, which goes back to the similar contradiction in Case $(1)$.
Case $(2.b)$: the next root $x_2$, where $g(x_2)=0$ and $g(x_2+\epsilon)>0$. Because $\lim_{x\rightarrow\infty}g(x)\to-\infty$, there exists at least another root $x_3$, such that $g(x_3)=0$, where $x_2<x_3$. So we have at least $g(0)=g(x_1)=g(x_2)=g(x_3)=0$, $\Rightarrow$ three distinct positive roots for $g'(x)=0$ $\Rightarrow$ two distinct positive roots for $g''(x)=0$, so we get similar contradiction as in Case.$(1)$
In conclusion, there is only one positive root for $g(x=r)=0$.
