2007-11-13
Today's nonsense
Not all Taylor are Macluarins, but all Maclaurins are Taylors. If I wanted a polynomial of whatever degree you wanted, now, it fits the pattern, yesterday a reference was made to "the zeroth derivative". You see, you take your first, and, yeah, the old one was bothering me, yeah, until somebody comes up and writes on the overhead and mashes it, but it happens, alright, so, what is my first term going to be? Well. Remember. Not f of x, because a Macluarin is centered at zero, so f of 0, and technically this still fits the pattern, what derivative is this? The zeroth. So this is the same as f(0)x^o all over 0! and there's no extra term out front. If you take the first derivative out front, then that'd be x to the one over one factorial, and so whatever factorial I'm dealing with that's the exponent on the x and that's the factorial that you are dividing by, and the next one ... yeah. x to the second divided by 2 factorial and it just keeps going on and on and on like that, so the third derivative is x^3 and over 3! and that's all that we are going to do today, so for a fourth degree polynomial we will have to do four derivatives, in most cases, there's a little trick to help you save a little time, and it's a little trick (yeah, right), so let's do example one. Find the I forget the terminology that they use let's do they eighth degree polynomial approximation, I should have just put P sub eight, in the future I will, for f(x)=cos(x) centered at 0. So let's look at how we can rewrite this question and you will come to understand it. I could have written: find let's say the Maclaurin. What if I had just wrote that? Macluarin tells you it's centered at zero, and P_8 means to the eighth degree, you will need eight derivatives, and 8 derivatives is normally annoying, and since it's cosine it just flips back and forth sine cosine sine cosine with pluses and minuses. To do this problem we are going to start off with F(x) = cos(x) and then we are going to find f prime, f double prime, f triple prime, the fourth, fifth, sixth, seventh, and eighth derivative, and most of them aren't this long but like I said this one is quick because so what is F prime and F double prime? F double prime should be - cosine(x) and f prime x should be -sin(x). So the fourth derivative is cos(x), and the sixth one is negative, and the eighth one is positive. So this is positive sine and this is negative sign and this is positive sign. So you take that many derivatives that you need that degree. Now what do we do? Okay. You're going to plug in whereever you are centered you are going to plug that in to that derivative because that is going to give us our coefficients. When we wrote out f prime of zero and f triple prime of zero those are actual numbers and those numbers come from evaluating the derivative. So what is f prime of zero, so what is f double prime of zero, and of course you might want to abbreviate but the fact that this is ... 1, 0, -1, 0, 1, 0, -1, 0, 1, so there aren't things that get much easier than this, the only thing that does get much easier is if you were doing e^x and the derivative is e^x and e^x and e^x alright? So now we just write out our polynomial, if you got that now we just write out our pattern. I don't have room .. I have some terms that go away, don't I? What's the first thing that I am going to write. One. And that one is our original x, and technically that's .. .and all of that is one, so it's just the number one. The next term is zero, I don't have to write it, but if you wanted to, it'd be zero times x^1 divided by x factorial, and the next one would be minus one times x to the 2, so it's times x^2 over 2 factorial, and the next term would be zero x cubed over 3 factorial, the next term would be 1x^4 over 4! Oh yeah there's a pattern, yeah? You can leave the factorials, if there happen to be other coefficients, or yeah you could simplify it out, she's saying if you want to leave it like that our multiply it out and put 24, you could keep going or you will notice as Bryan pointed out you'll start to see the pattern. If I asked for P sub 20 then it's not so much work you start to see the pattern and then the next term would be .... so if I wanted to approximate what's the cosine of 0.1 radians? I could plug 0.1 into this polynomial, so the more terms you have .. you could graph cosine x and type this into y1 and you will see that for a little while they look like they overlap each other. Notice that this is actually an alternating series. Somebody made a comment about the exponents, they are all even, and remember talking about the odd and even functions? Cosine is even, so all of the exponents on the polynomial should be even too. Without thinking too hard, what is the polynomial for sine? X over 1 factorial minus x cubed over 3! and then add x^5 over 5! and then subtract x^7 over 7! and e^x? Well, e^x happens to be alright this gets very strange. Do you know what the first few terms of e^x are? Do you know that this is one half x squared? This is x and this is one. So try this. What do you get if you take the absolute value of this plus the absolute value of this? Take away the alternating part ... can you write the polynomial as a sigma or summation? You would write Sum from n=0 to infinity of something like x^2n over (2n)! and then you need your alternating portion so something like (-1)^(n+1)... could you write sine as a summation? It would just be x^(2n+1) , and if I do 2n+1 what is n starting with? So the sum would be from n=1 to infinity of x^(2n+1) / (2n+1)! (the exponent factorial is in the denominator). Once you start to see the pattern you can just write the sigma. So it starts to get a little amazing and then we want to do e^-3x and that's what we are going to do so let's try another example. If you take away the alternating and add them together, and if we can do e, and e is very easy, and you start to wonder, e is defined as how far you have to go over from 1/x starting from 1 so that you have an area of 1, and then you find that this infinite summation has a limit of e, then you have (1+(1/n))^n and that's e, and then there's some kind of pattern to this as if nature has an alignment to it. Well, no, e is based on natural log. Bryan can actually throw us in something that makes us laugh. I thought it was funny too. I wish he would interject more. I know, that's what happens, you get the reputation of being punny and people start looking for a fun and then they don't get it. So! Does everybody know what happened today in third period when you left? I saw Bryan and Luisa and myself in the lab and there was a lunch and I was contemplating ... you had the Doritos, some kind of snack, yogurt? It's a smudge on the overhead, and then a comma, so this is a fourth degree polynomial, here's what you were thinking, if you haven't any clue what's going on, you have to take up to the fourth derivative, and then you're going to evaluate each of those derivatives at, zero because it's a Maclaurin, so it's very systematic, and it's just, systematic. So here's where if you mess up and put 1/2 e^2x because you are getting derivatives and integration confused, it's 2e^2x and .... so. Derivative of e^u is e^u or u'e^u, and oh yeah, derivatives aren't gone. F = e^2x and F prime = 2e^2x and F double prime = 4e^2x. Uh oh. Look at him typing away. So you said this is one, two, four, eight, sixteen. Just write the polynomial. P_4 of (x). Oh I don't know. An dtypically they put parenthesis around that. Ah-huh. Well. Yesterday we were just showing where the pattern came from, and pretty much that was the only, yeah, yeah, yeah, no, no, this is what we're doing right now, all you need is, it's just a pattern. So I can write this. It's just the answer now. It's as simple as, and this is where (ARM MOVEMENT), one. Plus. 2x^1 / 1! which is just 2x and I am not going to write the extra stuff if you want to you can. I can see where this is going. I will write your answer down here. See you are starting to reduce and that's going too far and it's like the second example they've done and it's not very fun, and it's not like they've done the homework already. 4/2! which is known as 4/2 which is known as 2. And 8/3! reduces to 4/3 .. and then 16/4! reduces to 2/3 times x^4. Now. If you were to write this in summation notation, summation notation is going to be pretty difficult looking at Luisa's reduced form, and not on this homework, no, sometimes it's just nice to see this so that you can see the pattern. Oh. Let's see if you can figure out what the pattern is. Can you write this in summation notation? Sum from n=0 to infinity of what's the bottom going to be? Oh you haven't figured out the exponent? Is the exponent n? Okay, the exponent is n, and the bottom is n factorial? What you might not recognize is that this is 2x paranthesis cubed, so it's just 2x. Do you know what e^x is in summation notation? You start taking mighty shortcuts when you learn this. X^n over n! so then you start to say so could I if I knew e^u which would be u^n instead of x^n if I wanted e^2x would I just put e everywhere there is an u or everywhere there is an x? Let me show you one shortcut, so I am going to do a problem that is very very similar. So now when you go back they are going to charge you a signature and a planner. You are not as smart as we ... are you tired? Did you close last night? Oh that's why you look tired. You were the one who brought it up, I didn't ask if you were manager last night. Amafooze? Sonic. No. She doesn't skate. So. Do you have to skate? Do new employees have to skate? You know, every single person gives me different stories, I don't know who to believe. I was told that they are not hiring anybody who doesn't skate. Oh, no, that's not what I was told. What pot? She's leaving. We're going to do a Taylor, will you let us do a Taylor? Shh. So don't you get paid for that? Look. We have to get to a Taylor polynomial so we can't use any of this conversation. Now, there is a long, long way to do this, do you know how to derive x^2 * e^(2x). It's the product rule. So it's x^2 2e^2x plus 2xe^2x and then the next derivative is where you have a double product rule, and the next one you will have six or seven terms, shhhh. If you can keep them quiet. Or you can realize shhhh or you could realize that this means x^2 times e^2x, right? x^2 times e^2x isn't that what it says? Shhh. It's not Alex that's interrupting that pointed it out. It's not Alex that's interrupting. It's a smudge, underneath the glass, it's gone. It's gone, it won't come back, are you happy? Because the plastic was torn last period, so when I went to fix it it, and nobody's complained until now, alright all that I am trying to get to is x^2 times e^2x so why don't you multiply ... and get ... it's a really really nice shortcut. e^2x didn't we just do that example? So if we multiply each example by x^2 wouldn't we have e^2x? If I am doing this by scratch, then I'm going to find e^2x and then multiply by x^2, how many derivatives? I would have to increase the exponent by two, so if I am trying to get to an overall exponent by two, I would only have to .... no. This is only for those who pay attention and understand. So instead of x^2 ( e^2x) we will just say x^2(1+2x+(4x^2)/2! ) .. so if I multiply x^2 by each of those I get x^2 + 2x^3 + (4x^4)/2!, so when you are trying to approximate x to a power , well, do all that other stuff all alone, and *then* multiply by x^2 or x^3 or whatever it is, but knowing that you are going to multiply by x^2, you don't need to take it to four derivatives, you only need two derivatives, so each of the powers are boosted by two. Or you can do it the extremely long way and then you will figure out what I am talking about because you will never want to do it. So because of the power on x, you don't do the fourth polynomial approximation but instead only the second polynomial approximation ... and then multiply x^2 by the polynomial approximation of the second part that you are not ignoring of the original function ........................................ (end short cut ) .............. The talking while I talking is bugging me, but. What example is this? Four, five, did you count that last one as an example? I don't know. I will read the web page and see how it's handled. I don't know, I was just throwing out words to fill up space, so this means that it is going to be a Taylor centered at two, and I am not going to have an x^3 term, I am not going to have an x, I am going to have an x-2, and originally we just had x-0, and how many times am I going to take the derivative? Four times. Let's see how you guys handled this derivative (of 2/x^2... ). So here you are doing the quotient rule, lodehi - hidelo all over lolo. I am being flexible on techniques for indicating derivatives. What's the derivative of 2/x^2, Phoebe? See? Negative four over x^3. What's the next derivative? 12/x^4, and what's the next? -48/x^5, and don't you feel bad? 240/x^6. It's the seat, it's the chair, they can't even figure it out they're just copying it down.
Okay. You are thinking of this. This is really x^-3, so it's -3 times -4 and that becomes -4 so he just realizes you multiply this exponent by that, but it's really 5, so it increases but decreases on the bottom, it's that crazy, it's this but this but this, oh, I have to find those extra led that I bought, yeah, it's a little 29 cent bag at something like Good Will but it wasn't Good Will. What thing? Oh, no, but quite often. So what's f of 2? It's 1/2. What's f prime of 2? -(1/2). What's f double prime of 2? (3/4). What's f triple prime? (-3/2). And how about bluhab ldkjalfjladfjakdfjiroqer;;j.kasdf;jklaj;kla;jklasd;jlkasdfjkl;fasd;jlkas d;jklaf;jakls;jkl;jklasasd;jlk ;jl;a klj 15/4. So 1/2 times whatever to the zero factorial is just 1/2. Minus. Minus one half times x - 2 to the one divided by one factorial, remember we are putting in everything, yeah, we put it all in, some people don't like this step, it helps one person and the others it doesn't help and that's fine because the one that it doesn't help doesn't matter, and it hurts you and yeah. x-2 squared over 2!, and then we can reduce these crazy things. Okay, a little shortcut was just for Maclaurin, don't do it with Taylor until you just understand what's going on. The shortcut with the x^2 and e^2x where you leave out the x^2. Why not? I don't know. I am ignorant on anything I said. I don't know what I said and how it was interpreted. Bryan has that sense of not being listened to, he's going to get very mad. Let me quote Bryan: "I am very mad." Two and four that's five thirty-sevenths? What's fifteen-fourths divided by 4!? Avery, next thing you know, you'll be leaving your lunch around. So there it is. Use your polynomial to approximate the value of, I don't know. Oh. Okay. Nevermind. I was ahead of myself. That's tomorrow. That question I just said doesn't pertain to this homework, it's the next homework. Should we continue? Five more minutes? I have another example.
If Phoebe got it, that's all that matters, let her try to explain it to you. Example five? So we want p4 for f(x) equals natural log of x, centered at one. Hey Bryan! There's your natural log. Pardon? What's f prime? ... Yeah. Then Bryan's going to say that the website is invalid because we didn't explain it when he wasn't talking. Who's doing this website? " I just heard people talking and thought it would be about me."