TITLE: Maximizing Value of Function
QUESTION [1 upvotes]: I have three variables $p \geq 0$, $q \geq 0$, $r \geq 0$ and a positive constant $m$. Let $m = p + q +r$.
How can I show that the maximum value of $pq + r$ is no more than $\frac{m^2}{4}$?
It's easy to see that decreasing $r$ (thus increasing $p + q$) will give us higher value. It's also easy to see that the maximum value of $pq + r$ when $r = 0$ is achieved at $p = q = \frac{m}{2}$. But I believe there must be mathematically better way to proof this.

REPLY [0 votes]: $m=p+q+r$, 
$r=m-p-q$.
So you want to maximize the : $pq+r=pq+m-p-q=m+(pq-p-q)$
Since m is stable, you need to maximize (pq-p-q). You can easily show that this is maximized when p=q.
So now you have to find the maximum value of: $f(p)=m+p^2-2p$, where p belongs in the $[0,\frac{m}2]$ (0 when r=m and $\frac{m}2$ when r=0)
In order to find the maximum, you need to examine

where the derivative is zero
the edges

f'(p)=2p-2, f''(p)=2>0. so, this is a minimum.
f(0)=m
$f(\frac{m}2)=\frac{m^2}4$
So your maximum is the biggest value of m and $\frac{m^2}4$ (and not just $\frac{m^2}4$ as you claimed. imagine p=0,q=0, r=1)
{"set_name": "stack_exchange", "score": 1, "question_id": 563484}