Steply

Two numbers add up to 20. Find the largest product.

Step by step, with the reason for every step · Maximum, minimum and optimization · Calculus

Step by step

The question

Question: Two numbers add up to 20.

Find the largest product.

1 Name the unknown

Call the first number x.

x = the first number

They add up to 20, so the second number is 20 − x.

20 − x = the second number

2 Write the product

The product is the first number times the second.

P(x) = x(20 − x)

The x in front of the bracket multiplies every part inside.

Now we have P(x) = 20x − x².

= 20x − x2

3 Solve f′(x) = 0

The biggest product is at the top of the curve, where the slope is 0.

The power rule gives P′(x) = 20 − 2x.

P′(x) = 20 − 2x

Set it equal to 0.

20 − 2x = 0

Add 2x to both sides, so they stay equal.

2x = 20

To remove times 2, we divide by 2.

x = 202

20 divided by 2 is 10.

x = 10

4 Is it the biggest?

Before 10 the slope is positive: going up.

After it, negative: going down.

Up, then down: a maximum.

P′(9) = 2 > 0 ↗, P′(11) = −2 < 0 ↘

Careful!

x is only the first number.

The question asks for the product.

Careful: x = 10 is not the answer yet

5 Answer the question

The other number is 10.

second = 20 − 10 = 10

So the largest product is 100.

P(10) = 10 × 10 = 100

6 Check

Let's check with x a bit smaller: 9 gives 99.

x = 9: 9 × 11 = 99

And x = 11 gives 99.

Both are smaller than 100.

Right!

x = 11: 11 × 9 = 99

Let's look back.

First: name the unknown.

Then: write the product.

Then: solve f′(x) = 0.

Then: is it the biggest?.

Then: answer the question.

Last: check.

Answer
P(10) = 10 × 10 = 100

Your turn

Try this one yourself, then check:

Show the answer
largest product = 196

More from Maximum, minimum and optimization

The whole lesson: Maximum, minimum and optimization →