# Solution – Find two numbers whose sum is 23 and whose product is a maximum

Find two numbers whose sum is 23 and whose product is a maximum.

When you see a problem like this, it’s obvious our goal is to maximize some function.  The more challenging part is figuring out what the function would be that we want to maximize.  When we look at this problem however, we can actually break it down into two different facts we know about these two numbers, which we will call a and b.

• The two numbers add up to 23.
• We need to maximize their product.

Each of these two bullet points can actually be represented mathematically and they can be used together.

#### Fact #1

First of all, we know that these two numbers add up to 23.  Or in other words,

$$a+b=23.$$

#### Fact #2

Also, we need to maximize the product of these numbers.  Another way to put this is that we want to maximize the function f, which represents the product of a and b.  So we need to maximize

$$f(a, \ b)=ab.$$

#### Putting the two facts together

The problem with this, is that it is difficult to maximize multivariable functions, and in fact, this function wouldn’t have a maximum unless we go back to our other equation.  Since we know $a+b=23$, we can actually use this to rewrite the function we need to maximize in terms of only one variable.

$$a+b=23$$

$$a=23-b$$

Now since we know $a=23-b$, we can go to our function of a and b and replace each a with (23-b).  Doing this will give us a new function with only b‘s in it, which we can then maximize.

$$f(a, \ b)=ab$$

Replacing a with (23-b) gives us a new function which we’ll call g.

$$g(b)=(23-b)b$$

#### Maximizing the function to find a and b

Now we just need to find the value of b that maximizes g.  To do this, we just need to take its derivative with respect to b, set it equal to 0, and solve for bThis will always be the general process when you need to maximize or minimize a function.  But first I will expand the function so it’s easier to take its derivative.

$$g(b)=23b-b^2$$

$$g'(b)=23-2b$$

Now set this equal to 0 and solve for b.

$$0=23-2b$$

$$2b=23$$

$$b=\frac{23}{2}$$

We can even check this using Wolfram Alpha.  Below you can see a graph of $y=g(b)$ showing the maximum value at $b=\frac{23}{2}$.

Now remember, we needed to find the value of a and b that would maximize their product.  So we need to use $b=\frac{23}{2}$ to find a.  To do this, we can just use the relationship we found earlier:

$$a=23-b$$

$$a=23-\bigg(\frac{23}{2}\bigg)$$

$$a=\frac{46}{2}-\frac{23}{2}$$

$$a=\frac{23}{2}$$

So now we know that $a=\frac{23}{2}$ and $b=\frac{23}{2}$ are the two numbers whose sum is 23 and whose product is as large as possible.

There are plenty of other lessons and solutions to help you make sense of derivatives on my derivatives page.  Go check them out and as always, I’d love to here your questions!  Leave a comment below or email me at jakesmathlessons@gmail.com with any questions or suggestions you may have.  Every email and comment helps me gear this site toward what you want to see, so please don’t hesitate to reach out.

You can also enter your name and email below and I’ll send you my calcu 1 study guide full of useful tips and tricks to help you boost your test scores!

## 2 thoughts on “Solution – Find two numbers whose sum is 23 and whose product is a maximum”

1. Alex says:

Thanks a lot!!

1. admin says:

You’re welcome!