 We're at lecture 51 math 241 We had an interesting problem yesterday It kind of started from a web assigned question although we went kind of beyond what the web assigned question was but we did a problem two different ways and the answers were off by a factor of one-fifth and That kind of bothered me Actually, it woke me up this morning about 5 13 And I didn't get back to sleep. So I kind of like that stuff that tells you how geeky and nerdy I am that If you do a problem two different ways for goodness sakes you ought to get the same answer both ways In fact, I did it a third way Yesterday and I think I have justified why one has The factor one-fifth in it and the other one did not and in fact, I think I've got all three ways of doing this problem Justified now in my mind if I can convey that to you. I don't know but I will make an attempt So let's rectify that situation first and then we'll go on further with Taylor and McLauren series So we had previously Come up with a power series for inverse tangent of x And we decided that we were going to use that result For inverse tangent, I think it was x over five I looked it up in the book and there's a problem similar to this in the book But it's x over three, but I think the web assigned homework that we dealt with was x over five inverse tangent of x On its interval of convergence looked like this we had developed that from Integrating one over one plus x squared no correction factors are necessary there We decided that everywhere there was an x on the left side if we replaced that with x over five then Basically that compels us to do the same thing on the right side, which this should be the correct answer Okay, this substitution. So we should get this factor of one-fifth that we did the problem another way Was missing that factor of one-fifth, and I think we can we can justify this So I think this is the correct answer and let's look at it two other ways that we looked at it We went ahead and instead of integrating one over one plus x squared with respect to x Which gets us inverse tangent? We decided to use the same approach that got us that formula that's listed at the top of this page Now without getting back to the same potential problem that we had yesterday When you have something here that is not x The quantity squared and then the derivative of x we decided that we needed a For this to integrate to this We needed a one-fifth DX So this should integrate to inverse tangent of x Here's what we actually did to get there to the to the best of my recollection Which by the way, couldn't I take that one-fifth that's present and move it out in front This is what we actually did We got a power series for one over one plus x over five the quantity squared Then we integrated it and that's how we got the other answer, which was instead of x over five. It was x there Instead of x over five Cubed all over three. We were missing a factor of five there in the denominator Basically, we got the same series, but we got it times five There is what we did not do in that series. So we got an answer. Let me see if I can find that answer well, I was trying to Kind of say well, we didn't really have that We didn't we didn't here's what we had because of how we went about it and we didn't have that correction factor, so Let's go back and do that Okay, here's what we did and we called that one minus negative x squared Negative the negative of x squared x over five the quantity squared it's a lot easier to deal with when it's just x squared But we've got x over five So we decided that that was the first term and that Was the ratio So we got that notice no extra one-fifth in there no extra five in there just that And we decided that was the first term was one and the ratio was negative x over five the quantity squared if that's not what we had it should have been what we had now We decided that's not what we wanted what we wanted was the integral of that So therefore we had to integrate this here's where we had the problem where we got an x and we got a That five squared is a one over twenty five and then we integrated x squared which was x cubed over three this was a One over five to the fourth which was six twenty five and we integrated x to the fourth Which is x to the five over five this is what we compared to the other one and it was very clearly Here we had an x and on the other one we had an x over five so it seemed like we were missing that factor one-fifth Well, this isn't really what we found the first time. It's one-fifth of What we found the first time because in order for this to be the inverse tangent of that of x over five It has to have a one-fifth in there. We never did deal with the one-fifth. So what we really found was one-fifth So here's what we found Okay, we need to multiply it by one-fifth in order to make an equivalent to what we were actually trying to find So that one got me pretty much justified but what Also came to my mind is This Remember we did inverse tangent integrand we were doing the table of integrals and at the end of 141 and We decided that anything in this form Was that okay, and most of you probably memorized that that's something that is used enough That was an a squared site So if that's something squared and that is the variable quantity squared we're integrating with respect to you it integrates to this Well, we can kind of knock out the plus c because we're going to have a Plus k that we decided on the inverse tangent problem was zero anyway So let's set that aside What if we had this might be even better than the way I worked it out? Yesterday What if we had that because that's kind of what we generated that one time how would that translate back to an integrand? Well, if that's one over a Inverse tangent of u over a that to me says that where I have an a I should really have a five Right and where we have a u squared. We should have an x squared So if that's what we really wanted to get for an answer it ought to look like this suppose I took the numerator up here and I'm going to try to get it in the form Here's the form. I'm kind of gearing toward right here If that's the form I'm headed toward and I've got a five squared there I'd better divide everything by what 25 So if I divide that by 25 25 down here by 25 and x squared by 25 So I haven't done anything that requires any compensation. It's numerator same thing. It's denominator So if I call that one and call this x over five, that's looking a whole lot like what we did And this I can call one again as long as I do what with that Bring the one over 25 out in front So is that Here we've got I don't I didn't like the fact that I went the other way this time But we've got a one-fifth and a one-twenty-fifth out in front there again We've got that factor of difference of one-fifth from what we generated so This is really all of this and what we have is in essence One-fifth of this is that okay? This isn't didn't I don't like it this way I did it actually another way I started with this and worked my way back to this I like that better, but it is this Thing that we started with This result that we have down here isn't it one-fifth of this Because here we've got a factor of one-fifth out in front here. We've got a factor of one-twenty-fifth It's a fifth of in essence what we found so by all three of these I think we can justify that the inverse tangent of X over five is The simplest way that we did it everywhere there was an X in the inverse tangent formula All we have to do is substitute an X over five that is the correct answer And what was that X over five? cubed over three X over five to the fifth over five and So that's the correct answer. I can tell that you're not quite as justified in your mind as I am in mind But I did basically work the problem three ways and Got the answer to be the same all three ways So we were missing a one-fifth in the other problem It's probably here's what we did We found this we integrated it It's it's missing a fifth Because in order for this to be an inverse tangent it has to have a one-fifth So we found this it's really one-fifth of the inverse tangent Not a test question, but I think that stuff that especially when we can connect it to a formula that we've had prior in this class is It's probably a pretty good thing to do All right, we ended yesterday with a Taylor series for e to the x actually it's a Taylor series instead of being centered at x equals a it's centered at x equals zero which technically makes it a Maclaurin series But you can call any of these Taylor series Taylor series are things that look like this We have higher order derivatives at a nth derivatives at a over n factorial x minus a to the n and If we let it start at zero and run forever, then it actually is Equal to we're going to talk about today a little bit about stopping it at a certain number How it approximates that function and any time it approximates a function then we have to talk a little bit about Error or at least the upper bound for the error if we're stopping it at the 13th derivative and 13 factorial and the binomial to the 13th power What kind of potential error do we have for e to the x or sine of x or cosine of x or inverse tangent of x or any other function Right now we're going to let it run to infinity So for this we let our a value be zero So we converted So x minus zero is just x So when we put in higher order derivatives the derivative of e to the x is itself So is it second derivative third derivative all the derivatives down the line? And when we evaluate all those derivatives at zero e to the x evaluated at x equals zero is e to the zero which is one so that doesn't change from one term to the other So this became one right all the higher order derivatives at zero. We're all one So if we have x to the n over n factorial from n equals zero to infinity We have a power series certain type of Taylor series For e to the x. I think that's probably about where we ended So the first term ought to be x to the zero over zero factorial, which is one x to the one over one factorial x to the two over two factorial X to the three over three factorial and so on so we didn't Kind of see if we think it's believable. I mean it seems to To work in this case where all the higher derivatives at zero or all one pretty simple version of this If this works just writing the same thing down again, so we have it on this sheet Let's see if it works for When x is one Well when x is one, so I'm plugging in a value For x everywhere. I see an x we should plug in a one We're supposed to let it go Forever, but let's just stop it at this term and see how well we're doing. We know e to the first is Approximately 2.718 So we've got a one plus a one there's a two There's one over two factorial, which is one over two which is one half There's one cubed over three factorial, which is one over Six there's one over 24 And there's one over five factorial. What is that 120? So we're supposed to let this go The terms are getting pretty small. The next one is what one over 720 So we're going to have some error, but let's see how well we're doing at this point We're supposed to get 2.718 roughly If we add these together, where are we at this point? Not bad So we're missing a whole lot of terms But we're still doing pretty well Basically truncating this that's called a Taylor polynomial as opposed to a Taylor series series means we're going to let it go To infinity a Taylor polynomial says we're going to stop it at a certain n value But we did okay in this case suppose we wanted Let me give you a reason for wanting it first. Let's suppose that We were Wanting a way to integrate that could we do that integration problem? By substitution a few of you are shaking your head that we could not Here's the attempt if we were going to use this by do this by substitution. It'd be e to the u You would be negative x squared Here's where I think the problem comes in. What's the derivative of you? We don't have an extra x floating around in the integrand. We can't create one ourselves because it's variable So this method is not going to work How could we do this problem? Well, we have a Taylor series a power series for e to any power How about let's get a Taylor series for e to the negative x squared And let's integrate that so if that's e to the x again, I'll just write this down We want something for e to the negative x squared. How do we do that? Same thing we did with the inverse tangent of x and Coming up with the inverse tangent of x over five everywhere. There was an x. We put in an x over five Everywhere there's an x We want to replace it with what? negative x squared so now we have this way of writing e to the negative x squared as this power series as a polynomial type thing polynomials are always a lot easier to deal with then Things that aren't some type of transcendental function polynomials will always be easier So we've got one minus x squared. Let's see what we've got here plus x to the fourth Over two what? negative X to the sixth over six Granted it's not all of them, but we've got the pattern going here. So if we want to Integrate this we should be able to integrate this site and accomplish the same thing So you can write something out that appears to not be integrable by methods that we've studied to this point in time patterned integration and We can integrate it in pieces in the series form So the integral of one would be x the integral of this x cubed over three Here we've got a one half and then we'll integrate that x to the fifth over five Here we've got a minus one sixth x to the seventh over seven So something that by normal means is not integrable convert it to a series It is integrable at that point. So we do need to keep it going in order for that equation to be maintained Probably shouldn't leave e to the x until we do this So we have e to the x written as a Taylor series McLauren series some type of power series we ended up trying to do a Problem the other day an inverse tangent problem We went outside of the in of the interval of convergence and it didn't work So we better see if that Possibly could happen with this particular power series. How are we going to find an interval of convergence? how did we there are Different ways that these types of series can converge they can converge for a single value Like that at x equals zero or at x equals three a single value of x only They could converge for all values negative infinity to positive infinity and they can Converge for some interval so how did we Figure out how did we come up with that interval of convergence? Ratio ratio test so let's take this thing right here and do a ratio test and see What is the nature of the convergence for this particular series? So we want the limit so we're doing ratio test to try to find when this particular power series converges for e to the x So we want to see what happens way out there to the right what's in the numerator I haven't done a ratio test for several days in plus first term So if the description of the term is x to the n over n factorial Then the n plus first term would be x to the n plus one over n plus one factorial Let's get rid of the complex fraction So we'll multiply by the reciprocal of the denominator Okay, tell me what things kind of knock out numerator and denominator. What's left where? Okay, and that happened because n plus one factorial is really in plus one Times in factorial is that right? So the n factorials reduce That's correct and in plus one in the denominator And how do they reduce? Leaving what where? x in the numerator so this Numerator has x to one degree larger than the denominator So you can reduce them, but it leaves an x to the first in the numerator So we don't know what x is let's keep the absolute value notation there in plus one in is Certainly positive How about that as in approaches infinity? Don't we want to know where this is? less than one right Isn't it always less than one As n gets infinitely large this denominator gets infinitely large x is Going to be eventually overtaken by this tremendously large denominator So this thing approaches zero which is less than one all the time So what's the interval of convergence for all values? So it's not a certain value of x or a certain Interval of values for x. It's for all x So the interval of convergence is negative infinity to positive infinity that means it works all the time We're not going to have that situation like we had the other day trying to find the inverse tangent of two Two was outside of the interval of convergence It kind of fell apart that it didn't converge So this can be used basically all the time convergent for all values of x We're not going to finish this today. I'm trying to think of what we can get to that Let's mention this and then we'll use it in our next two So we're changing the terminology slightly from Taylor series, which means we're going to let it run all the way to infinity To a Taylor polynomial So a Taylor polynomial means we're going to truncate it at some point in time We're going to talk about error when we're definitely not talking about that today We'll talk about that on Monday, but Taylor polynomials if we have let's say T sub n so it'd be T sub 3 T sub 4 So it'll be a certain in value that's subscripted that'll tell us not how many terms we want because Sometimes terms disappear because they have coefficients of zero. We're about to see that But it'll tell us the value for n For which we're going to stop that particular series So I'm going to use in there so I can't use it down here So I'm going to use another letter so from i equals 1 to n. I'm sorry i equals 0 to n This is our nth Taylor polynomial Now wherever we had ends before we're going to have to put i's other than that. It's the same thing So we had the nth order derivative now. It's an i in that position We had an n factorial now. It's an i factorial and we had an x minus a To the end now. It's x minus a to the i So this in is exactly the same as this one it tells us where we're going to stop So if we stop at n equals three, it's a third Taylor polynomial Stop at n equals seven. It's a seventh Taylor polynomial not equal to the series There'll be some error involved And we'll address that error After we get these let's let's today get these two. I think we can get them both Let's have a function sine of x and We want to develop a Taylor series. I guess a Maclaurin series for sine of x So x minus zero or just x to the n Let's start at n equals zero and let it go on forever. So this is a Taylor series We're going to talk about some of the Taylor polynomials associated with us, but for right now Let's generate the whole series We are going to need some higher derivatives We'll see a pattern here derivative of sine is Cosine excuse me derivative of cosine is and derivative of negative sine is Now we should start repeating right derivative of negative cosine is back to sine and This thing process It's going to happen happen in cycles of four Sine to cosine to negative sine to negative cosine and back to sine to cosine same thing cycles of four Well for n equals zero We should have the zero derivative. We decided the zero derivative although it sounds kind of stupid is really the what? the original function at zero over zero factorial x to the zero So what is the original function at zero? What was the original function? Sine of x right, so what's the sine of zero? Zero Doesn't really matter. What else I write so the first term there really isn't a first term That's actually going to be there to help us describe what the sine function is Now is this going to happen repeatedly? It's going to happen for this term Because the sine of zero zero not going to happen here It is going to happen here Not going to happen here. So every other term is going to be zero that sound right So for n equals one. We want the first derivative at zero over one factorial X to the one well What's the first derivative at zero first derivative is cosine? What's the cosine of zero? one over one factorial x to the one So that looks like x to me n equals two second derivative at zero over two factorial x to the two The second derivative was negative sine of x. What's negative sine of zero? Zero we already decided that every other term is going to drop out but the third derivative at zero three factorial X to the third The third derivative is negative cosine of x So negative cosine of zero is negative one So we have what negative x cubed over three factorial We don't need to generate the next term because it's actually going to be what? It's going to be zero. So every other terms going to be zero Are we going to alternate signs on the terms that remain? Well Here's the first term that's actually present is cosine of x the next one that's actually present is negative cosine We lose this one. What's the next one is? Cosine of x it appears that they're going to alternate in sign right s i g and sign So let's leave out the zeros. It's probably not enough for the pattern yet But if you had to wager a guess as to the next term that actually appears We know we're going to lose the x to the fourth term, right? The next term that appears is x to the fifth. Is it going to be positive or negative? It's going to be positive And I guess the only Leap we're making is what's the denominator? What would you guess based on the pattern that we have five factorial? And if we wanted to continue this is the pattern that look like a sine function It is Whether we think it looks like one or not it is this is how your calculator probably does Sign functions. It's not this bright little machine Okay, it's been stamped with this algorithm. I don't know to what power 13th power You can probably check your manual out. That'd be something good to do over the weekend, right? You wake up at 513 in the morning Just get that calculator manual out and see how it's it you're giving me that look again How it actually is doing sine functions or inverse tangent functions, but my guess is that it's doing this Up to maybe x sub 13 over 13 factorial So it's not a Taylor series, but a Taylor polynomial This is probably going to be one of those that you're going to want to memorize I mean once you get the pattern going So let's give a couple of memory aids before we go on to the next one Is it the sine and odd function? Is that correct? Sine is an odd function What would have to be true about the sine function in order for it to be in classified as an odd function? Okay, there is no symmetry on either side of the y-axis that would be an even function Okay, which we're going to get to that in a minute But an odd function Symmetry to the Origin So we're going to have symmetry Okay, I like that Jacob. I think you said it symmetry to the origin And how do we test for symmetry to the origin the f of negative x is equal to the negative of the f of x? If that's true A couple little question marks there if that's true, then it's an odd function. Well the symmetry to the origin So for this point here, it's symmetric images right here on the other side of the origin For this point here, it's symmetric images there on the so we do have symmetry to the origin And this is the kind of the test that creates that kind of symmetry So is the sine of negative x is that the negative of The sine of x well just pick a value See if that makes sense sine of negative pi over six is That the negative of the sine of pi over six This is a fourth quadrant angle the sine of a fourth quadrant angle is negative So you would take the reference angle, which is pi over six take the sine of the same reference angle and just negate the value, right? negate it because this is in the fourth quadrant this is In the first quadrant same answer this one's negative So we better negate the first quadrant answer to make sure they're equal it is an odd function is that helpful in remembering that particular power series to know to remember that the sine is an odd function That helps me because That's odd That's odd That's odd that's odd everything in here is right The factorials are odd the powers of x are odd. It's an odd function That must be the sign We're not going to get the other one today, but I want to do a quick example here Since I brought up pi over six We have a series a polynomial type series for the sine function And it's x minus x cubed over three factorial well everywhere. There's an x. Let's replace it with a pi over six and see if it works So it should be x which is pi over six, you know, I'm feeling kind of lazy today, too I don't really want to write any more terms out Let's just see how well we did okay, so the sine of x is Is x and I know there's a whole lot of other terms to this But let's just stop right there. Let's just say sine of x is x How well did we do you be surprised we actually did pretty well What's the sign of pi over six? I get that trig look every time we do a trade problem that No, that's third equivalent of 30 degrees. What's the sign of 30 degrees one half Okay Now what is the number pi? Which is what this side is the number pi divided by six? That's a little more than three divided by six 0.5 to Three six, that's not bad We didn't have to go very far in that Taylor series. It's pretty good approximation already now. This is too much, right? So what's going to happen next? We're going to subtract some away. Let's just see by putting in the next term how much better it is So the sine of pi over six on the left side is one half So on the right side, we're going to use now. We're going to gather in the next term I mean, you know what's going to happen. We're going to subtract some but guess what we're going to subtract too much Therefore we have to add some in with the next term and that's how those things proceed But what's pi over six that quantity cubed? over Six or three factorial Subtracted from this thing right here pretty good, right? That's pretty darn close to the sign of pi over six and we only use the first two terms of the Taylor series So as you progress and gather in this term and this one X to the ninth X to the eleventh it's going to be very very accurate That is more than likely how your calculator is doing a sign problem Whatever number you enter in if you enter it in in radians Which this is in radians. It's going to use that value If you enter a value in in degrees, it's going to convert that to radians so that it can use This particular power series Now we do have time for this we don't have time to develop the cosine I'm just going to write down what we have at this point thus far For the sign isn't the cosine the derivative of the sign That correct so you've got some things that are going to kind of connect these that you can make sure that you've memorized the right thing We're not developing the cosine yet using the Taylor series But let's see what we're going to get once we do that. What's the derivative of X? It's one What's the derivative of? X cubed over three factorial well the three factorial is really one over three factorial, right? That's a coefficient and what's the derivative of X cubed and we'll simplify that in a minute The coefficient here is one over five factorial Derivative of X to the fifth coefficient here is one over seven factorial Derivative of X to the seventh and that process is going to continue the same way. There we go That three knocks our three factorial Which is three times two times one the three's knockout so we have two factorial that process should continue Five factorial the five and the five knockout so you're left with four factorial That's sounding kind of even to me The seven knocks out with this seven so you're left with six factorial Here we've got an X squared guess that's looking better all the time There's what the Taylor series or the McLauren series since we're centering it at zero is going to look like for cosine Wouldn't it be nice if cosine were an even function that would help you remember that it's cosine and even function it is Cosine is an even function Now what might throw you off a little bit. I dotted my you there's that okay if I dot my use The first term might throw you off in this this whole even function thing, but if you remember X squared over two factorial X to the fourth over four factorial You could really kind of back up to from this one this technically is what X to the? zero over zero Factorial is that right and it's still zero is even right So it is even cosine is an even function the test for something To see if it's even It doesn't matter whether you put in an X or a negative X you get the same thing is The cosine of negative pi over six Is that the same thing as the cosine of pi over six somebody justify that and we're done for the day We're not gonna I mean a song won't do it. We can't sing a song and it's justified Where are we in this cosine of a fourth quadrant angle? This is cosine of a first quadrant angle Isn't the cosine positive in the fourth quadrant and also positive in the first quadrant If the reference angle is the same it doesn't matter if your first quadrant or fourth quadrant The cosine is the same in both if this had been second quadrant and third quadrant is the cosine the same in both of those Yes, so this is a true statement which in all cases. It's true cosine of X is an even function Have a great long week