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