[music]. Once, we believe that sine and cosine are important functions, they're all about the connection between angles and lengths. Well, then we want to apply our usual calculus trick. What happens if I wiggle the input to sine and cosine? You might think about trigonometry as being something about right triangles. But, here, I've drawn a picture of a circle and you can rephrase all this stuff in terms of just geometry of the unit circle. So this is the unit circle. The length of this radius is 1 and I've got a right triangle here and this angle is theta. That means this base here has like cosine theta and the height of this triangle is sine theta. The coordinates then, or this point on the unit circle are cosine theta sine theta. Now, let's make that angle just a little bit bigger. Let's suppose that I make this angle just a big bigger, and instead of thinking about theta, I'm thinking about an angle of measure theta plus h and that means this angle in between has measure h. We'll do a little bit of geometry to figure out how far that point moved when I wiggled from theta to theta plus h. So let's think about this point here and let's draw the tangent line to the circle at that particular point. Well, I'm going to draw a little tiny triangle, which is heading in the direction of that of that tangent line. And, so that it's tangent to the circle, the hypotenuse of that little tiny right triangle here in red will be perpendicular to this line here. I can actually determine the angles in that little, tiny right triangle. So we go this big right triangle down here, and just because its a triangle, this angle theta plus this angle in here plus this right angle have to add up to 180 degrees. But I've also got a straight line here and that means that this top angle plus this right angle plus this mystery angle must also add up to 180 degrees. Well, this plus this plus this is 180 degrees. And this plus this, same right angle, plus this mystery angle add up to 180 degrees. That means that, that mystery angle and that little tiny right triangle must also be theta. I'd also like to know the length of the hypotenuse of the little tiny triangle. Radians save the day. How so? Well, I want to know the length of this little piece of arc. What else do I know? I know this is a unit circle. And I know this angle here is h in radians. And the definition of radiance means that this little length of arc here has length h. Now, let's put my tiny right triangle back there. I'm going to have the hypotenuse of that little right triangle also be h. It's going to be close enough, right, because this little piece of curved arch and this straight line are awfully close. Now that I know the length of the hypotenuse and the angles in that right triangle I can use sine and cosine to determine the side lengths of the other two sides. So I've got a little tiny right triangle, hypotenuse h, that angle there is theta, and that means that this vertical distance here is h times cosine theta. And the horizontal distance of that little tiny red triangle is h sine theta. Okay. So how much did wiggling from theta to theta plus h move the point around the circle? So the original point here from angle theta had coordinates cosine theta sine theta. And the point up here which I got when I wiggled theta up to theta plus h, that point has coordinates cosine theta plus h sine theta plus h. So how much did wiggling from theta to theta plus h move the point? Well, if I use this little right triangle as the approximation, sine theta increased by about H cosign data, and cosign data decreased by about h sine theta. We're now in a position to make a claim about the derivative. In other words, from the picture, we learned that sine theta plus h is about sine theta plus h cosine theta. And cosine theta plus h is about cosine theta minus h sine theta. And as a result, we can say something now about the derivatives. How does changing theta affect sine? Well, about a factor of cosine theta compared to the input. So the derivative of sine is cosine theta. And how does changing theta affect cosine? Well, about a factor of negative sine. So the derivative of cosine is negative sine. Maybe you don't find all this geometry convincing. Well, we could go back to the definition of derivative in terms of limits and calculate the derivative of sin directly. So if I want to calculate the derivative of sin using the limit definition of the derivative, well, the derivative of sine would be the limit as h approaches 0 of sine theta plus h minus sine theta over h. The trouble now, is that I've gotta somehow calculate sine theta plus h. How can I do that? Well, you might remember, there's an angle sum formula for sine. Sine of alpha plus beta is sine alpha cosine beta plus cosine alpha sine beta. If I use this, but replace alpha by theta and beta by h, I get this. Sine of theta plus h can be replaced by sine theta cosine h plus cosine theta sine h. So let's do that. So, the derivative is the limit as h approaches zero of, instead of sine theta plus h, it's sine theta times cosine h. This first term, plus cosine theta sine h minus sine theta from up here and this whole thing is divided by h. So, this is sine theta plus h minus sine theta all over h. Now, I can simplify this a bit. I've got a common factor of sine theta, so I can pull that out. This is the limit as h approaches zero, pull out that common factor of sine theta. What's left over is cosine h minus 1 over h plus, I've still got this term here, cosine theta sine h over h. I'll write that as cosine theta times sine h over h. All right. So this limit calculates the derivative of sine. Now, it's written as a limit of a sum, which is a sum of the limits, provided the limits exist. So, I can also note that sine theta and cosine theta are constants. Right, h is the thing that's wiggling, so I can pull those constants out of the limits as well. So what I'm left with is sine theta. Times the limit as h approaches 0 of cosine h minus 1 over h. Plus cosine theta times the limit as h approaches 0 of sine h over h. Now, how do I calculate these limits? Well, we've got to remember way back to when we were calculating limits a long, long time ago. We can calculate these limits by hand, using say, the squeeze theorem. And it happens that this first limit is equal to 0 and the second limit is equal to 1. So I'm left with 0 plus cosine theta. So, this is a limit argument, back from the definition of derivative that the derivative of sine is cosine. So, regardless of whether you think more geometrically or more algebraically, the derivative of sine is cosine and the derivative of cosine is minus sine. Now, once you believe this, there is some sort of weird things you might notice, like what if you differentiate sine a whole bunch of times? So the derivative of sine is cosine and the second derivative of sine, is the derivative of the derivative. It's the derivative of cosine which is minus sine. And the third derivative of sine is the derivative of the second derivative and the derivative of minus sine is minus cosine. And the fourth derivative of sine, well, that's the derivative of the third derivative, which is minus cosine. And the derivative of a cosine is minus sine. So, the derivative of minus cosine is sine. So the fourth derivative of sine is sine. So that's kind of interesting. If you differentiate sine four times, you get back to itself. And we already know a function that if you differentiate just once, it spits out itself again, e to the x is its own derivative. So as sort of a fun challenge, you might try to find a function f, so that if you differentiate it twice, you get back the original function, but if you differentiate it only once, you don't get back the original function. And if you can do this, you can ask the same question for even higher derivatives. We know a function whose fourth derivative is itself, but none of the earlier derivatives are the function again. Can you find a function whose third derivative is itself, but the first and second derivatives aren't the original function? That's a fun little game to play, anyway, it's a little challenge for you to try to find such a function.