PDA

View Full Version : Calculus


gillgill
May31-05, 01:31 AM
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?

abercrombiems02
May31-05, 02:05 AM
ok so we want to maximize/minimize x^2 + y^2 with the constraint that
x + y = 1 and that x and y are postive 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

whozum
May31-05, 02:07 AM
Gill did you understand that? It took me a couple reads, lol.

dextercioby
May31-05, 02:37 AM
Or one can use Lagrange multipliers...:rolleyes:

Daniel.

BobG
May31-05, 01:16 PM
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.

gillgill
May31-05, 05:04 PM
then...how to do u find the other solution?

whozum
May31-05, 05:10 PM
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.