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:6:01

Video transcript

I've talked a lot about using polynomials to approximate functions but what I wanna do in this video is actually show you that the approximation is actually happening so right over here and I'm using Wolfram Alpha for this it's a very cool website you can do all sorts of crazy mathematical things on it so it's wolf or Wolfram Alpha dot-com and I got this copied and pasted from them I met Stephen Wolfram at a conference not too long ago he said yes you definitely use Wolfram Alpha in your videos and I said great I will and so that's what I'm doing right here and it's super useful because what it does is is and we could have calculated a lot of this on our own or even done it on a graphing calculator but you already can do it just with one step on Wolfram Alpha is see how well we can approximate sine of X using using a a you could call it a Maclaurin series expansion or you can call it a Taylor series expansion at X is equal to zero using more and more terms and having a good feel that for the fact that the more terms we add the better it hugs the sine curve so this over here in orange is sine of X that should hopefully look fairly familiar to you and in previous videos we figured out what that Maclaurin expansion for sine of X is and Wolfram Alpha does it for us as well they actually calculate the factorials 3 factorial is 6 5 factorial is 120 so on and so forth but what's interesting is here is you can pick how many of the approximations you want to graph and so what they did is if you want just one term of the approximation so if we didn't have this whole thing if we just said that our polynomial is equal to X what does that look like well that's going to be this graph right over here and they tell us which term how many terms were used by how many dots there are right over here which i think is which i think is pretty clever so this right here that is the function P of X is equal to X and so it's a very rough approximation although for sine of X it doesn't do a bad job it hugs it hugs the sine curve right over there and then it starts to veer away from the sine curve again you add another term so if you have the X minus X to the third over 6 so now you have two terms in the expansion so or I guess we should say that we have we're up to the third order term because that's how they're numbering the dots because they're not talking about the they're not talking about the number of terms we talk about the order of the term so they have one dot here because we have a for only one first degree term when we have two terms here since we look we kind of when you do the the expansion for sine of X it doesn't have a second degree term we now have a third degree polynomial looks approximation and so let's look at the third degree we should look for three dots that's this curve right over here so if you just have that first term you just get that straight line you add the negative x to the third over six to that X you now get a curve that looks like this now gets a curve that looks like this and notice it starts hugging sine a little bit earlier and it keeps hugging it a little bit later so once again just adding that second term does a pretty good job it hugs the sine curve pretty well especially around smaller numbers you add another term and now we're up to now we're at an order five polynomial right over here so X minus X to the third over six plus X to the fifth over 120 so let's look for the five dots so that's this one right over here one two three four five so that's this curve right over here and notice it begins hugging the line a little bit earlier then the magenta version and it keeps hugging it a little bit longer so then it keeps hugging it a little bit it keeps hugging it a little bit longer then it flips back up like this so it hugged it a little bit longer and you can see I keep going if you have all these first four terms gives us a seventh degree polynomial so let's look for the seven dots are here so they come in just like this they come in like this and then once again it hugs the curves sooner then when we just had the first three terms and it keeps hugging the curve all the way until all the way until here and then the last one if you have all of these terms up to X to the ninth it does it even more you start here hug the curve longer than the others and goes out and if you think about it it makes sense because what's happening here is each each successive term that we're adding to the expansion they have a higher degree of they have a higher degree of X over a much much much much larger number so for small X values so when you're close to the origin for small X values this denominator is going to overpower the numerator especially when you're below one because when you take something that has absolute value less than one to a power you're actually shrinking it down so when you're close to the origin these these latter terms don't matter much so you're kind of not losing you're not losing some of the precision of some of the earlier terms when these tweaking terms come in these come in when the numerator can start to overpower the denominator so this this last term it starts to become relevant out here it starts to become relevant out here where all of a sudden X to the ninth can overpower 360 2880 and the same thing on the negative side so hopefully this gives you a sense we only have one two three four five terms here imagine what would happen if we had an infinite number of terms I think you'd get a pretty good sense that it would kind of hug the sine curve out to infinity so hopefully that that makes you feel a little bit better about this and for fun you might want to go type in you can type in Taylor expansion at zero and sine of X or Maclaurin expansion or Maclaurin series for sine of X cosine of X e to the X at at Wolfram Alpha calm and try it out for a bunch of different functions and you can try it and you can keep adding or taking away terms to see how well it hugs the curve
AP® is a registered trademark of the College Board, which has not reviewed this resource.