Prove that $x ^ {1 - x} (1 - x) ^ {x} \le \frac {1}{2}$ How do I prove $x ^ {1 - x}(1 - x) ^ {x} \le \frac{1}{2}$, for every $x \in (0, 1)$.

For $x = \frac {1}{2}$ the LHS is equal to one half. I tried studying what happens when $x \lt \frac {1}{2}$ and its correspondent, but to no result.

let $a=x,b=1-x$,
$a+b=1$,
By  AM-GM$$\frac{1}{2}=\frac{{(a+b)}^2}{2}\ge 2ab=\frac{ab+ba}{a+b}\ge \sqrt[a+b]{a^b b^a}=a^bb^a=x^{1-x}{(1-x)}^{x}$$
