WEBVTT

00:00:06.930 --> 00:00:07.460
Hi.

00:00:07.460 --> 00:00:08.960
Welcome back to recitation.

00:00:08.960 --> 00:00:11.190
We've been talking about Taylor
series for a number of

00:00:11.190 --> 00:00:14.190
functions and rules by which you
can compute Taylor series.

00:00:14.190 --> 00:00:16.860
I have here an example that I
don't think we did in lecture.

00:00:16.860 --> 00:00:20.980
So this is the function f
of x equals secant of x.

00:00:20.980 --> 00:00:23.610
Now, unlike some of the other
ones you've seen, there's not

00:00:23.610 --> 00:00:26.110
a really simple formula
for the whole Taylor

00:00:26.110 --> 00:00:27.060
series of secant x.

00:00:27.060 --> 00:00:30.160
So what I'd like you to do is
not to find, you know, a

00:00:30.160 --> 00:00:34.110
formula for the general term,
but rather, just to use some

00:00:34.110 --> 00:00:37.080
of the tools that we've learned
to compute the first

00:00:37.080 --> 00:00:40.180
few terms of the Taylor series
for f of x equals secant x.

00:00:40.180 --> 00:00:43.540
Say, up through the x to the
fourth term, if you wanted, or

00:00:43.540 --> 00:00:46.210
even a little further if you
were feeling ambitious.

00:00:46.210 --> 00:00:48.810
So why don't you pause the
video, have a go at that, come

00:00:48.810 --> 00:00:50.210
back, and we can
do it together.

00:00:58.830 --> 00:00:59.910
So welcome back.

00:00:59.910 --> 00:01:01.800
I asked you to compute
the first few

00:01:01.800 --> 00:01:03.690
terms of a Taylor series.

00:01:03.690 --> 00:01:06.630
One thing you can always do in
this case, is you can go and

00:01:06.630 --> 00:01:09.440
you can apply the general
formula that we have for

00:01:09.440 --> 00:01:13.330
Taylor series, and use it to
compute the series that way.

00:01:13.330 --> 00:01:15.620
So in order to do that, you
just need to compute a few

00:01:15.620 --> 00:01:17.540
derivatives of your function.

00:01:17.540 --> 00:01:20.620
So remember that the general
formula for a Taylor series is

00:01:20.620 --> 00:01:27.590
the Taylor series for f of x
is equal to the sum from n

00:01:27.590 --> 00:01:34.790
equals 0 to infinity of the nth
derivative of f taken at

00:01:34.790 --> 00:01:39.280
zero divided by n factorial
times x to the n.

00:01:39.280 --> 00:01:40.910
And since we're only interested
in the first few

00:01:40.910 --> 00:01:51.700
terms, this is f of 0 plus f
prime of 0 x plus f double

00:01:51.700 --> 00:01:56.220
prime of 0 over 2x squared,
plus dot dot dot.

00:01:56.220 --> 00:01:58.340
I'm not going to write out
the next few terms.

00:01:58.340 --> 00:02:01.310
And if you want to apply this
formula to secant of x, what

00:02:01.310 --> 00:02:03.730
you would have to do, is you
would have to compute these

00:02:03.730 --> 00:02:04.490
derivatives.

00:02:04.490 --> 00:02:06.180
And so we could try
doing that.

00:02:06.180 --> 00:02:09.830
So in our case, f of x is
equal to secant of x.

00:02:09.830 --> 00:02:14.670
So f of 0 is secant of
0, which is just 1.

00:02:14.670 --> 00:02:17.370
So then we need to know f prime
of x, so that's the

00:02:17.370 --> 00:02:19.150
derivative of secant of x.

00:02:19.150 --> 00:02:20.990
So this is one you
should remember.

00:02:20.990 --> 00:02:26.800
This is equal to secant
x times 10x.

00:02:26.800 --> 00:02:30.390
And when you plug in x equal
to 0, well, the tan x is 0.

00:02:30.390 --> 00:02:34.440
So f prime of 0 is equal to 0.

00:02:34.440 --> 00:02:35.470
And then you could keep going.

00:02:35.470 --> 00:02:37.650
So you could compute f
double prime of x.

00:02:37.650 --> 00:02:39.400
So we would have to compute
the derivative of

00:02:39.400 --> 00:02:40.720
secant x tan x.

00:02:40.720 --> 00:02:42.490
And you would do that
by the product rule.

00:02:42.490 --> 00:02:45.870
You know, you take derivative of
secant of x, and that gives

00:02:45.870 --> 00:02:54.820
you secant x tan x
times 10x plus--

00:02:54.820 --> 00:02:55.460
and then you, OK.

00:02:55.460 --> 00:02:59.410
So you leave secant of x, and
you multiply it by the

00:02:59.410 --> 00:03:04.260
derivative of tangent, which
is secant squared x.

00:03:04.260 --> 00:03:06.990
And now when you put in
0 here, you get f

00:03:06.990 --> 00:03:09.160
double prime of 0.

00:03:09.160 --> 00:03:09.780
Well, OK.

00:03:09.780 --> 00:03:11.660
So this has a tan x in
it, so that part's

00:03:11.660 --> 00:03:12.550
going to give you 0.

00:03:12.550 --> 00:03:15.270
And here we end up with secant
of 0 times secant squared of

00:03:15.270 --> 00:03:18.070
0, so that's 1 times
1 times 1.

00:03:18.070 --> 00:03:19.000
So that's just 1.

00:03:19.000 --> 00:03:22.040
So f double prime of 0 is 1, and
you could keep doing this.

00:03:22.040 --> 00:03:24.300
Now one thing you'll notice is
that this is getting more and

00:03:24.300 --> 00:03:24.970
more complicated.

00:03:24.970 --> 00:03:27.230
I mean, we can simplify this
expression a little bit.

00:03:27.230 --> 00:03:31.460
We could write it as secant x
tan squared x plus secant

00:03:31.460 --> 00:03:34.020
cubed x, and there are, you
know, all sorts of trig

00:03:34.020 --> 00:03:36.400
manipulations you could do, if
you wanted to try and rewrite

00:03:36.400 --> 00:03:39.120
that in some simpler form.

00:03:39.120 --> 00:03:43.200
But fundamentally, it's more
complicated than the first

00:03:43.200 --> 00:03:45.060
derivative was, and that's more

00:03:45.060 --> 00:03:46.010
complicated in the function.

00:03:46.010 --> 00:03:48.010
And it will keep getting more
complicated as you compute

00:03:48.010 --> 00:03:49.610
more derivatives.

00:03:49.610 --> 00:03:51.570
So we can do this.

00:03:51.570 --> 00:03:54.510
So so far this shows us, by the
way, that this is equal to

00:03:54.510 --> 00:04:00.810
1 plus 0x plus x squared over
2 plus dot dot dot.

00:04:00.810 --> 00:04:02.610
And if you wanted to compute,
you know, up through the

00:04:02.610 --> 00:04:05.630
fourth degree term or something
like this, that's

00:04:05.630 --> 00:04:07.760
something that's manageable.

00:04:07.760 --> 00:04:09.700
But I want to suggest that there
are maybe some nicer

00:04:09.700 --> 00:04:11.610
ways to do it.

00:04:11.610 --> 00:04:16.400
So one thing to notice is that
secant of x is closely related

00:04:16.400 --> 00:04:18.570
to the function cosine of x.

00:04:18.570 --> 00:04:21.120
And you know the Taylor series
for cosine of x.

00:04:21.120 --> 00:04:23.710
So one thing you could think
to do, is to leverage the

00:04:23.710 --> 00:04:26.200
information that you have about
cosine of x in order to

00:04:26.200 --> 00:04:29.350
use it to get some information
about secant of x.

00:04:29.350 --> 00:04:37.555
So one simple way to do that,
is that you know that cosine

00:04:37.555 --> 00:04:40.490
of x is even.

00:04:40.490 --> 00:04:42.170
It's an even function.

00:04:42.170 --> 00:04:44.760
Cosine of minus x is equal
to cosine of x.

00:04:44.760 --> 00:04:46.910
So that means secant
of x is also even.

00:04:54.880 --> 00:04:56.840
Secant of x is an
even function.

00:04:56.840 --> 00:04:59.870
And you've seen that even
functions, their Taylor

00:04:59.870 --> 00:05:05.320
series, all the odd powers
have coefficient 0.

00:05:05.320 --> 00:05:07.680
So what that means is without
ever computing the third

00:05:07.680 --> 00:05:10.570
derivative, we can know already
that the next term in

00:05:10.570 --> 00:05:14.800
this Taylor series is going
to be 0x cubed over 6.

00:05:14.800 --> 00:05:15.280
OK?

00:05:15.280 --> 00:05:18.350
So that's nice.

00:05:18.350 --> 00:05:34.740
So the odd terms of the Taylor
series for secant of x are 0.

00:05:34.740 --> 00:05:35.000
OK.

00:05:35.000 --> 00:05:36.480
So that's one thing you
can get right away.

00:05:36.480 --> 00:05:38.930
So that gives you, if you like,
that gives you half of

00:05:38.930 --> 00:05:40.280
the terms of the
Taylor series.

00:05:40.280 --> 00:05:43.920
It's a little bit
of a joke, but.

00:05:43.920 --> 00:05:47.110
OK, so then you only need to
figure out the even terms.

00:05:47.110 --> 00:05:49.910
That's one way we can leverage
the relationship between

00:05:49.910 --> 00:05:51.150
secant and cosine.

00:05:51.150 --> 00:05:53.930
The other way is that we can
remember that Taylor series

00:05:53.930 --> 00:05:56.540
multiply just like
polynomials do.

00:05:56.540 --> 00:06:03.360
So if secant is 1 over cosine,
that means secant times cosine

00:06:03.360 --> 00:06:04.810
is equal to 1.

00:06:04.810 --> 00:06:07.450
OK?

00:06:07.450 --> 00:06:17.870
So idea, secant of x times
cosine of x is equal to 1.

00:06:17.870 --> 00:06:21.220
Now, that means that the Taylor
series for secant of x

00:06:21.220 --> 00:06:23.780
times the Taylor series
for cosine of x has to

00:06:23.780 --> 00:06:25.380
simplify just to 1.

00:06:25.380 --> 00:06:28.370
So we can write down that
product as a product of two

00:06:28.370 --> 00:06:30.280
infinite polynomials,
and we can start

00:06:30.280 --> 00:06:31.880
multiplying term by term.

00:06:31.880 --> 00:06:36.080
And that'll allow us to solve
for a bunch of terms, just by

00:06:36.080 --> 00:06:38.130
solving some simple
linear equations.

00:06:38.130 --> 00:06:39.530
So let me show you
what I mean.

00:06:39.530 --> 00:06:41.040
So we know--

00:06:41.040 --> 00:06:43.200
let me write it as cosine
times secant.

00:06:43.200 --> 00:06:52.490
So we know that cosine of x is
1 minus x squared over 2 plus

00:06:52.490 --> 00:06:55.450
x to the fourth over 24.

00:06:55.450 --> 00:06:57.150
That's 4 factorial.

00:06:57.150 --> 00:07:01.960
Minus x to the sixth over 720,
which is 6 factorial

00:07:01.960 --> 00:07:03.980
plus dot dot dot.

00:07:03.980 --> 00:07:06.940
And so we know that if we
multiply this by the series

00:07:06.940 --> 00:07:07.670
for secant of x--

00:07:07.670 --> 00:07:08.890
well, what is the series
for secant of x?

00:07:08.890 --> 00:07:14.280
Well, we've already computed a
few terms. We know that it's 1

00:07:14.280 --> 00:07:18.370
plus x squared over 2, we
computed that already.

00:07:18.370 --> 00:07:20.225
And we know that the third
degree term is 0.

00:07:20.225 --> 00:07:24.960
So there's some fourth degree
coefficient a4 x to the

00:07:24.960 --> 00:07:28.300
fourth, or 4 factorial.

00:07:28.300 --> 00:07:29.380
And there's some--

00:07:29.380 --> 00:07:31.640
well, we know, we said it's
even, so we know the fifth

00:07:31.640 --> 00:07:33.360
degree coefficient is 0.

00:07:33.360 --> 00:07:35.950
So then the sixth degree
coefficient we don't know yet.

00:07:35.950 --> 00:07:41.230
So this is plus a sub six times
x to the sixth over six

00:07:41.230 --> 00:07:43.920
factorial, plus dot dot dot.

00:07:43.920 --> 00:07:46.180
So we know that when we multiply
these two things

00:07:46.180 --> 00:07:48.280
together, it has to
give us just 1.

00:07:48.280 --> 00:07:51.100
All the higher order terms have
to cancel, because over

00:07:51.100 --> 00:07:52.590
here we have a 1.

00:07:52.590 --> 00:07:55.350
So what you can do, is you can
actually try multiplying these

00:07:55.350 --> 00:07:55.850
things out.

00:07:55.850 --> 00:07:57.900
So it's easy to see, for
example, that the constant

00:07:57.900 --> 00:08:00.700
term of this product is just
1 times 1, which is 1.

00:08:00.700 --> 00:08:01.250
Which is good.

00:08:01.250 --> 00:08:03.360
So that's a check on what
we've done so far.

00:08:03.360 --> 00:08:06.320
And there is no x-term, because
there are no x's.

00:08:06.320 --> 00:08:11.690
The x squared term here is 1
times x squared over 2 minus x

00:08:11.690 --> 00:08:13.400
squared over 2 times 1.

00:08:13.400 --> 00:08:15.100
Well, that gives us
0, so that's good.

00:08:15.100 --> 00:08:19.510
So this product is equal to--
well, it's 1, plus we saw 0x,

00:08:19.510 --> 00:08:21.030
plus 0x squared.

00:08:21.030 --> 00:08:22.200
How about the x cubed term?

00:08:22.200 --> 00:08:24.190
Well, there are no odd terms
in this product, so

00:08:24.190 --> 00:08:24.990
there's no x cubed.

00:08:24.990 --> 00:08:26.540
How about the x to
the fourth term?

00:08:26.540 --> 00:08:27.150
Well, OK.

00:08:27.150 --> 00:08:28.550
So how do we get an
x to the fourth?

00:08:28.550 --> 00:08:31.140
We could have an x to the fourth
here times a constant.

00:08:31.140 --> 00:08:35.580
So that's x to the
fourth over 24.

00:08:35.580 --> 00:08:38.520
Or, we could have an x squared
times an x squared.

00:08:38.520 --> 00:08:40.960
So in this case, that gives us
minus x squared over 2 times x

00:08:40.960 --> 00:08:44.600
squared over 2, which is minus
x to the fourth over 4.

00:08:44.600 --> 00:08:46.790
Or we could have a constant
times an x to the fourth.

00:08:46.790 --> 00:08:55.430
So this is plus a4 x to
the fourth over 24.

00:08:55.430 --> 00:08:57.850
And then we'll have a sixth
degree term, and so on.

00:08:57.850 --> 00:09:00.290
Notice that there's never any
involvement from the higher

00:09:00.290 --> 00:09:02.540
order terms in the fourth
power here.

00:09:02.540 --> 00:09:02.860
Right?

00:09:02.860 --> 00:09:05.170
If you ever took an x to the
sixth here, well then

00:09:05.170 --> 00:09:08.100
everything you multiply it
by has at least an x

00:09:08.100 --> 00:09:09.400
to the sixth power.

00:09:09.400 --> 00:09:11.410
So we don't have to worry about
that showing up in the x

00:09:11.410 --> 00:09:13.030
to the fourth term.

00:09:13.030 --> 00:09:13.780
Well, OK.

00:09:13.780 --> 00:09:17.240
We know this is actually equal
to 1, so we know that this

00:09:17.240 --> 00:09:18.670
thing has to be 0.

00:09:18.670 --> 00:09:20.130
This is x to the fourth term.

00:09:20.130 --> 00:09:21.420
It has to be 0.

00:09:21.420 --> 00:09:29.450
So that means that 1/24
minus 1/4 for plus a4

00:09:29.450 --> 00:09:32.450
over 24 equals 0.

00:09:32.450 --> 00:09:34.270
So OK.

00:09:34.270 --> 00:09:37.340
So now you can multiply
everything through by 24, and

00:09:37.340 --> 00:09:42.110
rearrange to figure out
that a4 is equal to 5.

00:09:42.110 --> 00:09:43.650
So I've done that correctly.

00:09:43.650 --> 00:09:46.050
And then if you wanted, it would
be fairly easy to go

00:09:46.050 --> 00:09:48.920
back up and then you look at
the x to the sixth term.

00:09:48.920 --> 00:09:51.820
And from there, you could figure
out that a6 was equal

00:09:51.820 --> 00:09:54.500
to, say, 61 or something
like that.

00:09:54.500 --> 00:09:56.250
I think 61.

00:09:56.250 --> 00:09:57.520
And you could keep doing this.

00:09:57.520 --> 00:10:01.310
So this is one way to compute
more terms of the series for

00:10:01.310 --> 00:10:03.700
secant of x.

00:10:03.700 --> 00:10:06.170
Another thing you could do--
which I'll just mention very

00:10:06.170 --> 00:10:08.280
briefly, I'm not going to show
you how to do it-- is that you

00:10:08.280 --> 00:10:11.050
can do long division
on power series.

00:10:11.050 --> 00:10:14.540
So it actually works out very,
it works out just like this.

00:10:14.540 --> 00:10:16.950
It's mathematically
equivalent.

00:10:16.950 --> 00:10:19.630
The way you actually do
it looks different.

00:10:19.630 --> 00:10:21.990
It looks like long division.

00:10:21.990 --> 00:10:24.600
When you do long division with
polynomials, you start with

00:10:24.600 --> 00:10:25.910
the highest order term.

00:10:25.910 --> 00:10:29.160
Of course, power series don't
have highest order terms. What

00:10:29.160 --> 00:10:30.930
you actually do with a power
series, is you start with the

00:10:30.930 --> 00:10:32.090
lowest order term.

00:10:32.090 --> 00:10:36.590
So to divide this into 1, you'd
say, oh, you mean the

00:10:36.590 --> 00:10:39.780
factor of 1, and then you'll
have a, you know, you subtract

00:10:39.780 --> 00:10:42.450
off 1 times this, and that gives
you an x squared plus 2.

00:10:42.450 --> 00:10:45.800
And so, OK, so you say, I
need a plus an x squared

00:10:45.800 --> 00:10:47.060
plus 2, and so on.

00:10:47.060 --> 00:10:51.770
So that was too brief for you to
understand it properly, but

00:10:51.770 --> 00:10:55.770
you can go and look up somewhere
the method of long

00:10:55.770 --> 00:10:57.420
division on power series.

00:10:57.420 --> 00:11:02.650
So just to recap, we talked
about three methods for

00:11:02.650 --> 00:11:05.420
computing the coefficients
of a power series.

00:11:05.420 --> 00:11:10.570
There's the formula that you
were given, which works, and

00:11:10.570 --> 00:11:11.300
which you could use.

00:11:11.300 --> 00:11:13.710
In this case, it's a
little complicated.

00:11:13.710 --> 00:11:16.680
Then there's the method of using
a relationship between

00:11:16.680 --> 00:11:19.570
your power series and other
known power series.

00:11:19.570 --> 00:11:22.950
In this case, we can use the
relationship that we know our

00:11:22.950 --> 00:11:25.530
power series satisfies
a certain product.

00:11:25.530 --> 00:11:28.380
We know that our power series
times cosine of x equals to 1,

00:11:28.380 --> 00:11:31.180
and we can use that to solve for
some of the coefficients.

00:11:31.180 --> 00:11:34.540
Or you can also, similarly, when
you have that situation,

00:11:34.540 --> 00:11:37.690
you can also use long division
to compute the coefficients.

00:11:37.690 --> 00:11:39.340
I'll end there.