# Homework Help: Sum of two nonnegative numbers optimization

1. Dec 20, 2004

### Shay10825

The sum of two nonnegative numbers is 20. Find the numbers if

a. the sum of their squares is as large as possible; as small as possible
b. one number plus the square root of the other is as large as possible; as small as possible.

a. x+y = 20

x^2 +y^2 = N
(20-y)^2 + y^2 = N
-40 + 4y = N'
y=10

Does y=10 make large or small????

~Thanks

2. Dec 20, 2004

### Pyrrhus

you need to know the properties of a parabole when the coefficient accompanying the variable squared it's negative then that means a maximun, because the parabole has a highest point (its vertex) up, when the value is positive it's a minimium because the parabole has a lowest point (its vertex) down.

Last edited: Dec 20, 2004
3. Dec 20, 2004

### Shay10825

But if it is a parabola how can it have a max and a min (to make it as large and small as possible).

4. Dec 20, 2004

### Pyrrhus

A parabole only has either a minimium or a maximium, so i don't know how they expect you to maximize this.

Last edited: Dec 20, 2004
5. Dec 20, 2004

### Shay10825

So you would not be able to find the sum of their squares to make it as large as possible?

6. Dec 20, 2004

### Gokul43201

Staff Emeritus
To find out if your extremum is a maxumum or minimum take the second derivative of the function. If f">0, your point is a minimum and if f"<0, it is a maximum.

In this case, f" = 4 which is always >0. So, the point (10,10) is a local minimum.

Now there must be a maximum, since x and y are bounded. So, the maxima must occur at one or both of the bounds (ie : x=20, and/or y=20). In this case, both these bounds give the same value f(x,y)=400.

7. Dec 20, 2004

### Gokul43201

Staff Emeritus
Also, the graphical representation of this problem makes all of this very clear.

First of all, there are no parabola involved.

Draw the x- and y-axes.

Draw the constraints. In this case the constraint is the line segment x+y=20 in the 1st quadrant. So, only points on this line are allowed.

Next draw the function to be optimized, x^2 + y^2 = N. Clearly, this is the equation of a circle, centered on the origin. For larger values of N, you get larger and larger circles. Since N is the number you want to optimize, you are merely optimizing the (square of the ) radius of this circle.

The radius is shortest when the circle first touches the constraint line (at (10,10)). This is your minimum. For larger radii, the circle will intersect the line at a pair of points. The largest radius is achieved when the circle passes through the final pair of points (20,0) and (0,20), so these are your maximal points.