How to Optimize the Sum of Squares of Two Nonnegative Numbers with a Fixed Sum?

  • Thread starter Thread starter gillgill
  • Start date Start date
  • Tags Tags
    Numbers
Click For Summary

Homework Help Overview

The discussion revolves around optimizing the sum of squares of two nonnegative numbers constrained by a fixed sum of 1. Participants explore both maximizing and minimizing the sum of squares, represented mathematically as \(x^2 + y^2\), where \(x + y = 1\).

Discussion Character

  • Exploratory, Mathematical reasoning, Assumption checking

Approaches and Questions Raised

  • Participants discuss the substitution of variables and the formulation of the objective function. There are inquiries about determining whether a critical point represents a maximum or minimum and how to verify the results around that point. Some suggest checking endpoints and using the second derivative test for confirmation.

Discussion Status

The conversation includes various methods for approaching the problem, including critical point analysis and boundary considerations. Some participants express confusion about the steps and seek clarification on finding additional solutions.

Contextual Notes

Constraints include the requirement that both numbers must be nonnegative and their sum must equal 1. There is an emphasis on understanding the implications of these constraints on the optimization process.

gillgill
Messages
128
Reaction score
0
How should two nonnegative numbers be chosed so the their sum is 1 and the sum of their squares is
a) as large as possible
b) as small as possible

here's what I've got so far:
x+y=1; y=1-x
x^2+y^2=S
x^2+(1-x)^2=S
S'=2x-2+2x
0=2x-2+2x
2=4x
x=1/2

How do u know if it is the largest possible or smallest possible?...and how to u find the other solution?
 
Physics news on Phys.org
solution

ok so we want to maximize/minimize x^2 + y^2 with the constraint that
x + y = 1 and that x and y are positive real numbers. Let y = 1 - x
so what are the bounds on x then?
Well y has to be positive or 0 so the maximum value x is allowed to be is 1

Let z = x^2 + y^2 (objective function)
so with our substitution

z = x^2 + (1-x)^2
z = 2x^2 - 2x + 1

with the constraint that 0 <= x <= 1

check the end pts
if x = 0 y = 1 z = 1
if x = 1 y = 0 z = 1

check for critical points over the valid interval by setting dz/dx equal to zero

4x - 2 = 0 x = 1/2 this is good because its in the interval (0 < 1/2 < 1)
x = 1/2 y = 1/2 z = 1/2

thus to maximize our objective function we should set
x = 0 and y = 1 or
x = 1 and y = 0

to minimize our objective function we should set
x = y = 1/2

zmax = 1
zmin = 1/2
 
Gill did you understand that? It took me a couple reads, lol.
 
Or one can use Lagrange multipliers...:rolleyes:

Daniel.
 
gillgill said:
How should two nonnegative numbers be chosed so the their sum is 1 and the sum of their squares is
a) as large as possible
b) as small as possible

here's what I've got so far:
x+y=1; y=1-x
x^2+y^2=S
x^2+(1-x)^2=S
S'=2x-2+2x
0=2x-2+2x
2=4x
x=1/2

How do u know if it is the largest possible or smallest possible?...and how to u find the other solution?
Two easy ways. x=1/2 is either a max or a min.

Try x=1/2 in your equation. Try a number on either side of x=1/2 in your equation. Compare the answers - are the results on either side of x=1/2 greater or smaller?

Try the second derivative test.
f'(x)=4x-2 (the two 2x's can be combined)
f"(x)=4

What's the value of f"(x) when x=1/2? If it's positive, then you have a local minimum. If it's negative, you have a local maximum. In this case, f"(x)=4 regardless of the value of x, so you only have a local minimum that occurs when f'(x)=0.

The first way always works. The second way has a few situations where it won't work, but it's usually the easiest way (your book should show a couple of examples to watch out for when you want to use the second derivative test).

You have no absolute maximum, in general, but you set a boundary when you defined the problem. Both numbers have to be positive (lower x-boundary is zero) and the sum of both numbers can't be greater than 1. Since y also can't be negative, the upper boundary for x is 1. Your boundaries are your maximums.
 
then...how to do u find the other solution?
 
You have one critical point which will either be a maximum or a minimum. The only ohter possibilities for a max/min would be the endpoints of your interval.
 

Similar threads

  • · Replies 32 ·
2
Replies
32
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 29 ·
Replies
29
Views
4K
  • · Replies 6 ·
Replies
6
Views
1K
Replies
6
Views
3K
Replies
23
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
1
Views
2K
  • · Replies 22 ·
Replies
22
Views
2K
Replies
9
Views
3K