# Optimization Problems Involving Numbers

Number problems involve finding two numbers that satisfy certain conditions.

If we label the numbers using the variables x and y, we can compose the objective function F (x, y) to be maximized or minimized.

The constraint specified in the problem allows to eliminate one of the variables.

When we get the objective function as a single variable function, we can use differentiation to find the extreme values.

## Solved Problems

### Example 1.

Find two numbers whose sum is $$36$$ if the sum of their squares is to be a minimum.

Solution.

Let $$x$$ and $$y$$ be the two numbers. We want to find the minimum of the function

${F\left( {x,y} \right)} = {{x^2} + {y^2}}.$

As $$x + y = 36,$$ we can eliminate one variable in the objective function. Substitute $$y = 36 - x$$ in the objective function.

$F\left( {x,y} \right) = {x^2} + {y^2} = {x^2} + {\left( {36 - x} \right)^2} = {x^2} + 1296 - 72x + {x^2} = 2{x^2} - 72x + 1296 \equiv F\left( x \right).$

Take the derivative:

$F^\prime\left( x \right) = \left( {2{x^2} - 72x + 1296} \right)^\prime = 4x - 72.$

The critical points are

$F^\prime\left( x \right) = 0,\;\; \Rightarrow 4x - 72 = 0,\;\; \Rightarrow x = 18.$

Note that the second derivative is positive:

$F^{\prime\prime}\left( x \right) = \left( {4x - 72} \right)^\prime = {4 \gt 0}.$

Hence, the objective function has a local minimum at $$x = 18.$$

So the sum of squares is a minimum when $$x = 18,$$ $$y = 36-x = 18.$$

### Example 2.

Find two positive numbers whose product is $$a$$ such that their sum is minimum.

Solution.

Let $$x$$ and $$y$$ be the two numbers. The objective function is written in the form

$F = x + y.$

As $$xy = a,$$ we can substitute $$y = \frac{a}{x}$$ into the objective function:

$F = x + y = x + \frac{a}{x} = F\left( x \right).$

Take the derivative and find the critical points:

$F^\prime\left( x \right) = \left( {x + \frac{a}{x}} \right)^\prime = 1 - \frac{a}{{{x^2}}};$
$F^\prime\left( x \right) = 0,\;\; \Rightarrow 1 - \frac{a}{{{x^2}}} = 0,\;\; \Rightarrow {x^2} = a,\;\; \Rightarrow x = \pm \sqrt a .$

We should take only positive root $$x = + \sqrt a .$$

Find the second derivative and determine its sign at this point:

$F^{\prime\prime}\left( x \right) = \frac{{3a}}{{{x^3}}},\;\; \Rightarrow F^{\prime\prime}\left( x \right) = \frac{{3a}}{{{{\left( {\sqrt a } \right)}^3}}} = \frac{3}{{\sqrt a }} \gt 0.$

We see that $$x = \sqrt a$$ is a point of minimum by the Second Derivative Test.

$x = y = \sqrt a .$

### Example 3.

Find two numbers whose difference is $$8$$ and whose product is a minimum.

Solution.

The objective function is

$F = xy,$

where $$x$$ and $$y$$ are the two numbers.

Since $$x - y = 8,$$ we can substitute $$y = x - 8$$ in the objective function above. This yields:

$F = xy = x\left( {x - 8} \right) = {x^2} - 8x = F\left( x \right).$

Take the derivative:

$F^\prime\left( x \right) = \left( {{x^2} - 8x} \right)^\prime = 2x - 8.$

There is one critical point $$x = 4$$.

Note that the second derivative is always positive:

$F^{\prime\prime}\left( x \right) = \left( {2x - 8} \right)^\prime = 2 \gt 0.$

Hence, the objective function has a minimum at the point $$x = 4.$$ The other number equals $$y = -4.$$

### Example 4.

Determine two positive numbers whose product is $$4$$ such that the sum of their squares is minimum.

Solution.

The objective function is given by

$F = {x^2} + {y^2},$

where $$x,y$$ are the two unknown numbers.

As $$xy = 4,$$ we obtain:

$F = {x^2} + {y^2} = {x^2} + {\left( {\frac{4}{x}} \right)^2} = {x^2} + \frac{{16}}{{{x^2}}} = F\left( x \right).$

The derivative of the objective function is

$F^\prime\left( x \right) = \left( {{x^2} + \frac{{16}}{{{x^2}}}} \right)^\prime = 2x - \frac{{32}}{{{x^3}}} = \frac{{2{x^4} - 32}}{{{x^3}}}.$

Now it is easy to find the critical points:

$F^\prime\left( x \right) = 0,\;\; \Rightarrow \frac{{2{x^4} - 32}}{{{x^3}}} = 0,\;\; \Rightarrow {x^4} = 16,\;\; \Rightarrow x = \pm 2,$

so the critical points are

$x = - 2,\,0,\,2.$

We should take only the point $$x = 2.$$ Then $$y = 2.$$

### Example 5.

Find the number whose sum with its reciprocal is a minimum.

Solution.

The function to be minimized is written as

$F\left( x \right) = x + \frac{1}{x},$

where $$x$$ is supposed to be a positive number.

Take the derivative:

$F^\prime\left( x \right) = \left( {x + \frac{1}{x}} \right)^\prime = 1 - \frac{1}{{{x^2}}} = \frac{{{x^2} - 1}}{{{x^2}}}.$

There are the following critical values:

$x = - 1,\,0,\,1.$

Only the root $$x = 1$$ satisfies the condition $$x \gt 0.$$

Determine the second derivative:

$F^{\prime\prime}\left( x \right) = \left( {1 - \frac{1}{{{x^2}}}} \right)^\prime = \frac{2}{{{x^3}}} \gt 0.$

As the second derivative is positive at $$x = 1,$$ this point corresponds to the minimum of the objective function. The minimum value of the function is

${F_{\min }} = F\left( 1 \right) = 1 + \frac{1}{1} = 2.$

### Example 6.

Find two numbers whose difference is $$6$$ such that the sum of their squares is a minimum.

Solution.

Let $$x$$ and $$y$$ be the two numbers. The objective function is written as

$F = {x^2} + {y^2}.$

As $$x - y = 6,$$ we substitute $$y = x - 6$$ in the function above:

$F = {x^2} + {y^2} = {x^2} + {\left( {x - 6} \right)^2} = {x^2} + {x^2} - 12x + 36 = 2{x^2} - 12x + 36 = F\left( x \right).$

Compute the derivative:

$F^\prime\left( x \right) = \left( {2{x^2} - 12x + 36} \right)^\prime = 4x - 12,$

so the critical point is $$x = 3.$$

The second derivative is

$F^{\prime\prime}\left( x \right) = \left( {4x - 12} \right)^\prime = 4 \gt 0.$

Hence, $$x = 3$$ corresponds to the minimum of the objective function by the Second Derivative Test. The other number equals $$y = -3.$$

See more problems on Page 2.