If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Taylor & Maclaurin polynomials intro (part 2)

AP.CALC:
LIM‑8 (EU)
,
LIM‑8.A (LO)
,
LIM‑8.A.1 (EK)
,
LIM‑8.A.2 (EK)
,
LIM‑8.B (LO)
,
LIM‑8.B.1 (EK)

## Video transcript

in the last several videos we learn how we can approximate an arbitrary function but a function that is differentiable and twice and thrice differentiable and all of the rest how we can approximate a function around X is equal to zero using a polynomial if we if we just have a first-degree polynomial which is just a constant you can approximate it with a horizontal line that just goes through that point not a great approximation if you have a first-degree polynomial you can at least get the slope right at that point if you get to a second-degree polynomial you can get something that that hugs the function a little bit longer if you go to a third-degree polynomial may be something that hugs the function even a little bit longer than that but all of that was around was focused on approximating the function around X is equal to zero and that's why we called the Maclaurin series or the Taylor series at X is equal to zero what I want to do now is expand it a little bit generalize it a little bit and focus on the Taylor expansion at x equals anything so let's say we want to approximate this function when X so this is our x axis when X is equal to C so we can do the exact same thing we could say look our first approximation is that F of is that our polynomial our polynomial at C should be equal to or actually even let me better our polynomial could just be at least if it's just going to be a constant if it's going to be constant it should at least equal the function whatever the function equals at C so it should just equal f of C F of C is a constant it's that value right over there we're assuming that C is given and then you would have this would just be a horizontal line that goes through F of C that's P of X is equal to F of C not a great approximation but then we can try to go for this having this constraint matched plus having the derivative matched so what this constraint gave us just as a reminder this gave us the fact that at least P of C the approximation at C our polynomial at C at least is going to be equal to F of C right if you put C over here it doesn't change what's on the right-hand side because this is just going to be a constant now let's get the constraint one more step what if we want a situation where what if we want a situation where this is true and and we want the derivative of our polynomial to be the same thing as the derivative of our function when either of them are at C so for this situation what if we set up our polynomial and you'll see a complete parallel to what we did in earlier videos we're just going to shift it a little bit for the fact that we're not at zero so now let's define P of X to be equal to F of C F of C plus F prime of C plus F prime of C so whatever the slope is at this point of the function whatever the function slope is x times you see something slightly different over here X minus C now let's think about why we put this what this minus C is doing what this minus C is doing so let's test first of all that we didn't mess up our previous constraint so let's evaluate this at C so now we know that P of C and I'm using this exact example so P of C let me just in a new color let me try it out so P that's not a new color P of C P of C is going to be equal to F of C plus F prime of C times C minus C wherever you see an X you put a C in there C minus C well this term right over here is going to be 0 and so this whole term right over here is going to be 0 and so you're just left with you're just left with P of C is equal to F of C you're just left with that constraint right over there and the only reason why we were able to blank out this last the second term right over here is because it we had F prime of C times X minus C the X minus C makes all of the terms after this irrelevant we can go now verify that this is now true so let's try so P prime of C P or I should say P prime of X P prime of X is going to be the derivative of this which is just zero because this is going to be a constant plus the derivative of this right over here and what's that going to be well that's going to be you can expand this out to be F prime of C times X minus F prime of C times C which would just be constant so if you take the derivative of this thing right here you're just going to be left with an F prime F prime of C so the derivative of our polynomial is now constant so obviously obviously if you were to evaluate this at C P Prime at C you're going to get F prime of C so once again it meets it meets the second constraint and now when you have both of these terms maybe our approximation will look something like this it'll at least have the right slope it'll at least have the right slope as f of X our approximation is getting a little bit better and if we keep doing this and we're using the exact same logic that we used when we did it around zero when we did the Maclaurin expansion you get the the Taylor expansion the general Taylor expansion for the for the approximation of f of X around C to be the polynomial so the polynomial P of X is going to be equal to and I'll just expand it out and this is very similar to what we saw before F of C plus F prime of C times X minus C you might even guess what the next few terms are going to be it's the exact same logic watch the videos of Maclaurin series where I go a few more terms into it it becomes a little bit more complicated taking the second and third derivatives and all of the rest just because you have you have to kind of expand out these binomials it's the exact same logic so then you have plus your second degree term your second degree F prime prime of C divided by two factorial and this just like what we saw the Maclaurin expansion and just to be clear there's you couldn't say that there's a 1 factorial down here I didn't take the trouble to write it because it doesn't change the value and then that times X minus C squared plus the third derivative of the function evaluated at sea over three factorial times X minus C to the third power and I think you get the general idea you can keep adding more and more and more terms like this unfortunately it makes it a little bit harder you specially if you if you have you know if you're willing to do the work it's not so bad but this adding this X instead of having just X here instead of just having an x squared here having an X minus C squared and having an X minus C to the third this makes the analytical math a little bit hairier a little bit more difficult but this will approximate your function better as you add more and more terms around an arbitrary value as opposed to just around X is equal to 0 and I'll show you that using Wolfram Alpha in the next video
AP® is a registered trademark of the College Board, which has not reviewed this resource.