WEBVTT

00:00:00.000 --> 00:00:08.890
CHRISTINE BREINER: Welcome
back to recitation.

00:00:08.890 --> 00:00:11.560
Today we're going to work
on an optimization problem.

00:00:11.560 --> 00:00:13.630
So the question I
want us to answer

00:00:13.630 --> 00:00:17.100
is, what point on the curve y
equals square root of x plus 4

00:00:17.100 --> 00:00:19.150
comes closest to the origin?

00:00:19.150 --> 00:00:21.380
I've drawn a sketch
of this curve.

00:00:21.380 --> 00:00:24.510
The scale in this
direction-- each hash mark

00:00:24.510 --> 00:00:26.975
is one unit in the x
direction, each hash mark here

00:00:26.975 --> 00:00:28.960
is one unit in the y direction.

00:00:28.960 --> 00:00:31.090
Just want to point
out two easy places

00:00:31.090 --> 00:00:33.470
to figure out the
distance to the origin.

00:00:33.470 --> 00:00:36.520
Over here, where the curve
starts at negative 4, 0,

00:00:36.520 --> 00:00:39.170
the distance to the
origin is 4 units.

00:00:39.170 --> 00:00:43.340
And here at (0, 2) the distance
to the origin is two units.

00:00:43.340 --> 00:00:45.610
It's probably, we could
safely say, further away here.

00:00:45.610 --> 00:00:47.710
So we're anticipating
that somewhere

00:00:47.710 --> 00:00:49.440
along the curve
in this region is

00:00:49.440 --> 00:00:53.282
where we should find our place
that's closest to the origin.

00:00:53.282 --> 00:00:54.990
The only reason I
point that out is that,

00:00:54.990 --> 00:00:57.740
when you're doing these problems
on your own you should always

00:00:57.740 --> 00:01:00.642
try and anticipate roughly
where things should happen,

00:01:00.642 --> 00:01:03.100
in what kind of region, so that
you don't-- you don't start

00:01:03.100 --> 00:01:06.175
thinking, if you do something
wrong and you get x equals 100

00:01:06.175 --> 00:01:08.050
and then you come back
and look at the curve,

00:01:08.050 --> 00:01:10.510
you realize right away, well,
that doesn't make any sense.

00:01:10.510 --> 00:01:13.135
So we want to always be thinking
as we're solving the problems,

00:01:13.135 --> 00:01:14.219
does my answer make sense?

00:01:14.219 --> 00:01:16.468
So I'm actually going to
give you a little bit of time

00:01:16.468 --> 00:01:18.820
to work on this yourself
and then I'll come back

00:01:18.820 --> 00:01:20.070
and I'll work on it as well.

00:01:29.620 --> 00:01:30.780
Welcome back.

00:01:30.780 --> 00:01:33.620
Hopefully you were able to get
pretty far into this problem.

00:01:33.620 --> 00:01:37.180
And so I will start
working on it now.

00:01:37.180 --> 00:01:38.750
So again, the
question is that we

00:01:38.750 --> 00:01:43.240
want to optimize-- in this
case, minimize-- the distance

00:01:43.240 --> 00:01:45.620
to the origin from this curve.

00:01:45.620 --> 00:01:49.440
And so what we're really trying
to do is we have a constraint,

00:01:49.440 --> 00:01:51.690
the constraint is we
have to be on the curve,

00:01:51.690 --> 00:01:55.660
and then we also have something
we're trying to minimize.

00:01:55.660 --> 00:01:57.980
And the thing we're trying
to minimize is distance.

00:01:57.980 --> 00:02:02.380
And so we have to make sure that
we understand the two equations

00:02:02.380 --> 00:02:05.150
that we need-- the optimization,
or the constraint equation,

00:02:05.150 --> 00:02:06.760
and the optimizing equation.

00:02:06.760 --> 00:02:10.180
So to optimize we need to
know how to measure distance

00:02:10.180 --> 00:02:11.760
in two-dimensional space.

00:02:11.760 --> 00:02:13.830
And one point I want
to make is that if you

00:02:13.830 --> 00:02:16.050
want to optimize distance
you might as well

00:02:16.050 --> 00:02:18.800
optimize the square of distance
because it's much easier.

00:02:18.800 --> 00:02:21.820
So let me justify that
briefly and then we'll go on.

00:02:21.820 --> 00:02:27.244
So I want to optimize the
distance squared to the origin.

00:02:27.244 --> 00:02:29.410
It's, well distance, you
remember, first in general,

00:02:29.410 --> 00:02:33.650
between two points
(x, y) and (a, b)

00:02:33.650 --> 00:02:37.260
is something in this form.

00:02:37.260 --> 00:02:39.352
Distance squared
is the difference

00:02:39.352 --> 00:02:41.310
between the x-value
squared plus the difference

00:02:41.310 --> 00:02:42.660
between the y-value squared.

00:02:42.660 --> 00:02:45.100
This is, should remind you
of the Pythagorean theorem,

00:02:45.100 --> 00:02:46.430
ultimately.

00:02:46.430 --> 00:02:51.740
So in this case, in our
case, distance to the origin

00:02:51.740 --> 00:02:53.480
is x squared plus y squared.

00:02:53.480 --> 00:02:56.120
The distance squared is
x squared plus y squared.

00:02:56.120 --> 00:02:59.060
I just told you that instead
of trying to optimize distance,

00:02:59.060 --> 00:03:01.080
we can optimize
distance squared.

00:03:01.080 --> 00:03:02.340
Why is that?

00:03:02.340 --> 00:03:04.274
Well, remember that
when you optimize,

00:03:04.274 --> 00:03:05.940
what you're looking
for is a place where

00:03:05.940 --> 00:03:09.610
the derivative of the function
of interest is equal to 0.

00:03:09.610 --> 00:03:11.502
So what I want to
point out is that when

00:03:11.502 --> 00:03:12.960
you take the
derivative of distance

00:03:12.960 --> 00:03:16.070
squared and find
where that's 0, it's

00:03:16.070 --> 00:03:18.430
going to be the
same as the place

00:03:18.430 --> 00:03:20.780
where the derivative of
distance is equal to 0.

00:03:20.780 --> 00:03:21.790
So let's notice that.

00:03:21.790 --> 00:03:25.520
So this is a little
sidebar justification.

00:03:29.190 --> 00:03:34.000
Notice d squared prime
is equal to 2d d prime.

00:03:34.000 --> 00:03:35.676
Where did that come from?

00:03:35.676 --> 00:03:37.300
That's this is implicit
differentiation

00:03:37.300 --> 00:03:39.880
with respect to x and
this is the chain rule.

00:03:39.880 --> 00:03:43.980
So if I want d
prime to equal 0, I

00:03:43.980 --> 00:03:46.670
can also find where d
squared prime equals 0.

00:03:46.670 --> 00:03:48.590
I'm assuming-- notice
the distance is never

00:03:48.590 --> 00:03:51.111
at the origin-- so
distance is never 0.

00:03:51.111 --> 00:03:52.610
So I don't have to
worry about that.

00:03:52.610 --> 00:03:54.110
So that's a small
sidebar, but just

00:03:54.110 --> 00:03:56.820
to justify why we can do that.

00:03:56.820 --> 00:03:59.870
Now let's come back into
the problem at hand.

00:03:59.870 --> 00:04:04.330
What is our optimization
problem, equation

00:04:04.330 --> 00:04:05.610
that we want to minimize?

00:04:05.610 --> 00:04:08.840
We want to minimize this
equation with respect

00:04:08.840 --> 00:04:09.840
to a certain constraint.

00:04:09.840 --> 00:04:10.756
What's the constraint?

00:04:10.756 --> 00:04:12.455
The constraint is what y is.

00:04:12.455 --> 00:04:15.140
y depends on x.

00:04:15.140 --> 00:04:17.930
And so when I solve
these problems

00:04:17.930 --> 00:04:21.550
I'm going to have to
substitute in my constraint.

00:04:21.550 --> 00:04:25.980
So y squared is the square root
of x plus 4 quantity squared,

00:04:25.980 --> 00:04:27.390
so I just get x plus 4.

00:04:31.080 --> 00:04:34.940
So now I have my
optimization equation.

00:04:34.940 --> 00:04:37.040
How do I find a
minimum or a maximum?

00:04:37.040 --> 00:04:40.350
I take the derivative
and set it equal to 0.

00:04:40.350 --> 00:04:42.770
So let me come give
myself a little more room

00:04:42.770 --> 00:04:45.630
and do that over here.

00:04:45.630 --> 00:04:52.090
So d squared prime, now I get
derivative of x squared is 2x.

00:04:52.090 --> 00:04:57.070
The derivative of x is 1,
and the derivative of 4 is 0.

00:04:57.070 --> 00:05:00.320
This will be optimized
when this is equal to 0.

00:05:00.320 --> 00:05:03.500
So 0 equals 2x plus 1.

00:05:03.500 --> 00:05:05.440
So x is equal to minus 1/2.

00:05:08.110 --> 00:05:11.520
Does this pass, as we would
say maybe, the smell test?

00:05:11.520 --> 00:05:12.750
Does it smell OK to us?

00:05:12.750 --> 00:05:14.800
The answer will be yes.

00:05:14.800 --> 00:05:17.860
Because remember, we said
somewhere in this x region

00:05:17.860 --> 00:05:21.570
is where we expect that we
will have a distance closest,

00:05:21.570 --> 00:05:23.080
point closest to the origin.

00:05:23.080 --> 00:05:25.260
And so we're right
here on the x value.

00:05:25.260 --> 00:05:27.970
Now we have to find what the y
value is to finish the problem.

00:05:27.970 --> 00:05:30.450
But this is not, so
far, very surprising.

00:05:30.450 --> 00:05:32.990
It seems like maybe
the right thing.

00:05:32.990 --> 00:05:33.850
Now we have x.

00:05:33.850 --> 00:05:35.160
So now how do we find y?

00:05:35.160 --> 00:05:36.470
Well, we know what y is.

00:05:36.470 --> 00:05:39.600
y is equal to the
square root of x plus 4,

00:05:39.600 --> 00:05:43.820
so it's equal to the square
root of negative 1/2 plus 4,

00:05:43.820 --> 00:05:50.270
which simplified is 3 and
1/2, which I think is 7/2.

00:05:50.270 --> 00:05:57.610
So the point is negative 1/2
comma square root of 7/2.

00:05:57.610 --> 00:05:59.910
And then you just want to
double check and make sure,

00:05:59.910 --> 00:06:02.530
did I ask for the distance
or did I ask for the point?

00:06:02.530 --> 00:06:05.020
And right now we have the
point, so let's come over

00:06:05.020 --> 00:06:07.430
and make sure what
point on the curve

00:06:07.430 --> 00:06:08.740
comes closest to the origin.

00:06:08.740 --> 00:06:12.550
So now we know that we've
answered the correct question.

00:06:12.550 --> 00:06:15.154
So again, it was a
maximize-- sorry,

00:06:15.154 --> 00:06:16.320
it was a minimizing problem.

00:06:16.320 --> 00:06:17.820
It was an optimization
problem where

00:06:17.820 --> 00:06:19.430
we wanted to minimize distance.

00:06:19.430 --> 00:06:21.060
We had a constraint equation.

00:06:21.060 --> 00:06:23.449
We had the thing we
wanted to minimize.

00:06:23.449 --> 00:06:25.490
And then we took the
derivative of the minimizer,

00:06:25.490 --> 00:06:29.620
set it-- of the optimizing
equation, set it equal to 0,

00:06:29.620 --> 00:06:34.750
solved for x, and then found the
answer to the specific question

00:06:34.750 --> 00:06:37.040
by then finding the y-value.

00:06:37.040 --> 00:06:38.632
And I think I'll stop there.