< Return to Video

Proof: Bounding the Error or Remainder of a Taylor Polynomial Approximation

  • 0:01 - 0:04
    In the last video, we started to explore
    the notion of an error function.
  • 0:04 - 0:06
    Not to be confused with the expected value
  • 0:06 - 0:08
    because it really does reflect the same
    notation.
  • 0:08 - 0:10
    But here E is for error.
  • 0:10 - 0:11
    And we could also thought it will
  • 0:11 - 0:13
    some times here referred to as Reminder
    function.
  • 0:13 - 0:17
    And we saw it's really just the difference
    as we,
  • 0:17 - 0:20
    the difference between the function and
    our approximation of the function.
  • 0:20 - 0:26
    So for example, this, this distance right
    over here, that is our error.
  • 0:26 - 0:30
    That is our error at the x is equal to b.
  • 0:30 - 0:32
    And what we really care about is the
    absolute value of it.
  • 0:32 - 0:35
    Because at some points f of x might be
    larger than the polynomial.
  • 0:35 - 0:38
    Sometimes the polynomial might be larger
    than f of x.
  • 0:38 - 0:41
    What we care is the absolute distance
    between them.
  • 0:41 - 0:42
    And so what I want to do in this video is
  • 0:42 - 0:48
    try to bound, try to bound our error at
    some b.
  • 0:48 - 0:50
    Try to bound our error.
  • 0:50 - 0:53
    So say it's less than or equal to some
    constant value.
  • 0:53 - 0:56
    Try to bound it at b for some b is greater
    than a.
  • 0:56 - 0:58
    We're just going to assume that b is
    greater than a.
  • 0:58 - 1:02
    And we saw some tantalizing, we, we got to
    a bit of a tantalizing
  • 1:02 - 1:05
    result that seems like we might be able to
    bound it in the last video.
  • 1:05 - 1:08
    We saw that the n plus 1th derivative of
    our error
  • 1:08 - 1:12
    function is equal to the n plus 1th
    derivative of our function.
  • 1:12 - 1:15
    Or their absolute values would also be
    equal to.
  • 1:15 - 1:18
    So if we could somehow bound the n plus
    1th derivative
  • 1:18 - 1:22
    of our function over some interval, an
    interval that matters to us.
  • 1:22 - 1:25
    An interval that maybe has b in it.
  • 1:25 - 1:30
    Then, we can, at least bound the n plus
    1th derivative our error function.
  • 1:30 - 1:31
    And then, maybe we can do a little bit of
  • 1:31 - 1:36
    integration to bound the error itself at
    some value b.
  • 1:36 - 1:37
    So, let's see if we can do that.
  • 1:37 - 1:40
    Well, let's just assume, let's just assume
    that we're in a reality where
  • 1:40 - 1:44
    we do know something about the n plus1
    derivative of f of x.
  • 1:44 - 1:46
    Let's say we do know that this.
  • 1:46 - 1:49
    We do it in a color I that haven't used
    yet.
  • 1:49 - 1:51
    Well, I'll do it in white.
  • 1:51 - 1:55
    So let's say that that thing over there
    looks something like that.
  • 1:55 - 1:59
    So that is f the n plus 1th derivative.
  • 1:59 - 2:00
    The n plus 1th derivative.
  • 2:00 - 2:04
    And I only care about it over this
    interval right over here.
  • 2:04 - 2:06
    Who cares what it does later, I just gotta
    bound it over the interval
  • 2:06 - 2:10
    cuz at the end of the day I just wanna
    balance b right over there.
  • 2:10 - 2:13
    So let's say that the absolute value of
    this.
  • 2:13 - 2:14
    Let's say that we know.
  • 2:14 - 2:17
    Let me write it over here, let's say that
    we know.
  • 2:19 - 2:24
    We know that the absolute value of the n
    plus 1th derivative, the n plus 1th.
  • 2:24 - 2:27
    And, I apologize I actually switch between
    the capital N and
  • 2:27 - 2:28
    the lower-case n and I did that in the
    last video.
  • 2:28 - 2:30
    I shouldn't have, but now that you know
  • 2:30 - 2:32
    that I did that hopefully it doesn't
    confuse it.
  • 2:32 - 2:35
    N plus 1th, so let's say we know that the
    n plus 1th
  • 2:35 - 2:40
    derivative of f of x, the absolute value
    of it, let's say it's bounded.
  • 2:40 - 2:43
    Let's say it's less than or equal to some
    m
  • 2:43 - 2:45
    over the interval, cuz we only care about
    the interval.
  • 2:45 - 2:48
    It might not be bounded in general, but
    all we
  • 2:48 - 2:50
    care is it takes some maximum value over
    this interval.
  • 2:50 - 2:57
    So over, over, over the interval x, I
    could write it this way,
  • 2:57 - 3:04
    over the interval x is a member between a
    and b, so this includes both of them.
  • 3:04 - 3:06
    It's a closed interval, x could be a, x
  • 3:06 - 3:10
    could be b, or x could be anything in
    between.
  • 3:10 - 3:12
    And we can say this generally that,
  • 3:12 - 3:15
    that this derivative will have some
    maximum value.
  • 3:15 - 3:20
    So this is its, the absolute value,
    maximum value, max value, m for max.
  • 3:20 - 3:24
    We know that it will have a maximum value,
    if this thing is continuous.
  • 3:24 - 3:27
    So once again we're going to assume that
    it is continuous,
  • 3:27 - 3:31
    that it has some maximum value over this
    interval right over here.
  • 3:31 - 3:35
    Well this thing, this thing right over
    here, we know is the
  • 3:35 - 3:39
    same thing as the n plus 1 derivative of
    the error function.
  • 3:39 - 3:46
    So then we know, so then that, that
    implies, that implies that,
  • 3:46 - 3:52
    that implies that the, that's a new color,
    let me do that in blue, or that green.
  • 3:52 - 3:59
    That implies that the, the, the end plus
    one derivative of the error function.
  • 3:59 - 4:00
    The absolute value of it because these are
    the
  • 4:00 - 4:05
    same thing is also, is also bounded by m.
  • 4:05 - 4:08
    So that's a little bit of an interesting
    result but it gets us no where near there.
  • 4:08 - 4:11
    It might look similar but this is the n
    plus 1 derivative of the error function.
  • 4:11 - 4:14
    And, and we'll have to think about how we
    can get an m in the future.
  • 4:14 - 4:16
    We're assuming that we some how know it
    and maybe
  • 4:16 - 4:19
    we'll do some example problems where we
    figure that out.
  • 4:19 - 4:20
    But this is the m plus 1th derivative.
  • 4:20 - 4:22
    We bounded it's absolute value but we
  • 4:22 - 4:24
    really want to bound the actual error
    function.
  • 4:24 - 4:28
    The 0 is the derivative, you could say,
    the actual function itself.
  • 4:28 - 4:31
    What we could try to integrate both sides
    of this and see
  • 4:31 - 4:35
    if we can eventually get to e, to get to e
    of x.
  • 4:35 - 4:38
    To get our, to our error function or our
    remainder function so let's do that.
  • 4:38 - 4:44
    Let's take the integral, let's take the
    integral of both sides of this.
  • 4:44 - 4:46
    Now the integral on this left hand side,
    it's a little interesting.
  • 4:46 - 4:48
    We take the integral of the absolute
    value.
  • 4:48 - 4:52
    It would be easier if we were taking the
    absolute value of the integral.
  • 4:52 - 4:54
    And lucky for us, the way it's set up.
  • 4:54 - 4:56
    So let me just write a little aside here.
  • 4:56 - 4:59
    We know generally that if I take, and it's
    something for you to think about.
  • 4:59 - 5:03
    If I take, so if I have two options, if I
    have two
  • 5:03 - 5:09
    options, this option versus and I don't
    know, they look the same right now.
  • 5:11 - 5:13
    I know they look the same right now.
  • 5:13 - 5:16
    So over here, I'm gonna have the integral
    of the absolute value
  • 5:16 - 5:20
    and over here I'm going to have the
    absolute value of the interval.
  • 5:20 - 5:24
    Which of these is going to be, which of
    these can be larger?
  • 5:24 - 5:27
    Well, you just have to think about the
    scenarios.
  • 5:27 - 5:30
    So, if f of x is always positive over the
    interval that
  • 5:30 - 5:33
    you're taking the integration, then
    they're going to be the same thing.
  • 5:33 - 5:35
    They're, you're gonna get positive values.
  • 5:35 - 5:37
    Take the absolute of a value of a positive
    value.
  • 5:37 - 5:38
    It doesn't make a difference.
  • 5:38 - 5:41
    What matters is if f of x is negative.
  • 5:41 - 5:44
    If f of x, if f of x is negative the
  • 5:44 - 5:48
    entire time, so if this our x-axis, that
    is our y-axis.
  • 5:48 - 5:51
    If f of x is, well we saw if it's positive
    the entire
  • 5:51 - 5:55
    time, you're taking the absolute value of
    a positive, absolute value of positive.
  • 5:55 - 5:56
    It's not going to matter.
  • 5:56 - 5:58
    These two things are going to be equal.
  • 5:58 - 6:01
    If f of x is negative the whole time, then
    you're going
  • 6:01 - 6:05
    to get, then this integral going to
    evaluate to a negative value.
  • 6:05 - 6:07
    But then, you would take the absolute
    value of it.
  • 6:07 - 6:10
    And then over here, you're just going to,
    this is, the integral going to
  • 6:10 - 6:13
    value to a positive value and it's still
    going to be the same thing.
  • 6:13 - 6:15
    The interesting case is when f of x is
    both
  • 6:15 - 6:19
    positive and negative, so you can imagine
    a situation like this.
  • 6:19 - 6:23
    If f of x looks something like that, then
  • 6:23 - 6:26
    this right over here, the integral, you'd
    have positive.
  • 6:26 - 6:29
    This would be positive and then this would
    be negative right over here.
  • 6:29 - 6:31
    And so they would cancel each other out.
  • 6:31 - 6:32
    So this would be a smaller value than
  • 6:32 - 6:36
    if you took the integral of the absolute
    value.
  • 6:36 - 6:39
    So the integral, the absolute value of f
    would look something like this.
  • 6:39 - 6:42
    So all of the areas are going to be, if
    you view the
  • 6:42 - 6:43
    integral, if you view this it is
  • 6:43 - 6:45
    definitely going to be a definite
    integral.
  • 6:45 - 6:48
    All of the areas, all of the areas would
    be positive.
  • 6:48 - 6:50
    So when you it, you are going to get a
  • 6:50 - 6:53
    bigger value when you take the integral of
    an absolute value.
  • 6:53 - 6:55
    Then you will, especially when f of x
  • 6:55 - 6:57
    goes both positive and negative over the
    interval.
  • 6:57 - 7:02
    Then you would if you took the integral
    first and then the absolute value.
  • 7:02 - 7:04
    Cuz once again, if you took the integral
    first, for something like
  • 7:04 - 7:07
    this, you'd get a low value cause this
    stuff would cancel out.
  • 7:07 - 7:10
    Would cancel out with this stuff right
    over here then you'd
  • 7:10 - 7:13
    take the absolute value of just a lower, a
    lower magnitude number.
  • 7:13 - 7:16
    And so in general, the integral, the
  • 7:16 - 7:18
    integral, sorry the absolute value of the
    integral
  • 7:18 - 7:23
    is going to be less than or equal to the
    integral of the absolute value.
  • 7:23 - 7:25
    So we can say, so this right here is the
    integral of
  • 7:25 - 7:28
    the absolute value which is going to be
    greater than or equal.
  • 7:28 - 7:30
    What we have written over here is just
    this.
  • 7:30 - 7:32
    That's going to be greater than or equal
    to, and I
  • 7:32 - 7:35
    think you'll see why I'm why I'm doing
    this in a second.
  • 7:35 - 7:40
    Greater than or equal to the absolute
    value, the absolute
  • 7:40 - 7:46
    value of the integral of, of the n plus
    1th derivative.
  • 7:46 - 7:49
    The n plus 1th derivative of, x, dx.
  • 7:49 - 7:51
    And the reason why this is useful, is that
    we can still
  • 7:51 - 7:55
    keep the inequality that, this is less
    than, or equal to this.
  • 7:55 - 7:59
    But now, this is a pretty straight forward
    integral to evaluate.
  • 7:59 - 8:01
    The indo, the anti-derivative of the n
    plus
  • 8:01 - 8:04
    1th derivative, is going to be the nth
    derivative.
  • 8:04 - 8:07
    So this business, right over here.
  • 8:07 - 8:10
    Is just going to the absolute value of the
    nth derivative.
  • 8:11 - 8:16
    The absolute value of the nth derivative
    of our error function.
  • 8:16 - 8:17
    Did I say expected value?
  • 8:17 - 8:18
    I shouldn't.
  • 8:18 - 8:19
    See, it even confuses me.
  • 8:19 - 8:20
    This is the error function.
  • 8:20 - 8:22
    I should've used r, r for remainder.
  • 8:22 - 8:23
    But this all error.
  • 8:23 - 8:25
    The, noth, nothing about probability or
    expected value in this video.
  • 8:25 - 8:26
    This is.
  • 8:26 - 8:27
    E for error.
  • 8:27 - 8:30
    So anyway, this is going to be the nth
    derivative of our
  • 8:30 - 8:33
    error function, which is going to be less
    than or equal to this.
  • 8:33 - 8:37
    Which is less than or equal to the
    anti-derivative of M.
  • 8:37 - 8:39
    Well, that's a constant.
  • 8:39 - 8:43
    So that's going to be mx, mx.
  • 8:43 - 8:44
    And since we're just taking indefinite
    integrals.
  • 8:44 - 8:48
    We can't forget the idea that we have a
    constant over here.
  • 8:48 - 8:50
    And in general, when you're trying to
    create an upper
  • 8:50 - 8:52
    bound you want as low of an upper bound as
    possible.
  • 8:52 - 8:57
    So we wanna minimize, we wanna minimize
    what this constant is.
  • 8:57 - 9:00
    And lucky for us, we do have, we do know
    what this,
  • 9:00 - 9:04
    what this function, what value this
    function takes on at a point.
  • 9:04 - 9:08
    We know that the nth derivative of our
    error function at a is equal to 0.
  • 9:08 - 9:10
    I think we wrote it over here.
  • 9:10 - 9:12
    The nth derivative at a is equal to 0.
  • 9:12 - 9:15
    And that's because the nth derivative of
    the function and the
  • 9:15 - 9:20
    approximation at a are going to be the
    same exact thing.
  • 9:20 - 9:23
    And so, if we evaluate both sides of this
    at a, I'll
  • 9:23 - 9:27
    do that over here on the side, we know
    that the absolute value.
  • 9:27 - 9:32
    We know the absolute value of the nth
    derivative at a, we know
  • 9:32 - 9:35
    that this thing is going to be equal to
    the absolute value of 0.
  • 9:35 - 9:35
    Which is 0.
  • 9:35 - 9:38
    Which needs to be less than or equal to
    when you evaluate this
  • 9:38 - 9:43
    thing at a, which is less than or equal to
    m a plus c.
  • 9:43 - 9:45
    And so you can, if you look at this part
  • 9:45 - 9:48
    of the inequality, you subtract m a from
    both sides.
  • 9:48 - 9:51
    You get negative m a is less than or equal
    to c.
  • 9:51 - 9:54
    So our constant here, based on that little
    condition
  • 9:54 - 9:56
    that we were able to get in the last
    video.
  • 9:56 - 10:01
    Our constant is going to be greater than
    or equal to negative ma.
  • 10:01 - 10:04
    So if we want to minimize the constant, if
    we wanna get this as low
  • 10:04 - 10:08
    of a bound as possible, we would wanna
    pick c is equal to negative Ma.
  • 10:08 - 10:10
    That is the lowest possible c that will
  • 10:10 - 10:13
    meet these constraints that we know are
    true.
  • 10:13 - 10:17
    So, we will actually pick c to be negative
    Ma.
  • 10:17 - 10:19
    And then we can rewrite this whole thing
    as the
  • 10:19 - 10:23
    absolute value of the nth derivative of
    the error function.
  • 10:23 - 10:25
    The nth derivative of the error function.
  • 10:25 - 10:26
    Not the expected value.
  • 10:26 - 10:28
    I have a strange suspicion I might have
    said expected value.
  • 10:28 - 10:30
    But, this is the error function.
  • 10:30 - 10:30
    The nth der.
  • 10:30 - 10:33
    The absolute value of the nth derivative
    of the error function
  • 10:33 - 10:39
    is less than or equal to M times x minus
    a.
  • 10:39 - 10:41
    And once again all of the constraints
    hold.
  • 10:41 - 10:44
    This is for, this is for x as part of the
    interval.
  • 10:44 - 10:49
    The closed interval between, the closed
    interval between a and b.
  • 10:49 - 10:50
    But looks like we're making progress.
  • 10:50 - 10:53
    We at least went from the m plus 1
    derivative to the n derivative.
  • 10:53 - 10:55
    Lets see if we can keep going.
  • 10:55 - 10:58
    So same general idea.
  • 10:58 - 11:00
    This if we know this then we know that
  • 11:00 - 11:01
    we can take the integral of both sides of
    this.
  • 11:01 - 11:03
    So we can take the integral of both sides
    of this
  • 11:06 - 11:08
    the anti derivative of both sides.
  • 11:08 - 11:11
    And we know from what we figured out up
    here
  • 11:11 - 11:15
    that something's that's even smaller than
    this right over here.
  • 11:15 - 11:20
    Is, is the absolute value of the integral
    of the expected value.
  • 11:20 - 11:21
    Now [LAUGH] see, I said it.
  • 11:21 - 11:23
    Of the error function, not the expected
    value.
  • 11:23 - 11:24
    Of the error function.
  • 11:24 - 11:27
    The nth derivative of the error function
    of x.
  • 11:27 - 11:30
    The nth derivative of the error function
    of x dx.
  • 11:30 - 11:34
    So we know that this is less than or equal
    to based on the exact same logic there.
  • 11:34 - 11:37
    And this is useful because this is just
    going to be, this is just
  • 11:37 - 11:43
    going to be the nth minus 1 derivative of
    our error function of x.
  • 11:43 - 11:45
    And of course we have the absolute value
    outside of it.
  • 11:45 - 11:47
    And now this is going to be less than or
    equal to.
  • 11:47 - 11:48
    It's less than or equal to this, which is
    less than or equal
  • 11:48 - 11:51
    to this, which is less than or equal to
    this right over here.
  • 11:51 - 11:53
    The anti-derivative of this right over
    here is going
  • 11:53 - 11:58
    to be M times x minus a squared over 2.
  • 11:58 - 12:01
    You could do U substitution if you want or
    you could just say hey look.
  • 12:01 - 12:04
    I have a little expression here, it's
    derivative is 1.
  • 12:04 - 12:06
    So it's implicitly there so I can just
    treat it as kind of a U.
  • 12:06 - 12:09
    So raise it to an exponent and then divide
    that exponent.
  • 12:09 - 12:11
    But once again I'm taking indefinite
    integrals.
  • 12:11 - 12:14
    So I'm going to say a plus C over here.
  • 12:14 - 12:17
    But let's use that same exact logic.
  • 12:17 - 12:19
    If we evaluate this at A, you're going to
    have it.
  • 12:19 - 12:22
    If you evaluate this while, let's evaluate
    both sides of this at A.
  • 12:22 - 12:26
    the left side, evaluated at A, we know, is
    going to be zero.
  • 12:26 - 12:29
    We figured that out, all, up here in the
    last video.
  • 12:29 - 12:32
    So you get, I'm gonna do it on the right
    over here.
  • 12:32 - 12:34
    You get zero, when you valued the left
    side of a.
  • 12:34 - 12:37
    The right side of a, if you, the right
    side of the
  • 12:37 - 12:40
    value of a you get m times a menus a
    square over 2.
  • 12:40 - 12:45
    So you are gonna get 0 plus c, so you are
    gonna get, 0 is less or equal to c.
  • 12:45 - 12:48
    Once again we want to minimize our constant,
  • 12:48 - 12:50
    we wanna minimize our upper boundary up
    here.
  • 12:50 - 12:53
    So we wanna pick the lowest possible c
    that we talk constrains.
  • 12:53 - 12:57
    So the lowest possible c that meets our
    constraint is zero.
  • 12:57 - 13:01
    And so the general idea here is that we
    can keep doing this, we can
  • 13:01 - 13:07
    keep doing exactly what we're doing all
    the way, all the way, all the way until.
  • 13:07 - 13:10
    And so we keep integrating it at the exact
    same, same way that I've
  • 13:10 - 13:14
    done it all the way that we get and using
    this exact same property here.
  • 13:14 - 13:19
    All the way until we get, the bound on the
    error function of x.
  • 13:19 - 13:22
    So you could view this as the 0th
    derivative.
  • 13:22 - 13:23
    You know, we're going all the way to the
  • 13:23 - 13:25
    0th derivative, which is really just the
    error function.
  • 13:25 - 13:28
    The bound on the error function of x is
    going to
  • 13:28 - 13:30
    be less than or equal to, and what's it
    going to be?
  • 13:30 - 13:32
    And you can already see the pattern here.
  • 13:32 - 13:36
    Is that it's going to be m times x, minus
    a.
  • 13:36 - 13:39
    And the exponent, the one way to think
    about it, this exponent
  • 13:39 - 13:43
    plus this derivative is going to be equal
    to n plus 1.
  • 13:43 - 13:47
    Now this derivative is zero so this
    exponent is going to be n plus 1.
  • 13:47 - 13:50
    And whatever the exponent is, you're going
    to have,a nd maybe I should
  • 13:50 - 13:54
    have done it, you're going to have n plus
    one factorial over here.
  • 13:54 - 13:57
    And if say wait why, where does this n
    plus 1 factorial come from?
  • 13:57 - 13:58
    I just had a two here.
  • 13:58 - 14:01
    Well think about what happens when we
    integrate this again.
  • 14:01 - 14:05
    You're going to raise this to the third
    power and then divide by three.
  • 14:05 - 14:07
    So your denominator is going to have two
    times three.
  • 14:07 - 14:09
    Then when you integrate it again, you're
    going to raise
  • 14:09 - 14:11
    it to the fourth power and then divide by
    four.
  • 14:11 - 14:13
    So then your denominator is going to be
    two times three times four.
  • 14:13 - 14:14
    Four factorial.
  • 14:14 - 14:16
    So whatever power you're raising to, the
  • 14:16 - 14:18
    denominator is going to be that power
    factorial.
  • 14:18 - 14:21
    But what's really interesting now is if we
    are
  • 14:21 - 14:24
    able to figure out that maximum value of
    our function.
  • 14:24 - 14:29
    If we're able to figure out that maximum
    value of our function right there.
  • 14:29 - 14:32
    We now have a way of bounding our error
    function
  • 14:32 - 14:36
    over that interval, over that interval
    between a and b.
  • 14:36 - 14:40
    So for example, the error function at b.
  • 14:40 - 14:42
    We can now bound it if we know what an m
    is.
  • 14:42 - 14:49
    We can say the error function at b is
    going to be less than or equal to m times
  • 14:49 - 14:57
    b minus a to the n plus 1th power over n
    plus 1 factorial.
  • 14:57 - 15:00
    So that gets us a really powerful, I guess
    you
  • 15:00 - 15:04
    could call it, result, kinda the, the math
    behind it.
  • 15:04 - 15:07
    And now we can show some examples where
    this could actually be applied.
Title:
Proof: Bounding the Error or Remainder of a Taylor Polynomial Approximation
Description:

more » « less
Video Language:
English
Team:
Khan Academy
Duration:
15:08

English subtitles

Revisions