# what's an elegant way to show that $x(1-x) \leq \frac14$? [duplicate]

for $$x \in \mathbb{R}$$, consider $$f(x) = x(1-x)$$, using traditional methods of finding global extremas, we can show that the derivative has a unique zero at $$x= \frac12$$ and $$f''(\frac12) < 0$$, thus $$x(1-x) \leq \frac14 = f(\frac12)$$

is there a more elegant way ?

• Hint: complete the square Jan 6, 2020 at 20:37
• $$x(1-x)=\text{GM}(x,1-x)^2 \leq \text{AM}(x,1-x)^2 = \frac{1}{4}.$$ Jan 6, 2020 at 20:43

Notice that $$(1/2-x)^2 \geq 0$$. The statement is trivial to prove from this.

Since it’s a quadratic polynomial with two zeros, the extreme value is at the vertex, whose $$x$$ coordinate is midway between the zeros of the polynomial.

So all you have to do is find the value $$x=\frac 12$$ midway between the zeros, then compute $$f(\frac12)$$ and confirm it is positive and therefore a maximum.

The interesting case is when $$0 (the others are obvious). For this case use AM-GM inequality for the numbers $$x$$ and $$1-x$$:

$$\sqrt{x(1-x)}\leq \frac{x+(1-x)}{2}$$

Easy to see that all the values outside $$I = (0,1)$$ will be negative, so the optimal solution must lie in $$I$$. Now you are optimizing an area of a rectangle with fixed perimeter of $$1$$, which is known from geometry to be a square, so $$x= 1-x$$ which implies $$x=1/2$$.

If $$x<0$$ or $$x>1$$ the expression is negative, so we need only consider $$0\leq x\leq 1$$, in which case the function is symmetric around $$x=1/2$$, increasing to the left of $$1/2$$ and decreasing to the right of it, hence maximised at $$x=1/2$$, where the value is $$1/4$$.

1) x >1; inequality is trivial(x(1-x)<0).

2) x <0; inequality is trivial(x(1-x)<0).

Consider $$0\le x \le 1$$.

Set $$x = \sin^2y$$ , $$0\le y \le π/2$$.

Then

$$\sin^2 y(1-\sin^2 y)=\sin^2 y \cos^2 y=$$

$$(1/4)\sin^2 2y \le 1/4.$$

Yes, this is a quadratic function, so it has an extrem at $$p={x_1+x_2\over 2} = {0+1\over 2}$$ and this extreme is $$f(p)= f(1/2)=1/4$$.

Since the leading coefficient is negative this extrem is a maximum.

Let $$y = x-1/2$$, so we have $$-(y + 1/2)(y - 1/2) = -y^2 + 1/4$$, which is clearly $$\leq 1/4$$.