Maximizing the sum of two numbers, the sum of whose squares is constant 
How could we prove that if the sum of the squares of two numbers is a constant, then the sum of the numbers would have its maximum value  when the numbers are equal?

This result is also true for more than two numbers. I tested the results by taking various values and brute-force-ish approach. However I am interested to know a formal proof of the same. 
This is probably an mild extention to this problem. I encountered this result while searching for a easy solution for the same.

You can see this quite readily in the theorem of Thales:  An angle inscribed
in a semicircle is a right angle.

The constant in your problem is the square of the hypotenuse, and the sum of the other two sides is maximized when the altitude of the inscribed triangle is maximized.
