Let's use what we've learned
about finding the minimums and
maximums of functions to solve
some optimization problems.
And you might be wondering,
Sal, what is an
optimization problem.
And my reply to you is well,
the problems we're about to do
are optimization problems, and
I think you'll understand
why they're called
optimization problems.
Anyway so the first problem
is find two numbers whose
product is a negative 16.
So the product is
equal to minus 16.
And it says, and the sum of
whose squares is a minimum.
So sum of squares is minimum.
So if you haven't figured out
yet, these optimization
problems all impose some type
of constraints, and then say,
for what numbers do we get a
maximum value or minimum value.
So let's do this problem, and
then we'll do a couple of more.
So two numbers whose product
is negative 16 and the sum
of their squares is minimum.
So call those two
numbers x and y.
So their product is minus
16, so we know that x times
y is equal to minus 16.
And then what's the
sum of their squares.
Let's just say the some
of squares, so I'll
just call that s.
The sum of their squares
is going to be equal to x
squared plus y squared.
And so this is the function
that we want to optimize.
And in this case we want to
find the minimum value.
So how do we do this problem?
Well the first thing we want to
do, we want to minimize this
function, but right now it's a
function of two variables,
and we haven't done
multivariable calculus yet.
So it would be easier if we
could express this as a
function of one variable, and
then we could optimize it with
respect that variable, and we
could substitute backwards
et cetera, et cetera.
So how can we write the
sum of the squares as a
function of one variable?
Well that's where this
equation comes in handy.
We could substitute
either for x or y.
Let's just substitute y, so we
could rewrite this equation
dividing both sides by x as y
is equal to minus 16 over x.
I just divided both
sides of this by x.
If we take this and substitute
it here, we get the sum of the
squares of the two numbers
is going to be equal to x
squared plus y squared.
Well y is this, so what's
this thing squared?
Minus 16 squared is
256 over x squared.
So that's the sum of the
squares of the two numbers.
And so how do we learn to find
minimums or maximums, or in
general optimize the function?
Well in general, a function
hits a minimum or maximum
point, especially a local
minimum or maximum point,
when it's derivative is 0.
So let's take the derivative of
this and set it equal to 0, and
hopefully we find
a minimum point.
And then we'll later show that
it really is a minimum point.
So let's take the derivative
of this with respect to x.
I'll just write s prime.
We could have written ds
dx, but save on notation.
Save on my electronic ink.
So s prime is equal to-- so
there's a slope of this
function at any time, at any
x-- 2x plus-- this is the
same thing as 256 times
x to the negative 2.
So what will be the derivative?
The derivative is
going to be 256.
We multiply times exponent
which is minus 2, and then we
decrement the exponent by 1 ,
so we get x to the minus 3.
So the derivative is equal to
2x plus-- no, not plus-- 2x
minus 512 times x
to the minus 3.
And we want to find a local
minimum or maximum, or
maybe a global one.
So we want to figure out where
the slope is equal to 0, so
this is the slope, so let's
set this equal to 0.
So we get 2x minus 512x to
the minus 3 is equal to 0.
Let's see, we can manipulate
that around a little bit.
We get 2x-- let me do it
in a different color,
I'm tired of the yellow.
So you get going up here, we
get-- just let's add 512 to
both sides-- so we get 2x is
equal to 512x to the minus 3,
right, I just added
512 to both sides.
Now let's multiply both sides
of this equation times x to the
third, just to get rid of this.
So if we multiply both sides
of this equation by x to
the third, we get 2x to the
fourth is equal to 512.
Right, x to the third
times x to the minus
3, that just equals 1.
Divide both sides of this
by 2, you get x to the
fourth is equal to 256.
And if it's not immediately
clear what this is-- you know,
x is going to be the fourth
root of 256-- if you don't know
that immediately, you can
think, well, what's the
square root of 256.
Well it's 16.
And then what's the
square root of that.
Well the square root of
16 is plus or minus.
So the square root of this is
plus or minus 16, but then
a square root of at least a
plus 16 is plus or minus 4.
So this x is equal
to plus or minus 4.
If you don't believe me, take
either minus 4 or positive
4 and take it to the fourth
power and you will get 256.
So if x is plus or
minus 4, what is y?
Well we just know that y
is minus 16 divided by x,
so we could get x is 4.
If x is 4, then what is y?
It's minus 16 divided by 4,
then y is equal to minus 4.
And of course if x was minus 4,
then y is minus 16 divided by
minus 4, y would be equal to 4.
So it actually doesn't
matter which one we take.
The two numbers are
4 and negative 4.
It doesn't matter what
we call them, x or y.
The two numbers are
4 and minus 4.
And we are actually
done the problem.
These are the two numbers where
the sum of the squares-- well
actually, no we, are not done.
We know that we've reached some
type of minimum or maximum
point here, and since they ask
for minimum, and this was the
only point that we found where
the slope was 0, we probably
solved the problem.
But let's prove to ourselves
that we're really at a minimum
point on this function
when x is equal to 4.
And how do we do that?
Well, we can take the second
derivative of this function,
see what the second derivative
is at x equals 4, and then see
if we're concave upwards
or concave downwards.
This is the first derivative.
What is the second derivative?
s prime prime is equal to 2,
and then minus 3 times minus
512, so that's plus,
and what is that?
1,536 Right, plus 1,536
times x to the minus 4.
I actually you know should be
writing s as a function of x.
I shouldn't be lazy
with my notation.
These are all the function of
x, but you get the point.
So what is s prime prime
when x is equal to 4?
Well it's equal
to 2 plus 1,536.
And then what's 4 to
the minus 4 power?
We get 1/256.
And we don't even have
to calculate this.
All we care about is this
value positive or negative.
It And it's clearly positive.
We have a positive number plus
a positive number divided
by a positive number.
So we have a positive
number here.
So what do we know?
We know at the point x is equal
to 4, this function here-- our
sum of squares function-- is
concave upwards, and we know
that because the second
derivative at x is equal
to 4 is positive.
And what does concave
upwards look like?
Concave upwards
looks like this.
And so x equals 4 is there, and
so we are at a minimum point.
And so we know that the sum
of squares are minimum.
And if you really want to make
sure that you're not missing
something or we haven't done
this wrong, just play around,
think of other numbers whose
product is minus 16 and figure
out their sum of squares.
And I can pretty much guarantee
you that it will be larger than
the sum of the squares
of 4 of minus 4 and 4.
So actually, what are they?
What is s of 4?
What is the sum of squares
of 4 and minus 4?
It's 4 squared is
16 plus 16 is 32.
That's the sum.
So let's try some
other numbers.
What is the sum of 1 squared
plus minus 16 squared.
Those two have the product
minus 16, 1 and minus 16,
that is equal to what?
257.
Much higher number.
You could try negative 8 and
2, or negative 2 and 8, and
everything you'll find will
have a higher sum of squares
than 4 and minus 4.
Anyway.
I was actually planning on
doing three problems in this
video, but I'm reaching the 10
minute limit so I will finish
this video now, and I will
do two more of these
optimization problems.
See you soon.
