How should two nonnegative numbers be chosen so that their sum is 1 and the sum of their squares is as large as possible? As small as possible?

To determine how two nonnegative numbers should be chosen such that their sum is 1 and the sum of their squares is as large as possible, or as small as possible, we can use basic concepts of calculus and optimization.

Let's denote the two nonnegative numbers as x and y. We are given the constraint that their sum is 1, so we have the equation: x + y = 1.

Now, to find the values that maximize the sum of their squares, we need to maximize the function f(x, y) = x^2 + y^2. To do this, we can use the method of Lagrange multipliers.

First, we construct the Lagrangian function L(x, y, λ) as follows: L(x, y, λ) = x^2 + y^2 + λ(x + y - 1), where λ is a Lagrange multiplier.

To find the maximum or minimum of L, we need to solve the following system of equations:
1. ∂L/∂x = 2x + λ = 0
2. ∂L/∂y = 2y + λ = 0
3. ∂L/∂λ = x + y - 1 = 0

From equations 1 and 2, we can see that x = -λ/2 and y = -λ/2.

Substituting these values into equation 3, we get -λ/2 - λ/2 - 1 = 0, which simplifies to λ = -2/√2.

Now that we have the value of λ, we can substitute it back into equations 1 and 2 to find the values of x and y.

1. 2x + (-2/√2) = 0
2. 2y + (-2/√2) = 0

Solving these equations, we get x = -1/√2 and y = -1/√2.

Since we want nonnegative values for x and y, the maximum value for the sum of their squares is (1/√2)^2 + (1/√2)^2 = 1.

Therefore, the two nonnegative numbers that maximize the sum of their squares while satisfying the constraint are x = 1/√2 and y = 1/√2.

Now, let's consider the case where we want to minimize the sum of their squares.

We still have the equation x + y = 1. To find the minimum value of the sum of their squares, we can make use of the Cauchy-Schwarz inequality, which states that for any two real numbers a and b: a^2 + b^2 ≥ (a + b)^2/2.

Substituting x and y into the inequality, we have: x^2 + y^2 ≥ (x + y)^2/2 = (1^2)/2 = 1/2.

Therefore, the minimum value for the sum of their squares is 1/2.

To achieve this minimum value, we can choose x = 1 and y = 0, or vice versa.

In summary:
- To maximize the sum of their squares: x = 1/√2 and y = 1/√2
- To minimize the sum of their squares: x = 1 and y = 0 (or vice versa)