Your method is ofcourse perfect and intuitively more understandable.
Only thing is IMO,we would need to add one more step after finding k=0, i.e find q and make sure it is a positive value for which the minimum is attained...ofcourse in this case, it is very obvious...but in more complicated cases, when having two variables and minimizing two parts of the expression separately ,it may become an issue. ....Your thoughts?
Quote:
Originally Posted by Aarav @arbit_rageur
A better way to do what you have done would be
p+k = 2+q where k >= 0
Thus, 2/(p+q) + q/2 = 2/(2+2q-k) + (2q+2-k)/4 + (k-2)/4.
By AM-GM on positive integers, q can be generated based on k
and our expression is >= sqrt(2) + (k-2)/4 which assumes min at k = 0.
I would have done this way. Your thoughts on the same? |