# Derivatives of Sine and Cosine
$
\begin{gather}
\frac d {d\theta} \bigg[\sin\theta\bigg] = \cos \theta \\ \frac d {d\theta}\bigg[\cos\theta\bigg] = -\sin \theta
\end{gather}
$
^qei2uq
## Reasoning Using Geometry
To reason about the derivative of sine think about what it represents, namely walking around the unit circle by an arc whose length is $\theta$. As the length of that arc increases by $d \theta$, $d \sin \theta$ is the side of a triangle whose hypotenuse is $d\theta$ (because the $d \theta$ approaches 0, the shape in question resembles a triangle more and more). The angle of that triangle is also $\theta$, so we can state the following:
![[Screenshot 2024-05-18 at 17.35.11.png]]
$
\begin{gather}
d \sin \theta = \cos \theta \, d\theta \\
\frac {d \sin \theta} {d\theta} = \cos \theta
\end{gather}
$
Similarly, the change of cosine is $\sin \theta \, d \theta$, per same triangle (note that the change is negative because cosine is decreasing).
This explanation comes from 3Blue1Brown: https://youtu.be/S0_qX4VJhMQ?si=7mACxYlcgMbIa1p3&t=893
## Determining the Derivatives Algebraically Using Limits
In order to determine the derivatives of trigonometric functions we first need to determine these two other limits: $\lim_{h \to 0} \frac {\sin h} h$ and $\lim_{h \to 0} \frac {1 - \cos h} h$.
### $\lim_{h \to 0} \frac {\sin h} h$
We start with the unit circle and the area of the following triangle.
<img src="https://ds055uzetaobb.cloudfront.net/uploads/DNyHY42qVQ-group-3.png" style="background: white; padding: 10px; width: 200px" />
$
A = \left|\frac 1 2 \cos \theta \sin \theta \right| \quad \forall\theta: -\frac \pi 2 < \theta < \frac \pi 2
$
The second area of interest is that of the following larger triangle, whose hypothenuse is $h$:
<img src="https://ds055uzetaobb.cloudfront.net/uploads/lJA3rnA9QK-group-4.png" style="background: white; padding: 10px; width: 200px" />
$
\begin{gather}
1 = \cos \theta \cdot h \\
h = \frac 1 {\cos \theta} \\
A = \left | \frac 1 2 \sin \theta \cdot h \right| = \left | \frac 1 2 \frac {\sin \theta} {\cos \theta} \right| \\
A = \left | \frac 1 2 \tan \theta \right | \quad \forall\theta: - \frac \pi 2 < \theta < \frac \pi 2
\end{gather}
$
Third area of interest is that of the sector formed by $\theta$.
$A = \left | \frac 1 2 \theta \right |$
(see [[Circle#Area of a Sector]] for definition).
Notice the relationship between the three areas. The area of the small triangle is the smallest, followed by the area of the sector. Of the three shapes, the large triangle is the one with the biggest area.
$
\left | \frac 1 2 \cos \theta \sin \theta \right | \le \left | \frac 1 2 \theta \right| \le \left | \frac 1 2 \tan \theta \right | \quad \forall\theta: -\frac \pi 2 < \theta < \frac \pi 2
$
Lets simplify this by looking at the left side first:
$
\begin{gather}
\left |\frac 1 2 \cos \theta \sin \theta \right | \le \left | \frac 1 2 \theta \right | & \text{multiply by} \left | \frac 2 {\theta \cos \theta} \right | \\
\left |\frac {\sin \theta} \theta \right | \le \left | \frac 1 {\cos \theta} \right | \\
\frac {\sin \theta} \theta \le \frac 1 {\cos \theta} &\forall\theta: -\frac \pi 2 < \theta < \frac \pi 2
\end{gather}
$
And the right side:
$
\begin{gather}
\left | \frac 1 2 \theta \right | \le \left | \frac 1 2 \tan \theta \right | \\
|\theta| \le \left | \frac {\sin \theta} {\cos \theta} \right | & \text {multiply by} \left|\frac {\cos \theta} \theta \right | \\
|\cos \theta | \le \left | \frac {\sin \theta} \theta \right | \\
\cos \theta \le \frac {\sin \theta} \theta &\forall\theta: -\frac \pi 2 < \theta < \frac \pi 2
\end{gather}
$
If we combine the two expressions we get
$
\cos \theta \le \frac {\sin \theta} \theta \le \frac 1 {\cos \theta} \quad \forall\theta: -\frac \pi 2 < \theta < \frac \pi 2
$
Per [[The Squeeze Theorem]], because $\lim_{\theta \to 0} \cos \theta = 1$, and $\lim_{\theta \to 0} \frac 1 {\cos \theta} =1$:
$
\lim_{\theta \to 0}\frac {\sin \theta} {\theta} = 1
$
### $\lim_{h \to 0} \frac {1 - \cos h} h$
$
\begin{align}
\frac {1 - \cos h} h &= \frac {1 - \cos h} h \frac {1 + \cos h} {1 + \cos h} \\
&= \frac {1 - \cos^2 h} {h (1 + \cos h)} & \text{apply Pythagorean identity} \\
&= \frac {\sin^2h} {h (1 + \cos h)} \\
\frac {1 - \cos h} h &= \frac {\sin h} {h} \cdot \frac {\sin h} {1 + \cos h} \\
\lim_{h \to 0} \frac {1 - \cos h} h &= \lim_{h \to 0} \frac {\sin h} {h} \cdot \frac {\lim_{h \to 0} \sin h} {\lim_{h \to 0} [1 + \cos h]} \\
\lim_{h \to 0} \frac {1 - \cos h} h &= 0
\end{align}
$
### Derivative of $\sin \theta$
$
\begin{align}
\frac d {d\theta} \sin \theta &= \lim_{h \to 0} \frac {\sin (\theta+h) - \sin \theta} h & \text{apply sum of angles} \\
&= \lim_{h \to 0} \frac {\sin \theta \cos h + \sin h \cos \theta - \sin \theta} h \\
&= \lim_{h \to 0} \left [ -\sin \theta \frac {1 - \cos h} h + \cos \theta \frac {\sin h} h \right] \\
&= -\sin \theta \cdot \lim_{h \to 0} \frac {1 - \cos h} h + \cos \theta \cdot \lim_{h \to 0} \frac {\sin h} h \\
\frac d {d\theta} \sin\theta &= \cos \theta
\end{align}
$
### Derivative of $\cos \theta$
$
\begin{align}
\frac d {d\theta} \cos\theta &= \lim_{h \to 0} \frac {\cos (\theta+h) - \cos \theta} h & \text{apply sum of angles} \\
&= \lim_{h \to 0} \frac {\cos \theta \cos h - \sin \theta \sin h - \cos \theta} h \\
&= \lim_{h \to 0} \left [ -\cos \theta \frac {1 - \cos h} h - \sin \theta \frac {\sin h} h \right] \\
&= -\cos \theta \cdot \lim_{h \to 0} \frac {1 - \cos h} h - \sin \theta \cdot \lim_{h \to 0} \frac {\sin h} h \\
\frac d {d\theta} \cos\theta &= -\sin \theta
\end{align}
$