1 00:00:06,930 --> 00:00:07,460 Hi. 2 00:00:07,460 --> 00:00:08,960 Welcome back to recitation. 3 00:00:08,960 --> 00:00:10,630 We've been talking about Taylor series 4 00:00:10,630 --> 00:00:12,200 for a number of functions and rules 5 00:00:12,200 --> 00:00:14,190 by which you can compute Taylor series. 6 00:00:14,190 --> 00:00:16,860 I have here an example that I don't think we did in lecture. 7 00:00:16,860 --> 00:00:20,980 So this is the function f of x equals secant of x. 8 00:00:20,980 --> 00:00:23,200 Now, unlike some of the other ones you've seen, 9 00:00:23,200 --> 00:00:26,110 there's not a really simple formula for the whole Taylor 10 00:00:26,110 --> 00:00:27,020 series of secant x. 11 00:00:27,020 --> 00:00:28,770 So what I'd like you to do is not to find, 12 00:00:28,770 --> 00:00:31,970 you know, a formula for the general term, 13 00:00:31,970 --> 00:00:35,490 but rather, just to use some of the tools 14 00:00:35,490 --> 00:00:37,750 that we've learned to compute the first few terms 15 00:00:37,750 --> 00:00:40,180 of the Taylor series for f of x equals secant x. 16 00:00:40,180 --> 00:00:43,390 Say, up through the x to the fourth term, if you wanted, 17 00:00:43,390 --> 00:00:46,210 or even a little further if you were feeling ambitious. 18 00:00:46,210 --> 00:00:48,590 So why don't you pause the video, have a go at that, 19 00:00:48,590 --> 00:00:50,210 come back, and we can do it together. 20 00:00:58,830 --> 00:00:59,910 So welcome back. 21 00:00:59,910 --> 00:01:03,690 I asked you to compute the first few terms of a Taylor series. 22 00:01:03,690 --> 00:01:06,510 One thing you can always do in this case, is you can go 23 00:01:06,510 --> 00:01:08,720 and you can apply the general formula that we 24 00:01:08,720 --> 00:01:10,970 have for Taylor series, and use it 25 00:01:10,970 --> 00:01:13,330 to compute the series that way. 26 00:01:13,330 --> 00:01:15,060 So in order to do that, you just need 27 00:01:15,060 --> 00:01:17,540 to compute a few derivatives of your function. 28 00:01:17,540 --> 00:01:20,480 So remember that the general formula for a Taylor series 29 00:01:20,480 --> 00:01:27,590 is the Taylor series for f of x is equal to the sum from n 30 00:01:27,590 --> 00:01:33,070 equals 0 to infinity of the nth derivative 31 00:01:33,070 --> 00:01:39,280 of f taken at zero divided by n factorial times x to the n. 32 00:01:39,280 --> 00:01:41,680 And since we're only interested in the first few terms, 33 00:01:41,680 --> 00:01:49,650 this is f of 0 plus f prime of 0 x 34 00:01:49,650 --> 00:01:56,220 plus f double prime of 0 over 2 x squared, plus dot dot dot. 35 00:01:56,220 --> 00:01:58,340 I'm not going to write out the next few terms. 36 00:01:58,340 --> 00:02:00,600 And if you want to apply this formula to secant 37 00:02:00,600 --> 00:02:02,370 of x, what you would have to do, is 38 00:02:02,370 --> 00:02:04,490 you would have to compute these derivatives. 39 00:02:04,490 --> 00:02:06,180 And so we could try doing that. 40 00:02:06,180 --> 00:02:09,830 So in our case, f of x is equal to secant of x. 41 00:02:09,830 --> 00:02:14,670 So f of 0 is secant of 0, which is just 1. 42 00:02:14,670 --> 00:02:17,270 So then we need to know f prime of x, so that's 43 00:02:17,270 --> 00:02:19,150 the derivative of secant of x. 44 00:02:19,150 --> 00:02:20,990 So this is one you should remember. 45 00:02:20,990 --> 00:02:26,800 This is equal to secant x times tan x. 46 00:02:26,800 --> 00:02:30,390 And when you plug in x equal to 0, well, the tan x is 0. 47 00:02:30,390 --> 00:02:34,221 So f prime of 0 is equal to 0. 48 00:02:34,221 --> 00:02:35,470 And then you could keep going. 49 00:02:35,470 --> 00:02:37,650 So you could compute f double prime of x. 50 00:02:37,650 --> 00:02:40,720 So we would have to compute the derivative of secant x tan x. 51 00:02:40,720 --> 00:02:42,490 And you would do that by the product rule. 52 00:02:42,490 --> 00:02:44,570 You know, you take derivative of secant 53 00:02:44,570 --> 00:02:51,846 of x, and that gives you secant x tan x times tan 54 00:02:51,846 --> 00:02:55,460 x plus-- and then you, OK. 55 00:02:55,460 --> 00:02:58,960 So you leave secant of x, and you multiply it 56 00:02:58,960 --> 00:03:04,260 by the derivative of tangent, which is secant squared x. 57 00:03:04,260 --> 00:03:09,160 And now when you put in 0 here, you get f double prime of 0. 58 00:03:09,160 --> 00:03:09,780 Well, OK. 59 00:03:09,780 --> 00:03:11,660 So this has a tan x in it, so that part's 60 00:03:11,660 --> 00:03:12,550 going to give you 0. 61 00:03:12,550 --> 00:03:15,650 And here we end up with secant of 0 times secant squared of 0, 62 00:03:15,650 --> 00:03:18,070 so that's 1 times 1 times 1. 63 00:03:18,070 --> 00:03:19,000 So that's just 1. 64 00:03:19,000 --> 00:03:21,845 So f double prime of 0 is 1, and you could keep doing this. 65 00:03:21,845 --> 00:03:23,970 Now one thing you'll notice is that this is getting 66 00:03:23,970 --> 00:03:24,970 more and more complicated. 67 00:03:24,970 --> 00:03:27,230 I mean, we can simplify this expression a little bit. 68 00:03:27,230 --> 00:03:30,110 We could write it as secant x tan squared 69 00:03:30,110 --> 00:03:33,050 x plus secant cubed x, and there are, you know, 70 00:03:33,050 --> 00:03:35,150 all sorts of trig manipulations you could do, 71 00:03:35,150 --> 00:03:39,120 if you wanted to try and rewrite that in some simpler form. 72 00:03:39,120 --> 00:03:42,330 But fundamentally, it's more complicated 73 00:03:42,330 --> 00:03:44,636 than the first derivative was, and that's 74 00:03:44,636 --> 00:03:46,010 more complicated in the function. 75 00:03:46,010 --> 00:03:48,010 And it will keep getting more complicated as you 76 00:03:48,010 --> 00:03:49,610 compute more derivatives. 77 00:03:49,610 --> 00:03:51,570 So we can do this. 78 00:03:51,570 --> 00:03:55,410 So so far this shows us, by the way, that this is equal to 1 79 00:03:55,410 --> 00:04:00,467 plus 0x plus x squared over 2 plus dot dot dot. 80 00:04:00,467 --> 00:04:01,842 And if you wanted to compute, you 81 00:04:01,842 --> 00:04:04,430 know, up through the fourth degree term or something 82 00:04:04,430 --> 00:04:07,604 like this, that's something that's manageable. 83 00:04:07,604 --> 00:04:10,020 But I want to suggest that there are maybe some nicer ways 84 00:04:10,020 --> 00:04:11,610 to do it. 85 00:04:11,610 --> 00:04:15,150 So one thing to notice is that secant of x 86 00:04:15,150 --> 00:04:18,570 is closely related to the function cosine of x. 87 00:04:18,570 --> 00:04:21,120 And you know the Taylor series for cosine of x. 88 00:04:21,120 --> 00:04:22,670 So one thing you could think to do, 89 00:04:22,670 --> 00:04:25,280 is to leverage the information that you have about cosine 90 00:04:25,280 --> 00:04:28,235 of x in order to use it to get some information about secant 91 00:04:28,235 --> 00:04:29,350 of x. 92 00:04:29,350 --> 00:04:39,660 So one simple way to do that, is that you know that cosine of x 93 00:04:39,660 --> 00:04:40,490 is even. 94 00:04:40,490 --> 00:04:42,170 It's an even function. 95 00:04:42,170 --> 00:04:44,760 Cosine of minus x is equal to cosine of x. 96 00:04:44,760 --> 00:04:46,910 So that means secant of x is also even. 97 00:04:54,880 --> 00:04:56,840 Secant of x is an even function. 98 00:04:56,840 --> 00:04:59,870 And you've seen that even functions, their Taylor 99 00:04:59,870 --> 00:05:05,320 series, all the odd powers have coefficient 0. 100 00:05:05,320 --> 00:05:07,310 So what that means is without ever computing 101 00:05:07,310 --> 00:05:09,630 the third derivative, we can know already 102 00:05:09,630 --> 00:05:11,580 that the next term in this Taylor series 103 00:05:11,580 --> 00:05:14,780 is going to be 0 x cubed over 6. 104 00:05:14,780 --> 00:05:15,280 OK? 105 00:05:15,280 --> 00:05:18,350 So that's nice. 106 00:05:18,350 --> 00:05:34,500 So the odd terms of the Taylor series for secant of x are 0. 107 00:05:34,500 --> 00:05:35,000 OK. 108 00:05:35,000 --> 00:05:36,791 So that's one thing you can get right away. 109 00:05:36,791 --> 00:05:38,592 So that gives you, if you like, that 110 00:05:38,592 --> 00:05:40,633 gives you half of the terms of the Taylor series. 111 00:05:40,633 --> 00:05:43,920 It's a little bit of a joke, but. 112 00:05:43,920 --> 00:05:47,110 OK, so then you only need to figure out the even terms. 113 00:05:47,110 --> 00:05:50,400 That's one way we can leverage the relationship between secant 114 00:05:50,400 --> 00:05:51,150 and cosine. 115 00:05:51,150 --> 00:05:52,970 The other way is that we can remember 116 00:05:52,970 --> 00:05:56,540 that Taylor series multiply just like polynomials do. 117 00:05:56,540 --> 00:06:01,130 So if secant is 1 over cosine, that 118 00:06:01,130 --> 00:06:04,810 means secant times cosine is equal to 1. 119 00:06:04,810 --> 00:06:07,450 OK? 120 00:06:07,450 --> 00:06:17,870 So idea, secant of x times cosine of x is equal to 1. 121 00:06:17,870 --> 00:06:20,360 Now, that means that the Taylor series 122 00:06:20,360 --> 00:06:23,440 for secant of x times the Taylor series for cosine of x 123 00:06:23,440 --> 00:06:25,380 has to simplify just to 1. 124 00:06:25,380 --> 00:06:27,360 So we can write down that product 125 00:06:27,360 --> 00:06:29,580 as a product of two infinite polynomials, 126 00:06:29,580 --> 00:06:31,880 and we can start multiplying term by term. 127 00:06:31,880 --> 00:06:35,670 And that'll allow us to solve for a bunch of terms, 128 00:06:35,670 --> 00:06:38,130 just by solving some simple linear equations. 129 00:06:38,130 --> 00:06:39,530 So let me show you what I mean. 130 00:06:39,530 --> 00:06:43,200 So we know-- let me write it as cosine times secant. 131 00:06:43,200 --> 00:06:52,830 So we know that cosine of x is 1 minus x squared over 2 plus x 132 00:06:52,830 --> 00:06:58,120 to the fourth over 24-- that's 4 factorial-- minus x 133 00:06:58,120 --> 00:07:03,980 to the sixth over 720, which is 6 factorial, plus dot dot dot. 134 00:07:03,980 --> 00:07:05,680 And so we know that if we multiply this 135 00:07:05,680 --> 00:07:07,432 by the series for secant of x-- well, 136 00:07:07,432 --> 00:07:08,890 what is the series for secant of x? 137 00:07:08,890 --> 00:07:11,000 Well, we've already computed a few terms. 138 00:07:11,000 --> 00:07:17,260 We know that it's 1 plus x squared over 2, 139 00:07:17,260 --> 00:07:18,370 we computed that already. 140 00:07:18,370 --> 00:07:20,225 And we know that the third degree term is 0. 141 00:07:20,225 --> 00:07:24,645 So there's some fourth degree coefficient, a_4, x 142 00:07:24,645 --> 00:07:28,300 to the fourth, or 4 factorial. 143 00:07:28,300 --> 00:07:30,940 And there's some-- well, we know, we said it's even, 144 00:07:30,940 --> 00:07:33,360 so we know the fifth degree coefficient is 0. 145 00:07:33,360 --> 00:07:35,950 So then the sixth degree coefficient we don't know yet. 146 00:07:35,950 --> 00:07:42,400 So this is plus a sub 6 times x to the sixth over 6 factorial, 147 00:07:42,400 --> 00:07:43,920 plus dot dot dot. 148 00:07:43,920 --> 00:07:46,460 So we know that when we multiply these two things together, 149 00:07:46,460 --> 00:07:48,280 it has to give us just 1. 150 00:07:48,280 --> 00:07:50,620 All the higher-order terms have to cancel, 151 00:07:50,620 --> 00:07:52,590 because over here we have a 1. 152 00:07:52,590 --> 00:07:54,510 So what you can do, is you can actually try 153 00:07:54,510 --> 00:07:55,850 multiplying these things out. 154 00:07:55,850 --> 00:07:57,350 So it's easy to see, for example, 155 00:07:57,350 --> 00:07:59,870 that the constant term of this product is just 1 times 1, 156 00:07:59,870 --> 00:08:00,667 which is 1. 157 00:08:00,667 --> 00:08:01,250 Which is good. 158 00:08:01,250 --> 00:08:03,360 So that's a check on what we've done so far. 159 00:08:03,360 --> 00:08:06,320 And there is no x-term, because there are no x's. 160 00:08:06,320 --> 00:08:09,280 The x squared term here is 1 times 161 00:08:09,280 --> 00:08:13,400 x squared over 2 minus x squared over 2 times 1. 162 00:08:13,400 --> 00:08:15,100 Well, that gives us 0, so that's good. 163 00:08:15,100 --> 00:08:17,850 So this product is equal to-- well, it's 1, 164 00:08:17,850 --> 00:08:21,030 plus we saw 0x, plus 0 x squared. 165 00:08:21,030 --> 00:08:22,156 How about the x cubed term? 166 00:08:22,156 --> 00:08:24,030 Well, there are no odd terms in this product, 167 00:08:24,030 --> 00:08:24,990 so there's no x cubed. 168 00:08:24,990 --> 00:08:26,540 How about the x to the fourth term? 169 00:08:26,540 --> 00:08:27,050 Well, OK. 170 00:08:27,050 --> 00:08:28,550 So how do we get an x to the fourth? 171 00:08:28,550 --> 00:08:31,140 We could have an x to the fourth here times a constant. 172 00:08:31,140 --> 00:08:35,580 So that's x to the fourth over 24. 173 00:08:35,580 --> 00:08:38,322 Or, we could have an x squared times an x squared. 174 00:08:38,322 --> 00:08:40,780 So in this case, that gives us minus x squared over 2 times 175 00:08:40,780 --> 00:08:44,582 x squared over 2, which is minus x to the fourth over 4. 176 00:08:44,582 --> 00:08:46,790 Or we could have a constant times an x to the fourth. 177 00:08:46,790 --> 00:08:55,430 So this is plus a_4 x to the fourth over 24. 178 00:08:55,430 --> 00:08:57,850 And then we'll have a sixth-degree term, and so on. 179 00:08:57,850 --> 00:08:59,710 Notice that there's never any involvement 180 00:08:59,710 --> 00:09:02,360 from the higher-order terms in the fourth power here. 181 00:09:02,360 --> 00:09:02,860 Right? 182 00:09:02,860 --> 00:09:04,790 If you ever took an x to the sixth here, 183 00:09:04,790 --> 00:09:07,820 well then everything you multiply it by has at least an 184 00:09:07,820 --> 00:09:09,002 x to the sixth power. 185 00:09:09,002 --> 00:09:10,960 So we don't have to worry about that showing up 186 00:09:10,960 --> 00:09:13,030 in the x to the fourth term. 187 00:09:13,030 --> 00:09:13,780 Well, OK. 188 00:09:13,780 --> 00:09:16,270 We know this is actually equal to 1, 189 00:09:16,270 --> 00:09:18,670 so we know that this thing has to be 0. 190 00:09:18,670 --> 00:09:20,130 This is x to the fourth term. 191 00:09:20,130 --> 00:09:21,420 It has to be 0. 192 00:09:21,420 --> 00:09:31,000 So that means that 1 over 24 minus 1 over 4 plus a_4 over 24 193 00:09:31,000 --> 00:09:32,450 equals 0. 194 00:09:32,450 --> 00:09:34,270 So OK. 195 00:09:34,270 --> 00:09:37,090 So now you can multiply everything through by 24 196 00:09:37,090 --> 00:09:42,110 and rearrange to figure out that a_4 is equal to 5. 197 00:09:42,110 --> 00:09:43,650 So I've done that correctly. 198 00:09:43,650 --> 00:09:46,550 And then if you wanted, it would be fairly easy to go back up 199 00:09:46,550 --> 00:09:48,920 and then you look at the x to the sixth term. 200 00:09:48,920 --> 00:09:50,460 And from there, you could figure out 201 00:09:50,460 --> 00:09:54,500 that a_6 was equal to, say, 61 or something like that. 202 00:09:54,500 --> 00:09:56,250 I think 61. 203 00:09:56,250 --> 00:09:57,520 And you could keep doing this. 204 00:09:57,520 --> 00:10:00,230 So this is one way to compute more terms 205 00:10:00,230 --> 00:10:03,700 of the series for secant of x. 206 00:10:03,700 --> 00:10:05,580 Another thing you could do-- which I'll just 207 00:10:05,580 --> 00:10:07,538 mention very briefly, I'm not going to show you 208 00:10:07,538 --> 00:10:09,850 how to do it-- is that you can do long division 209 00:10:09,850 --> 00:10:11,050 on power series. 210 00:10:11,050 --> 00:10:14,540 So it actually works out very-- it works out just like this. 211 00:10:14,540 --> 00:10:16,950 It's mathematically equivalent. 212 00:10:16,950 --> 00:10:19,630 The way you actually do it looks different. 213 00:10:19,630 --> 00:10:21,990 It looks like long division. 214 00:10:21,990 --> 00:10:23,920 When you do long division with polynomials, 215 00:10:23,920 --> 00:10:25,910 you start with the highest-order term. 216 00:10:25,910 --> 00:10:28,517 Of course, power series don't have highest-order terms. 217 00:10:28,517 --> 00:10:30,350 What you actually do with a power series, is 218 00:10:30,350 --> 00:10:32,090 you start with the lowest-order term. 219 00:10:32,090 --> 00:10:35,910 So to divide this into 1, you'd say, oh, 220 00:10:35,910 --> 00:10:38,150 you need a factor of 1, and then you'll 221 00:10:38,150 --> 00:10:40,826 have a-- you know, you subtract off 1 times this, 222 00:10:40,826 --> 00:10:42,450 and that gives you an x squared plus 2. 223 00:10:42,450 --> 00:10:46,280 And so, OK, so you say, I need a plus an x squared plus 2, 224 00:10:46,280 --> 00:10:47,060 and so on. 225 00:10:47,060 --> 00:10:50,530 So that was too brief for you to understand it properly, 226 00:10:50,530 --> 00:10:55,310 but you can go and look up somewhere the method 227 00:10:55,310 --> 00:10:57,420 of long division on power series. 228 00:10:57,420 --> 00:11:02,530 So just to recap, we talked about three methods 229 00:11:02,530 --> 00:11:05,420 for computing the coefficients of a power series. 230 00:11:05,420 --> 00:11:10,300 There's the formula that you were given, which works, 231 00:11:10,300 --> 00:11:11,300 and which you could use. 232 00:11:11,300 --> 00:11:13,710 In this case, it's a little complicated. 233 00:11:13,710 --> 00:11:16,410 Then there's the method of using a relationship 234 00:11:16,410 --> 00:11:19,570 between your power series and other known power series. 235 00:11:19,570 --> 00:11:21,940 In this case, we can use the relationship 236 00:11:21,940 --> 00:11:25,530 that we know our power series satisfies a certain product. 237 00:11:25,530 --> 00:11:28,380 We know that our power series times cosine of x equals to 1, 238 00:11:28,380 --> 00:11:31,180 and we can use that to solve for some of the coefficients. 239 00:11:31,180 --> 00:11:34,540 Or you can also, similarly, when you have that situation, 240 00:11:34,540 --> 00:11:37,690 you can also use long division to compute the coefficients. 241 00:11:37,690 --> 00:11:38,933 I'll end there.