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.

Main content

Current time:0:00Total duration:12:59

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)

I've got an arbitrary function here and what we're going to try to do is approximate this arbitrary function we don't know what it is using a polynomial we'll keep adding terms to that polynomial but to do this we're going to assume that we can evaluate the function at 0 that it gives us some value and that we can't eat that we can keep taking the derivative of the function and evaluating the the first the second and the third derivatives so on and so forth at 0 as well so we're assuming we're assuming that we know what f of 0 is we're assuming that we know what F prime of 0 is we're assuming that we know the second derivative at 0 we're assuming that we know the third derivative at 0 so maybe I'll write it third derivative I'll just write F prime prime at 0 so forth and so on so let's think about how we can approximate this using polynomials of ever-increasing lengths so if we could have a polynomial just one term and would just be a constant term so this would be a polynomial of degree 0 and if we have a constant term we at least might want to make that that constant polynomial it really is just a constant function equal the function at f of 0 so at first maybe we just want P of 0 where Pala note the putt where P is a polynomial that we're going to construct we want P of 0 to be equal to F of 0 so if we want to do that using a polynomial of only one term of only one constant term we can just set we can just set P of X is equal to F of 0 so if I were to graph it it would look like this it would just be a horizontal line at F of 0 and you could say Sal that's a horrible approximation it only approximates the function at this point it looks like we got lucky at a couple of other points but it's really bad everywhere else and I would tell you well try to do any better using a horizontal line at least we got it right at F of 0 so this is about as this is about as good as we can do with just a constant and even though I just want to remind you this might not look like a constant but we're assuming that given the function we can evaluate it at 0 and that'll just give us a number so whatever number that was we would put it right over here and we'd say P of X is equal to that number it would just be a horizontal line right there at F of zero but that obviously is not so great so let's add some more constraints beyond the fact that we want P of 0 to be equal to F of 0 let's say that we also want we also want P Prime at 0 to be the same thing as F Prime at 0 let me do this in a new color so we also want in the new color we also want that's not a new color we also want P Prime we want the first derivative of our polynomial what evaluated at 0 to be the same thing as the first derivative of the function when evaluated at 0 and we don't want to lose this right over here so what if what if we set P of X as being equal to f of 0 so we're taking our old P of X but now we're going to add another term so the derivatives match up Plus F prime of 0 times X so let's think about this a little bit if we use this as our new polynomial what happens P what is P of 0 P of 0 is going to be equal to you're going to have F of 0 F of 0 plus whatever this derivative F prime of 0 is x 0 right if you put a 0 in for X this term is just going to be 0 so you're going to be left with P of 0 is equal to f of 0 that's cool that's just as good as our first version now what's the derivative over here so the derivative is P prime P prime of X is equal to take the derivative of this this is just a constant so it's derivative is 0 the derivative of a coefficient times X is just going to be the coefficient so it's going to be F prime of 0 so if you evaluate it at 0 so P prime of 0 or the derivative of our polynomial evaluated at 0 I know it's a little weird because we're not using you know we're doing all P prime of X of F of 0 and all of this but just remember what's the variable what's the constants and hopefully it'll make sense so this is just obviously going to be F prime of 0 its derivative is a constant value this is a constant value right here we're assuming that we could take the derivative of our function and evaluate that thing at 0 to give a constant value so if you deprive of X is equal to this constant value obviously P prime of X evaluated at zero is going to be that value but what's cool about what's cool about this right here this polynomial that has a zero degree term and a first degree term is now this polynomial is equal to our function at X is equal to zero and it also has the same first derivative it also has the same slope at X is equal to zero so this thing will look this new polynomial with two terms getting a little bit better it will look it will look something like that it will essentially it will essentially have it look like a tangent line at F at F of zero at X is equal to zero so we're doing better but still not a super good approximation it kind of goes is going in the same general direction as our function around zero but maybe we can do better by making sure that they have the same second derivative and to try to have the same second derivative while still having the same first derivative and the same value at zero let's try to do that let's try to do something interesting let's define let's define P of X so this let's make it clear this was our first try this is our second try right over here and I'm about to embark on our third dry so our third try my goal is that the value of my polynomial is the same as the value of the function at 0 they have the same derivative at 0 and they also have the same second derivative at 0 so let's define my polynomial to be equal to so I'm going to do the first two terms of these guys right over here so it's going to be it's going to be f of 0 plus F prime of 0 times X so exactly what we did here but now let me add another term I'll do the other term in a new color plus plus and I'm going to put a 1/2 out here and hopefully it might make sense why I'm about to do this plus 1/2 times f the second derivative of our function evaluated at 0 x squared and when we evaluate the derivative of this I think you'll see why this one half is there because now let's evaluate let's evaluate this and its derivatives at zero so if we evaluate P of 0 P of 0 is going to be equal to what well you have this constant term if you evaluate at 0 this X and this x squared are both going to be 0 so those terms going to go away so P of 0 is still equal to F of 0 if you take the derivative of P of X so let me take the derivative right here I'll do it in yellow so the derivative of my new P of X is going to be equal to so this term is going to go away it's a constant term it's going to be equal to F prime of 0 that's the coefficient on this plus tape this is the power rule right here 2 times 1/2 is just 1 plus F prime prime of 0 times X take the 2 multiply it times 1/2 and decrement that 2 right there and I think you now have a sense of why we put the 1/2 there it's kind of counter it's it's it's it's making it so that we don't end up with the 2 coefficient out front now what is P prime of 0 so let me write it right here P prime of 0 is what well this term right here is just going to be 0 so just you're left with this constant value right over here so it's going to be F prime of 0 so so far our third generation polynomial has all the properties of the first two and let's see how it does on the third on its third derivative so let's see so if we are so I should say the second derivative so pre P prime prime of X is equal to this is a constant so it's derivative is 0 so then you just take the coefficient on the second term is equal to F prime prime of 0 so what's the second derivative of P evaluated 0 well it's just going to be this constant value it's going to be F prime prime of 0 so notice by adding this term now not only is our the is our a polynomial value the same thing as our function value at 0 its derivative at 0 is the same thing as our as the derivative of the function at 0 and it's second derivative at 0 is the same thing as the second derivative of the function at 0 so we're getting pretty good at this and you might guess that there's a pattern here we could every term we add add it'll allow us it'll allow us to set up the situation so that the the nth derivative of our approximation at 0 will be the same thing as the nth derivative of our function at 0 so in general if we wanted to keep doing this if we had a lot of time on our hands and we wanted to just keep adding terms to our polynomial we could and let me do this in a new color maybe I'll do it in a color I already used we could make our polynomial approximation we could make our problem on polynomial approximation so the first term the constant term will just be f of zero then the next term will be F prime of zero times X then the next term will be F prime prime of 0 times 1/2 times x squared I just rewrote that in a slightly different order then the next term if we want to make their third derivatives the same at zero would be F prime prime prime of zero the third derivative of the function at zero times one half times one third so 1 over 2 times 3 times X to the third and we can keep going maybe you'll start to see a pattern here plus if we want to make their fourth derivatives at zero coincide it would be the fourth derivative of the function I could put a four up there but this is really emphasizing it's the fourth derivative at zero times one over and I'll change the order instead of writing in increasing order I'll write it as 4 times 3 times 2 times times X to the fourth and you can verify it for yourself if we just had this only and if you were taking the fourth derivative of this evaluate it at 0 it'll be the same thing as the fourth derivative of the function evaluated at 0 and in general you can keep adding terms where the nth term will look like this the nth derivative of your function evaluated at 0 times X to the N over over N factorial notice this is the same thing as 4 factorial 4 factorial is equal to 4 times 3 times 2 times 1 you don't have to write the 1 there but it you could put it there this right here is the same thing as 3 factorial 3 times 2 times 1 I didn't put the 1 there this right here is the same thing as 2 factorial 2 times 1 this is the same thing we didn't do write anything but you could divide this by 1 factorial which is the same thing as 1 and so and you could divide this by 0 factorial which also happens to be 1 we won't have to study it too much over here but this general series that that I've kind of set up right here is called the Maclaurin series Maclaurin series and you can approximate a polynomial and we'll see at least of some pretty powerful results later on but what happens and I don't have the computing power in my brain to draw the graph properly is that the when you when only the function is equal you get that horizontal line when you make the functions and the function at when you make the function equal at 0 and their first derivative is equal to 0 then you have something that looks like the tangent line when you add another degree it might approximate the polynomial something like this when you add another degree it might look something it might look something like that and as you keep adding more and more degrees it get starts or when you keep adding more and more terms it gets closer and closer around especially as you get close to X is equal to 0 but in theory if you add an infinite number of terms you shouldn't be able to I haven't proven this to you so that's why I'm saying it's in theory I haven't proved it yet to you but if you had an infinite number of terms it should be all of the derivatives should be the same and then the the the function should pretty much look like each other in the next video I'll do this with some actual functions just so it makes a little bit more sense and just so you know the Maclaurin series is a special case of the Taylor series because we're centering it at 0 and when you're doing a Taylor series you could pick any center point but we'll focus on the Maclaurin we'll focus on the Maclaurin right now