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:10.630
We've been talking
about Taylor series

00:00:10.630 --> 00:00:12.200
for a number of
functions and rules

00:00:12.200 --> 00:00:14.190
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.200
Now, unlike some of the
other ones you've seen,

00:00:23.200 --> 00:00:26.110
there's not a really simple
formula for the whole Taylor

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

00:00:27.020 --> 00:00:28.770
So what I'd like you
to do is not to find,

00:00:28.770 --> 00:00:31.970
you know, a formula
for the general term,

00:00:31.970 --> 00:00:35.490
but rather, just to
use some of the tools

00:00:35.490 --> 00:00:37.750
that we've learned to
compute the first few terms

00:00:37.750 --> 00:00:40.180
of the Taylor series for
f of x equals secant x.

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

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

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

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

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

00:00:59.910 --> 00:01:03.690
I asked you to compute the first
few terms of a Taylor series.

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

00:01:06.510 --> 00:01:08.720
and you can apply the
general formula that we

00:01:08.720 --> 00:01:10.970
have for Taylor
series, and use it

00:01:10.970 --> 00:01:13.330
to compute the series that way.

00:01:13.330 --> 00:01:15.060
So in order to do
that, you just need

00:01:15.060 --> 00:01:17.540
to compute a few derivatives
of your function.

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

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

00:01:27.590 --> 00:01:33.070
equals 0 to infinity
of the nth derivative

00:01:33.070 --> 00:01:39.280
of f taken at zero divided by
n factorial times x to the n.

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

00:01:41.680 --> 00:01:49.650
this is f of 0
plus f prime of 0 x

00:01:49.650 --> 00:01:56.220
plus f double prime of 0 over
2 x 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:00.600
And if you want to apply
this formula to secant

00:02:00.600 --> 00:02:02.370
of x, what you
would have to do, is

00:02:02.370 --> 00:02:04.490
you would have to compute
these 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.270
So then we need to know
f prime of x, so that's

00:02:17.270 --> 00:02:19.150
the 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 tan x.

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.221
So f prime of 0 is equal to 0.

00:02:34.221 --> 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:40.720
So we would have to compute the
derivative of 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:44.570
You know, you take
derivative of secant

00:02:44.570 --> 00:02:51.846
of x, and that gives you
secant x tan x times tan

00:02:51.846 --> 00:02:55.460
x plus-- and then you, OK.

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

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

00:03:04.260 --> 00:03:09.160
And now when you put in 0 here,
you get f 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.650
And here we end up with secant
of 0 times secant squared of 0,

00:03:15.650 --> 00:03:18.070
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:21.845
So f double prime of 0 is 1,
and you could keep doing this.

00:03:21.845 --> 00:03:23.970
Now one thing you'll notice
is that this is getting

00:03:23.970 --> 00:03:24.970
more and 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:30.110
We could write it as
secant x tan squared

00:03:30.110 --> 00:03:33.050
x plus secant cubed x,
and there are, you know,

00:03:33.050 --> 00:03:35.150
all sorts of trig
manipulations you could do,

00:03:35.150 --> 00:03:39.120
if you wanted to try and rewrite
that in some simpler form.

00:03:39.120 --> 00:03:42.330
But fundamentally,
it's more complicated

00:03:42.330 --> 00:03:44.636
than the first derivative
was, and that's

00:03:44.636 --> 00:03:46.010
more complicated
in the function.

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

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

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

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

00:03:55.410 --> 00:04:00.467
plus 0x plus x squared
over 2 plus dot dot dot.

00:04:00.467 --> 00:04:01.842
And if you wanted
to compute, you

00:04:01.842 --> 00:04:04.430
know, up through the fourth
degree term or something

00:04:04.430 --> 00:04:07.604
like this, that's something
that's manageable.

00:04:07.604 --> 00:04:10.020
But I want to suggest that
there are maybe some nicer ways

00:04:10.020 --> 00:04:11.610
to do it.

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

00:04:15.150 --> 00:04:18.570
is closely related 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:22.670
So one thing you
could think to do,

00:04:22.670 --> 00:04:25.280
is to leverage the information
that you have about cosine

00:04:25.280 --> 00:04:28.235
of x in order to use it to get
some information about secant

00:04:28.235 --> 00:04:29.350
of x.

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

00:04:39.660 --> 00:04:40.490
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.310
So what that means is
without ever computing

00:05:07.310 --> 00:05:09.630
the third derivative,
we can know already

00:05:09.630 --> 00:05:11.580
that the next term
in this Taylor series

00:05:11.580 --> 00:05:14.780
is going to be 0 x cubed over 6.

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

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

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

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

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

00:05:36.791 --> 00:05:38.592
So that gives you,
if you like, that

00:05:38.592 --> 00:05:40.633
gives you half of the
terms of the Taylor series.

00:05:40.633 --> 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:50.400
That's one way we can leverage
the relationship between secant

00:05:50.400 --> 00:05:51.150
and cosine.

00:05:51.150 --> 00:05:52.970
The other way is
that we can remember

00:05:52.970 --> 00:05:56.540
that Taylor series multiply
just like polynomials do.

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

00:06:01.130 --> 00:06:04.810
means secant times
cosine 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:20.360
Now, that means that
the Taylor series

00:06:20.360 --> 00:06:23.440
for secant of x times the
Taylor series for cosine of x

00:06:23.440 --> 00:06:25.380
has to simplify just to 1.

00:06:25.380 --> 00:06:27.360
So we can write
down that product

00:06:27.360 --> 00:06:29.580
as a product of two
infinite polynomials,

00:06:29.580 --> 00:06:31.880
and we can start
multiplying term by term.

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

00:06:35.670 --> 00:06:38.130
just by 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:43.200
So we know-- let me write
it as cosine times secant.

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

00:06:52.830 --> 00:06:58.120
to the fourth over 24--
that's 4 factorial-- minus x

00:06:58.120 --> 00:07:03.980
to the sixth over 720, which is
6 factorial, plus dot dot dot.

00:07:03.980 --> 00:07:05.680
And so we know that
if we multiply this

00:07:05.680 --> 00:07:07.432
by the series for
secant of x-- well,

00:07:07.432 --> 00:07:08.890
what is the series
for secant of x?

00:07:08.890 --> 00:07:11.000
Well, we've already
computed a few terms.

00:07:11.000 --> 00:07:17.260
We know that it's 1
plus x squared over 2,

00:07:17.260 --> 00:07:18.370
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.645
So there's some fourth
degree coefficient, a_4, x

00:07:24.645 --> 00:07:28.300
to the fourth, or 4 factorial.

00:07:28.300 --> 00:07:30.940
And there's some-- well,
we know, we said it's even,

00:07:30.940 --> 00:07:33.360
so we know the fifth
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:42.400
So this is plus a sub 6 times x
to the sixth over 6 factorial,

00:07:42.400 --> 00:07:43.920
plus dot dot dot.

00:07:43.920 --> 00:07:46.460
So we know that when we multiply
these two things together,

00:07:46.460 --> 00:07:48.280
it has to give us just 1.

00:07:48.280 --> 00:07:50.620
All the higher-order
terms have to cancel,

00:07:50.620 --> 00:07:52.590
because over here we have a 1.

00:07:52.590 --> 00:07:54.510
So what you can do, is
you can actually try

00:07:54.510 --> 00:07:55.850
multiplying these things out.

00:07:55.850 --> 00:07:57.350
So it's easy to
see, for example,

00:07:57.350 --> 00:07:59.870
that the constant term of this
product is just 1 times 1,

00:07:59.870 --> 00:08:00.667
which is 1.

00:08:00.667 --> 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:09.280
The x squared term
here is 1 times

00:08:09.280 --> 00:08:13.400
x squared over 2 minus x
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:17.850
So this product is
equal to-- well, it's 1,

00:08:17.850 --> 00:08:21.030
plus we saw 0x,
plus 0 x squared.

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

00:08:22.156 --> 00:08:24.030
Well, there are no odd
terms in this product,

00:08:24.030 --> 00:08:24.990
so 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.050
Well, OK.

00:08:27.050 --> 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.322
Or, we could have an x
squared times an x squared.

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

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

00:08:44.582 --> 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 a_4 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:08:59.710
Notice that there's
never any involvement

00:08:59.710 --> 00:09:02.360
from the higher-order terms
in the fourth power here.

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

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

00:09:04.790 --> 00:09:07.820
well then everything you
multiply it by has at least an

00:09:07.820 --> 00:09:09.002
x to the sixth power.

00:09:09.002 --> 00:09:10.960
So we don't have to worry
about that showing up

00:09:10.960 --> 00:09:13.030
in the x to the fourth term.

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

00:09:13.780 --> 00:09:16.270
We know this is
actually equal to 1,

00:09:16.270 --> 00:09:18.670
so we know that this
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:31.000
So that means that 1 over 24
minus 1 over 4 plus a_4 over 24

00:09:31.000 --> 00:09:32.450
equals 0.

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

00:09:34.270 --> 00:09:37.090
So now you can multiply
everything through by 24

00:09:37.090 --> 00:09:42.110
and rearrange to figure
out that a_4 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.550
And then if you wanted, it would
be fairly easy to go back up

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

00:09:48.920 --> 00:09:50.460
And from there, you
could figure out

00:09:50.460 --> 00:09:54.500
that a_6 was equal 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:00.230
So this is one way
to compute more terms

00:10:00.230 --> 00:10:03.700
of the series for secant of x.

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

00:10:05.580 --> 00:10:07.538
mention very briefly,
I'm not going to show you

00:10:07.538 --> 00:10:09.850
how to do it-- is that
you can do long division

00:10:09.850 --> 00:10:11.050
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:23.920
When you do long division
with polynomials,

00:10:23.920 --> 00:10:25.910
you start with the
highest-order term.

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

00:10:28.517 --> 00:10:30.350
What you actually do
with a power series, is

00:10:30.350 --> 00:10:32.090
you start with the
lowest-order term.

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

00:10:35.910 --> 00:10:38.150
you need a factor of
1, and then you'll

00:10:38.150 --> 00:10:40.826
have a-- you know, you
subtract off 1 times this,

00:10:40.826 --> 00:10:42.450
and that gives you
an x squared plus 2.

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

00:10:46.280 --> 00:10:47.060
and so on.

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

00:10:50.530 --> 00:10:55.310
but you can go and look
up somewhere the method

00:10:55.310 --> 00:10:57.420
of long division
on power series.

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

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

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

00:11:10.300 --> 00:11:11.300
and 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.410
Then there's the method
of using a relationship

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

00:11:19.570 --> 00:11:21.940
In this case, we can
use the relationship

00:11:21.940 --> 00:11:25.530
that we know our 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:38.933
I'll end there.