Sal's old Maclaurin and Taylor series tutorial
Polynomial approximations of functions (part 5) MacLaurin representation of sin x
Polynomial approximations of functions (part 5)
- Welcome back.
- Well, in the last video we took the Maclaurin series for
- cosine of x, the Maclaurin series representation.
- So I guess we might as well do the same for sine of x.
- And I'm sounding very nonchalant, but I have a reason
- behind why I'm doing this, and you'll see in a few videos from
- now, when we come up with the grand conclusion.
- So anyway, let's just set up f of x.
- And you might just want to do this yourself instead of
- watching me do it, because it should be pretty
- self-explanatory now that you saw cosine of x.
- And then you could check your work.
- You can pause right now, and then you can check to see
- that we got the same answer.
- You'll probably be right and I probably made
- a careless mistake.
- So f of x is equal to sine of x.
- First of all, let's just figure out all of the
- derivatives of sine of x.
- We can already guess that it probably cycles similar to
- cosine of x, with slight variation.
- So what's the derivative of sine of x?
- Well, that's just cosine of x.
- What's the second derivative?
- I'm just going to stop putting parentheses
- around these numbers.
- The second derivative, well, that's just derivative of that.
- It's minus sine of x.
- The third derivative of x.
- Well, I guess I'll put the parentheses so you don't think
- it's f to the third times x.
- The third derivative, well, that's just going to be the
- minus cosine, rightu0008?
- Because the derivative of sine is cosine, but then we have
- that minus sine there.
- And the fourth derivative.
- The derivative of cosine is minus sine, but we have a minus
- there, so we get back to sine.
- And then the cycle continues.
- So the fifth derivative is just going to be cosine of x, or
- just the derivative of the sine of x.
- And then the cycle continues, right?
- All right.
- So we know the derivatives, and we can just keep going.
- So let's evaluate the derivatives of our function
- of sine of x at x equals 0.
- f of 0.
- Well, that's sine of zero.
- What's sine of 0?
- Well, sine of 0 is 0.
- f prime of 0 is equal to cosine of 0.
- That's equal to 1.
- The second derivative at 0, that's minus sine of 0.
- Well, sine of 0 is still 0.
- So that's 0.
- You can see it's a very similar pattern to what we saw in the
- Maclaurin series for cosine of x.
- And then the third derivative evaluated at 0.
- That's cosine of 0 is 1.
- But we have a minus sine, so that's minus 1.
- This you already know.
- The fourth derivative is 0.
- Sine of 0 is 0.
- And then it starts to cycle again.
- The fifth derivative, 0 equal to 1.
- So we start with 0, then positive 1, then 0, then minus
- 1, then 0, then positive 1.
- Every other number is a 0.
- Every other, I guess you could say, coefficient in the
- Maclaurin series is a 0.
- The coefficient when you don't include the factorial term.
- And then the ones in between oscillate between positive
- 1 and negative 1.
- So what would be the Maclaurin series for sine of x?
- The Maclaurin series representation?
- So we could say that sine of x -- And remember, I haven't
- proven to you that the Maclaurin series representation
- of sine of x or cosine of x or e to the x really is equal to
- those functions over the entire domain.
- I might do that later.
- Frankly, I've been thinking about the proof myself.
- It hasn't been completely intuitive how to do that proof.
- Although if you test them out, it does seem to
- make a lot of sense.
- But you shouldn't just take my word for it.
- I'm going to look up the proof and I will prove
- it to you, eventually.
- But for now, you just have to take it as a bit of a leap of
- faith that the Maclaurin series representations just don't
- approximate those functions around 0, that when you take
- the infinite series, it actually equals the function.
- So sine of x.
- The Maclaurin series representation is going to be
- equal to -- well, f of 0, that's 0 plus f of -- so the
- first derivative, it's going to be 1 times x to the 1 over 1
- factorial, which is just 1.
- This is just 1.
- And then we have -- this is just plus 0 -- and then we have
- minus -- and now this is the third derivative -- so, minus 1
- times x to the third over 3 factorial.
- And then you have a 0.
- Then we have a plus 1.
- And this is now the fifth derivative, so x to the
- fifth over five factorial.
- And we'll just keep going, but I think you see the pattern
- as we write and rewrite it.
- Sine of x is equal to 0, so we get x to the first, so that's
- just x minus x to the third over 3 factorial plus x to
- the fifth over 5 factorial.
- And then you can imagine the pattern.
- We'd go minus -- we're just taking the odd numbers -- x to
- the seventh over 7 factorial plus x to the ninth over 9
- factorial minus x to the eleventh over 11 factorial,
- and we'll just keep going.
- And so we'll just keep oscillating in sine -- that's
- a bit of a pun -- and we use all of the odd exponents.
- So if I were to write that in sigma notation, and sigma
- notation often is the hard part.
- Well once again, the first term, when the term is 0 --
- this is the first term, right -- we get a positive sine.
- Because we're going to oscillate in sine, we're
- probably going to take negative 1 to some power.
- It'll be negative 1 to the n plus 1.
- So let's see if that works.
- If this is the first term, this will be a -- no,
- no, no, that won't work.
- It'll be to the 2n plus 1.
- Actually, I think I should have done that in the
- previous video, too.
- I think it should have been negative 1 to the 2n,
- not negative 1 to the n.
- I'm sorry for that mistake.
- So it's negative 1 to the 2n plus 1 times x to the 2n.
- Oh, no, no, sorry, I was right in the previous video.
- See, I'm confusing myself, because I don't
- count the 0 terms.
- It would probably help me to write the sigma down first.
- So this is equal to -- as you can see I do all of this in
- real time -- infinity from n is equal to 0.
- And so, the first term is positive, so it'll be
- negative 1 to the n, right?
- Because negative 1 to the 0 power is 1, right?
- So that's positive and then the second term is negative, then
- positive, negative, right?
- And so, the zeroth term is x, so it has to be x to the --
- let me see -- 2n plus 1.
- Does that work?
- Right, because the first term would then be 3.
- Right. x to the 2n plus 1 over 2n plus 1 factorial.
- It's almost easier when you just write it out like that.
- Well, that's pretty interesting.
- But what's even more interesting is if you see the
- similarity between the Maclaurin series representation
- for sine of x, and then the representation we figured
- out for cosine of x in the previous video.
- We figured out that cosine of x is equal to 1 minus x squared
- over 2 factorial plus x to the fourth over 4 factorial minus x
- to the sixth over six factorial plus x to the eighth
- over 8 factorial.
- So they're almost the opposite, right?
- They almost complement each other.
- The cosine, these are all of the even exponents, right?
- And even factorials.
- And sine is all of the odd exponents, because this
- is x to the 0, right?
- So that's why you get 1 here.
- And in sine, it's all of the odd exponents and all of the
- odd factorials in the denominator.
- So that by itself, I think, is pretty neat.
- What is especially neat, just another fodder for thought, is
- that we know from trigonometry that sine is just a shifted
- cosine function or that cosine is just a shifted
- sine function.
- But what's neat is by shifting it by pi over 2 -- which is all
- they are, right, if you were to graph it, they're just shifted
- 90 degrees to the left or the right of each other -- you can
- actually represent them differently by essentially
- picking the odd or even terms of this factorial polynomial
- series, whatever you want to call it.
- But anyway.
- Doesn't matter if you didn't understand what I said at
- the end, as long as you appreciate how cool this is.
- I will see you in the next video.
Be specific, and indicate a time in the video:
At 5:31, how is the moon large enough to block the sun? Isn't the sun way larger?
Have something that's not a question about this content?
This discussion area is not meant for answering homework questions.
Share a tip
When naming a variable, it is okay to use most letters, but some are reserved, like 'e', which represents the value 2.7831...
Thank the author
This is great, I finally understand quadratic functions!
Have something that's not a tip or thanks about this content?
This discussion area is not meant for answering homework questions.
At 2:33, Sal said "single bonds" but meant "covalent bonds."
For general discussions about Khan Academy, visit our Reddit discussion page.
Here are posts to avoid making. If you do encounter them, flag them for attention from our Guardians.
- disrespectful or offensive
- an advertisement
- low quality
- not about the video topic
- soliciting votes or seeking badges
- a homework question
- a duplicate answer
- repeatedly making the same post
- a tip or thanks in Questions
- a question in Tips & Thanks
- an answer that should be its own question