A tough inequality After fiddling with things, I came to wonder whether the following holds for $0<x<1:$
$$\left(\frac{1}{x}-1\right)^x \geq (x-1)(4x^2-4x-1)$$
To get an idea of what I was dealing with I plotted the curves, and it turns out these are very close, especially on $(\frac{1}{2},1)$, but it appears to be true on the entire interval. Any ideas how one could prove this?

As suggested by Karl Kronenfield, set $f(x) = x^x (1-x)^{1-x} (1+4x-4x^2)$ and set $g(x) = \log f(x)$. The goal is to prove $f(x)  \leq 1$ or, equivalently, $g(x) \leq 0$. As pointed out by Karl, $f(x) = f(1-x)$, so it suffices to prove the inequality on $[0,1/2]$.
Below, I plot $g$ (red), $g'$ (blue) and $g''$ (green) on $(0,1/2)$ for illustrative purposes; this proof does not rely on the picture. (The vertical scales for the three graphs are different.)

Note that
$$\frac{d^2}{(dx)^2} g(x) = - \frac{(1 - 2 x)^2 (1 - 12 x + 12 x^2)}{x (1 - x)  (1 + 4 x - 4 x^2)^2}$$
From this we can compute that $g''(x)$ is well defined on $(0,1/2)$, vanishing at $1/2$ and at $\alpha := (3-\sqrt{6})/6 \approx 0.092$, and vanishing nowehere else on $(0,1/2)$.  We see that $g''(x)$ is positive on $(0, \alpha)$ and negative on $(\alpha, 1/2)$. 
So $g'$ is increasing on $(0, \alpha)$ and decreasing on $(\alpha, 1/2)$. Combined with the facts that $g'(0) = - \infty$ and $g'(1/2)=0$, we see that $g'$ must be positive on $(\alpha, 1/2)$ and have a single zero in $(0, \alpha)$. Denote that single zero by $\beta$. Numerically, $\beta \approx 0.039$. 
So $g$ is decreasing on $(0, \beta)$ and increasing on $(\beta, 1/2)$. In particular, $g$ assumes its largest values at the endpoints of $(0,1/2)$. By direct computation, $g(0) = g(1/2) = 0$ as desired. 

Methodology: Plot $f$ and notice that it is concave down on a large neighborhood of $1/2$, which immediately proves the inequality on that neighborhood. Decide to compute the exact size of that neighborhood. Realize that $\frac{d^2}{(dx)^2} f(x)$ is a giant mess, but $\frac{d^2}{(dx)^2} \log f(x)$ is pretty simple. Draw a sketch of $g$ with a hypothetical "spike towards positivity" in $[0,1/2]$. Think about how the concavity of that hypothetical $g$ differs from the concavity of the true $g$. Write the answer. Then rewrite the answer with added graphics and detail to sound prettier.
