Differentiating Sin and Cos Functions
Two standard results that unlock every trig derivative to come — with tan x following as a bonus.
The two standard results
Differentiating from first principles — using the fact that, when $x$ is measured in radians, $\dfrac{\sin h}{h}\to1$ and $\dfrac{\cos h-1}{h}\to0$ as $h\to0$ — gives two clean results:
Notice the pattern: differentiating rotates sine into cosine, and cosine into negative sine. Differentiate twice and you return to the original function with a sign flip — $\dfrac{d^2}{dx^2}(\sin x)=-\sin x$.
Both results depend on $x$ being in radians. If $x$ were in degrees, extra conversion factors of $\dfrac{\pi}{180}$ would creep into every derivative — one of the main reasons calculus always works in radians.
A bonus result: differentiating tan x
Since $\tan x=\dfrac{\sin x}{\cos x}$ is built from sine and cosine, its derivative follows from the two results above — the full derivation needs the quotient rule (met in a later lesson), but the result itself is worth having now:
where $\sec x=\dfrac{1}{\cos x}$. All three results — for $\sin x$, $\cos x$, and $\tan x$ — are worth memorising immediately, since they appear constantly from here on.
Extending to sin(kx) and cos(kx)
For a constant $k$, the same two functions scaled inside give:
The extra factor of $k$ appears because the "inside" of the function isn't simply $x$ — it's $kx$, which has its own rate of change of $k$. This is a special case of a general technique for differentiating composite functions called the chain rule, covered in full a little later in this topic. For now, it's enough to recognise the pattern: differentiate as if the inside were $x$, then multiply by the derivative of the inside.
Worked example 1
Worked example 2
Worked example 3
Writing $y=\sin x+\cos x$ in the form $R\sin(x+\alpha)$ (met in the Trigonometric Modelling topic) shows immediately why these two stationary points exist one period apart — they're the maximum and minimum of the single wave $R\sin(x+\alpha)$.
Forgetting the negative sign when differentiating $\cos x$ (writing $\dfrac{d}{dx}(\cos x)=\sin x$ instead of $-\sin x$), and forgetting the factor of $k$ when differentiating $\sin kx$, $\cos kx$, or $\tan kx$.
Check yourself
Differentiate $y=2\cos x-3\sin 4x+\tan x$.