< Return to Video

Optimization: sum of squares | Applications of derivatives | AP Calculus AB | Khan Academy

  • 0:01 - 0:04
    We are being asked, what
    is the smallest-- this
  • 0:04 - 0:08
    is a little typo here--
    what is the smallest
  • 0:08 - 0:10
    possible sum of
    squares of two numbers
  • 0:10 - 0:14
    if their product is negative 16?
  • 0:14 - 0:20
    So let's say that these
    two numbers are x and y.
  • 0:20 - 0:23
    So how could we define the
    sum of the squares of the two
  • 0:23 - 0:24
    numbers?
  • 0:24 - 0:26
    So I'll just call that
    the sum of the squares,
  • 0:26 - 0:29
    s for sum of the squares,
    and it would just
  • 0:29 - 0:33
    be equal to x squared
    plus y squared.
  • 0:33 - 0:35
    And this is what we
    want to minimize.
  • 0:35 - 0:41
    We want to minimize s.
  • 0:41 - 0:44
    Now, right now s is expressed
    as a function of x and y.
  • 0:44 - 0:46
    We don't know how to minimize
    with respect to two variables,
  • 0:46 - 0:49
    so we have to get this in
    terms of only one variable.
  • 0:49 - 0:52
    And lucky for us, they give us
    another piece of information.
  • 0:52 - 0:55
    Their product is negative 16.
  • 0:55 - 1:01
    So x times y is
    equal to negative 16.
  • 1:01 - 1:03
    So let's say we
    wanted this expression
  • 1:03 - 1:05
    right over here
    only in terms of x.
  • 1:05 - 1:08
    Well, then we can
    figure out what
  • 1:08 - 1:10
    y is in terms of x
    and then substitute.
  • 1:10 - 1:11
    So let's do that
    right over here.
  • 1:11 - 1:17
    If we divide both sides by x,
    we get y is equal to negative 16
  • 1:17 - 1:18
    over x.
  • 1:18 - 1:21
    And so let's replace
    our y in this expression
  • 1:21 - 1:23
    with negative 16 over x.
  • 1:23 - 1:27
    So then we would get
    our sum of squares
  • 1:27 - 1:29
    as a function of
    x is going to be
  • 1:29 - 1:32
    equal to x squared
    plus y squared.
  • 1:32 - 1:35
    y is negative 16 over x.
  • 1:38 - 1:41
    And then that's what
    we will now square.
  • 1:41 - 1:47
    So this is equal to x
    squared plus, what is this?
  • 1:47 - 1:49
    256 over x squared.
  • 1:49 - 1:55
    Or we could write that as
    256x to the negative 2 power.
  • 1:55 - 2:00
    That is the sum of our squares
    that we now want to minimize.
  • 2:00 - 2:02
    Well, to minimize
    this, we would want
  • 2:02 - 2:04
    to look at the critical
    points of this, which
  • 2:04 - 2:07
    is where the derivative
    is either 0 or undefined,
  • 2:07 - 2:10
    and see whether those
    critical points are possibly
  • 2:10 - 2:11
    a minimum or a maximum point.
  • 2:11 - 2:13
    They don't have to
    be, but those are
  • 2:13 - 2:15
    the ones if we have a
    minimum or a maximum point,
  • 2:15 - 2:17
    they're going to be one
    of the critical points.
  • 2:17 - 2:19
    So let's take the derivative.
  • 2:19 - 2:21
    So the derivative
    s prime-- let me
  • 2:21 - 2:25
    do this in a different
    color-- s prime of x.
  • 2:25 - 2:26
    I'll do it right
    over here, actually.
  • 2:26 - 2:29
    The derivative s prime
    of x with respect
  • 2:29 - 2:33
    to x is going to be
    equal to 2x times
  • 2:33 - 2:38
    negative 2 times 2x plus
    256 times negative 2.
  • 2:38 - 2:43
    So that's minus 512x to
    the negative 3 power.
  • 2:46 - 2:53
    Now, this is going to be
    undefined when x is equal to 0.
  • 2:53 - 2:56
    But if x is equal to
    0, then y is undefined.
  • 2:56 - 2:57
    So this whole thing breaks down.
  • 2:57 - 3:01
    So that isn't a useful
    critical point, x equals 0.
  • 3:01 - 3:03
    So let's think about
    any other ones.
  • 3:03 - 3:05
    Well, it's defined
    everywhere else.
  • 3:05 - 3:07
    So let's think about where
    the derivative is equal to 0.
  • 3:07 - 3:10
    So when does this thing equal 0?
  • 3:10 - 3:16
    So when does 2x minus 512x
    to the negative 3 equal 0?
  • 3:16 - 3:20
    Well, we can add 512x to the
    negative 3 to both sides.
  • 3:20 - 3:26
    So you get 2x is equal to 512x
    to the negative third power.
  • 3:26 - 3:32
    We can multiply both sides
    times x to the third power
  • 3:32 - 3:35
    so all the x's go away
    on the right-hand side.
  • 3:35 - 3:40
    So you get 2x to the
    fourth is equal to 512.
  • 3:40 - 3:43
    We can divide both
    sides by 2, and you
  • 3:43 - 3:50
    get x to the fourth
    power is equal to 256.
  • 3:50 - 3:53
    And so what is the
    fourth root of 256?
  • 3:53 - 3:55
    Well, we could take the
    square root of both sides just
  • 3:55 - 3:56
    to help us here.
  • 3:56 - 3:58
    So let's see.
  • 3:58 - 4:01
    So it's going to be x squared
    is going to be equal to 256
  • 4:01 - 4:03
    is 16 squared.
  • 4:03 - 4:05
    So this is 16.
  • 4:05 - 4:12
    This is going to be x squared is
    equal to 16 or x is equal to 4.
  • 4:12 - 4:15
    Now that's our only
    critical point we have,
  • 4:15 - 4:17
    so that's probably
    the x value that
  • 4:17 - 4:20
    minimizes our sum of
    squares right over here.
  • 4:20 - 4:22
    But let's make sure
    it's a minimum value.
  • 4:22 - 4:25
    And to do that, we can just
    do our second derivative test.
  • 4:25 - 4:26
    So let's figure out.
  • 4:26 - 4:28
    Let's take the
    second derivative s
  • 4:28 - 4:31
    prime prime of x and figure
    out if we are concave upwards
  • 4:31 - 4:34
    or downwards when
    x is equal to 4.
  • 4:34 - 4:38
    So s prime prime of x is
    going to be equal to 2.
  • 4:38 - 4:41
    And then we're going to have
    negative 3 times negative 512.
  • 4:41 - 4:45
    So I'll just write that
    as plus 3 times 512.
  • 4:45 - 4:48
    That's going to be 1,536.
  • 4:48 - 4:49
    Is that right?
  • 4:49 - 4:51
    Yeah, 3 times 500
    is 1,500, 3 times 12
  • 4:51 - 4:54
    is 36, x to the
    negative 4 power.
  • 4:58 - 4:59
    And this thing right
    over here is actually
  • 4:59 - 5:01
    going to be positive for any x.
  • 5:05 - 5:08
    x to the negative 4, even
    if the negative x value,
  • 5:08 - 5:09
    that's going to be positive.
  • 5:09 - 5:11
    Everything else is positive.
  • 5:11 - 5:13
    This thing is always positive.
  • 5:13 - 5:19
    So we are always in a
    concave upwards situation.
  • 5:19 - 5:22
    Concave upwards means that
    our graph might look something
  • 5:22 - 5:23
    like that.
  • 5:23 - 5:25
    Actually, I don't want to
    draw the little squiggle.
  • 5:25 - 5:27
    It might look
    something like that.
  • 5:27 - 5:29
    And you see there's a reason why
    the second derivative implies
  • 5:29 - 5:32
    concave upwards, a second
    derivative positive
  • 5:32 - 5:35
    means that our derivative
    is constantly increasing.
  • 5:35 - 5:37
    So the derivative is
    constantly increasing.
  • 5:37 - 5:40
    It's negative, less
    negative, even less negative.
  • 5:40 - 5:41
    Let me do it in a
    different color.
  • 5:41 - 5:45
    You see it's negative, less
    negative, even less negative,
  • 5:45 - 5:48
    0, positive, more positive.
  • 5:48 - 5:50
    So it's increasing
    over the entire place.
  • 5:50 - 5:53
    So if you have a
    critical point where
  • 5:53 - 5:58
    the derivative is equal to 0,
    so the slope is equal to 0,
  • 5:58 - 6:00
    and it's concave upwards,
    you see pretty clearly
  • 6:00 - 6:04
    that we have minimized
    the function.
  • 6:04 - 6:07
    So what is y going
    to be equal to?
  • 6:07 - 6:08
    We actually don't even
    have to figure out
  • 6:08 - 6:10
    what y has to be
    equal to in order
  • 6:10 - 6:12
    to minimize the sum of squares.
  • 6:12 - 6:13
    We could just put
    it back into this.
  • 6:13 - 6:17
    But just for fun, we see that
    y would be negative 16 over x.
  • 6:17 - 6:21
    So y would be equal
    to negative 4.
  • 6:21 - 6:24
    And we could just figure out
    now what our sum of squares is.
  • 6:24 - 6:26
    Our minimum sum of
    squares is going
  • 6:26 - 6:32
    to be equal to 4 squared,
    which is 16 plus negative 4
  • 6:32 - 6:36
    squared plus another 16,
    which is equal to 32.
  • 6:36 - 6:37
    Now I know some of you
    might be thinking, hey,
  • 6:37 - 6:39
    I could have done
    this without calculus.
  • 6:39 - 6:42
    I could have just tried out
    numbers whose product is
  • 6:42 - 6:46
    negative 16 and I probably would
    have tried out 4 and negative 4
  • 6:46 - 6:47
    in not too much time
    and then I would
  • 6:47 - 6:50
    have been able to maybe figure
    out it's lower than if I did
  • 6:50 - 6:54
    2 and negative 8 or negative
    2 and 8 or 1 and 16.
  • 6:54 - 6:55
    And that's true,
    you probably would
  • 6:55 - 6:56
    have been able to do that.
  • 6:56 - 6:58
    But you still wouldn't
    have been able to feel good
  • 6:58 - 7:00
    that that was a minimum
    value, because you wouldn't
  • 7:00 - 7:03
    have tried out 4.01 or 4.0011.
  • 7:03 - 7:06
    In fact, you couldn't have tried
    out all of the possible values.
  • 7:06 - 7:08
    Remember, we didn't say
    that this is only integers.
  • 7:08 - 7:13
    It just happened to be that
    our values just worked out
  • 7:13 - 7:15
    to be integers in
    this situation.
  • 7:15 - 7:17
    You can imagine what would
    happen if the problem wasn't
  • 7:17 - 7:20
    if their product is
    negative 16, but what
  • 7:20 - 7:23
    if their product is negative 17?
  • 7:23 - 7:26
    Or what if the product
    is negative 16.5?
  • 7:26 - 7:28
    Or what if their
    product was pi squared?
  • 7:28 - 7:30
    Then you wouldn't be able
    to try everything else out
  • 7:30 - 7:32
    and you would have
    to resort to doing
  • 7:32 - 7:35
    what we did in this video.
Title:
Optimization: sum of squares | Applications of derivatives | AP Calculus AB | Khan Academy
Description:

more » « less
Video Language:
English
Team:
Khan Academy
Duration:
07:35

English subtitles

Revisions Compare revisions