Derivative of sin x from First Principles: Why It's cos x
Starting from only the definition of a derivative and the sin(a + b) formula, see step by step why the derivative of sin x is cos x, with an interactive graph and a proof of the two key limits.
Every calculus student learns that the derivative of sin x is cos x, and most of us just memorise it. In this post we'll build it ourselves, starting from only the definition of a derivative and one formula from school trigonometry, and see exactly where the cos x comes from. No derivative rules allowed.
Before any algebra, look at the shape. A derivative tells you how steep a curve is at each point. The sine curve climbs most steeply at (slope ), is flat at its peak (slope ), and falls most steeply at (slope ). Write those slopes down, plot them underneath, and you get another wave that starts at . That wave is . The rest of this post proves it isn't a coincidence.
Step 0: what a derivative is
Pick a point on a curve, and a second point a small step further along, at . The straight line through the two points is called a secant. Its slope is rise over run:
Now make smaller and smaller. The second point slides towards the first, and the secant turns into the tangent: the line that just touches the curve at . The slope of that tangent is the derivative. The notation means “the value this settles on as gets closer and closer to ”, without ever being exactly :
That's what “first principles” means: we use only this definition. Try it below. Press Shrink h and watch the red secant turn into a tangent. The red dot underneath sits at the height of the secant's slope, and as shrinks it lands on the dashed cos curve. Then press Slide x across to watch the slopes trace out the whole curve.
- Slope of the red line
- -0.1620
- cos x
- 0.5403
- Difference
- -0.7023
Step 1: put sin into the definition
Replace with :
We can't simply plug in . The top becomes , the bottom becomes , and has no value. We have to rewrite the expression until the limit is something we can evaluate. The obstacle is : the and the are stuck together inside one sine.
Step 2: break sin(x + h) apart
This is where the angle addition formula comes in. For any two angles and :
With and , it pulls the two apart: . Every term is now something that depends only on times something that depends only on . That separation is the whole trick. Substitute it in:
Step 3: regroup
Put the two terms next to each other, factor out , then divide each piece by :
Look at what happened. and don't change when changes, so here they are just fixed multipliers. All the has gathered into two small fractions, and , with no in them at all. Once we know what those two fractions approach, we're done. Step through the whole derivation below, one move at a time. Red marks what changed in each step.
- 1
Step 4: why sin h / h goes to 1
Try small values and a pattern shows up: gives , gives , and gives . But a few numbers are not a proof. The proof is a picture on a circle of radius .
Draw an angle at the centre , measured in radians. It marks a point on the circle, at height . Extend the line from through until it meets the upright line through . Call that point ; its height is . Now compare three shapes that all have a corner at :
The small triangle has base and height , so its area is . The slice of the circle between and has area . That's what measuring in radians buys you: the whole circle is radians and has area , so each radian of slice is worth . The big triangle has base and height , so its area is . Each shape fits inside the next one, so after doubling:
Divide everything by (which is positive for small positive ), then flip each fraction over. Flipping reverses the inequalities:
As , . So is trapped between two walls, and , that both close in on . It has nowhere else to go. This argument is called the squeeze theorem. Negative gives the same answer, because .
This is also why calculus uses radians. In degrees, the slice would have area instead of , the limit would come out as instead of , and the derivative of would be . Radians are the unit that makes this constant exactly .
Step 5: why (cos h − 1) / h goes to 0
This one reuses the limit we just proved. Multiply the top and bottom by , and use (from ):
As , the first fraction goes to (Step 4), and the second goes to . So the whole thing goes to . The numbers agree: gives and gives . In plain words, near the cosine curve is flat at its peak, so shrinks much faster than does.
Step 6: put it together
The term is multiplied by zero and disappears. The term is multiplied by one and survives. That's where comes from: it was sitting in the angle addition formula all along, as the partner of .
A quick check with a calculator. Take , where . The secant slope is for , for , for and for . It closes in on , as promised.
Try it yourself: the derivative of cos x
The same method works for cosine. You need . Expand , group the terms, split the fraction, and use the same two limits:
The minus sign comes straight from the minus in the cosine formula. Work through it on paper once and it will stick.
The method in three moves
Write the definition. Use an identity to separate from . Reduce what's left to limits that don't depend on . That's first principles, and every derivative rule you have memorised was proved this way at some point.