Maximizing the Sum of Squares for Two Non-Negative Numbers with a Given Sum

  • Thread starter Thread starter NATURE.M
  • Start date Start date
  • Tags Tags
    Optimization
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
1 reply · 2K views
NATURE.M
Messages
298
Reaction score
0

Homework Statement



Two non-negative numbers are chosen such that their sum is 30. Find the numbers if the sum of their squares is to be a maximum.

Homework Equations





The Attempt at a Solution



let a,b represent the two non negative numbers
a=x
b=30-x
So, x^2+(30-x)^2=s, where s is the sum of their squares
After expanding, the derivative is:
s'=4x-60
let s'=0, then x=15.
The interval for possible x values is 0≤x≤30.
So let us check which value gives a maximum.

s(15)=450
s(0)=900
s(30)=900

Therefore, the two non-negative numbers are 0 and 30. Is this right? I ask because the solution on a worksheet I have indicates that the two numbers are 15 and 15.
 
Physics news on Phys.org
You are correct that the maximums occur at the ends. Probably a typo in the problem. Maybe they meant minimum.