Prove: $\forall a\in\mathbb R$, $\max\{y=x(a-x):x\}=\frac{a}{2}$

19 Views Asked by At

I'm trying to prove that $\forall a\in\mathbb R$, the value of $x$ that gives the maximum value of $y=x(a-x)$ is $x=\frac{a}{2}$.

I'm told that I must use this inequality to prove this: $\forall x,y\in\mathbb R$, $xy\leq(\frac{x+y}{2})^2$.

I know how to do this with basic calculus by finding $\frac{dy}{dx}=a-2x$ then $\frac{dy}{dx}=0$ when $x=\frac{a}{2}$.

I have no clue how to even start with using the above inequality to prove this though... Any help would be greatly appreciated!

1

There are 1 best solutions below

0
On

Nevermind, figured it out minutes after posting this.

$$\begin{align*} x(a-x)&\leq(\frac{x+a-x}{2})^2\\ y&\leq(\frac{a}{2})^2\\ \end{align*}$$ Hence the max of $y$ is $\frac{a^2}{4}$. Solving for $x$: $$\begin{align*} \frac{a^2}{4}&=ax-x^2\\ x^2-ax+\frac{a^2}{4}&=0 \end{align*}$$ This has a double root when $x=\frac{a}{2}$.