Question: I was asked this on an aptitude test recently

> 
> Determine the next number in the sequence: $-2, 3, 27, 69, 129, \ ..$   
> 
>  A: $178$   
> 
>  B: $207$   
> 
>  C: $288$   
> 
>  D: $312$
> 
> 
> 

I've been racking my brain for a few days trying to find the solution but I can't figure it out.

Answer: 
Do the following change of variable: $u = \frac{r}{r+w}K$ and $v = \frac{w}{r+w}L$. Then you can rewrite the objective as:
\begin{align}
10p\frac{r+w}{\sqrt{rw}}\sqrt{uv}-(r+w)(u+v)\leq 10p\frac{r+w}{\sqrt{rw}}\frac{u+v}{2}-(r+w)(u+v) = (\frac{5p}{\sqrt{rw}}-1)(r+w)(u+v),
\end{align}
where the last inequality is due to the relationship between geometric mean and arithmitic mean. Note that the inequality is tight and it could be reached by simply choosing $u=v$. Now it is easy to see that if $(\frac{5p}{\sqrt{rw}}-1)\leq 0$, then the max would be zero, by choosing $u=0$ and $v=0$. On the other hand when $(\frac{5p}{\sqrt{rw}}-1)>0$, then the max would be infinity $u=v\rightarrow +\infty$.

In the case where $5p = \sqrt{rw}$, the optimal value which is $0$ could be attained at any point where $u=v>0$.
Ok. I don't understand that. I can see that I forgot to include $p$. So I actually have:

$F(K,L)=10p\sqrt K\sqrt L -rK-wL $

If that makes any difference.