# Different ways finding the derivative of $\sin$ and $\cos$.

I am looking for different ways of differentiating $\sin$ and $\cos$, especially when using the geometric definition, but ways that use other defintions are also welcome.

Please include the definition you are using.

I think there are several ways to do this I didn't find, that make clever use of trigonometric identities or derivative facts. I am looking for these for several reasons. Firstly, it is just interesting to see. Secondly, there may be interesting techniques that can also be applied in a clever way to other derivative problems. It is also interesting to see how proofs can come form completely different fields of mathematics or even from physics.

I have included several solutions in the answers.

• This answer to the question "Intuitive understanding of the derivatives of $\sin x$ and $\cos x$" may be of interest.
– Blue
Sep 26 '15 at 13:40
• Since you've already included several solutions in your answers, could you give a bit more explanation of what sort of solutions you ARE looking for? I get a sense that you're looking for insights into a mystery you're not quite able to articulate. Mysteries are of course inherently difficult to articulate :-) but it would help us help you if you did your best to say what you're looking for. Sep 30 '15 at 20:06

Consider the image from this "proof without words", Asymptotically, the angle between the black radius and the red vertical line is complementary to both angles marked as $\theta$. Thus, asymptotically, those angles are equal, and the two red triangles are similar. Therefore, by similar triangles, $$\frac{\mathrm{d}\sin(\theta)}{\mathrm{d}\theta}=\frac{\cos(\theta)}{1}$$ To get the derivative of $\cos(\theta)$, recall that $\cos(\theta)=\sin\left(\frac\pi2-\theta\right)$ and $\sin(\theta)=\cos\left(\frac\pi2-\theta\right)$. Then the Chain Rule says \begin{align} \frac{\mathrm{d}}{\mathrm{d}\theta}\cos(\theta) &=\frac{\mathrm{d}}{\mathrm{d}\theta}\sin\left(\frac\pi2-\theta\right)\\ &=-\cos\left(\frac\pi2-\theta\right)\\[3pt] &=-\sin(\theta) \end{align}

• Of course the length $L$ of the line segment labelled $d\theta$ is only approximately equal to the number $d\theta$. But $L/d\theta$ converges to $1$ as $d\theta$ goes to $0$. Oct 2 '15 at 17:29
• @user254665: Indeed. They are not equal, but they are asymptotically equal; that means precisely what you said: $$\lim_{\mathrm{d}\theta\to0}\frac{L}{\mathrm{d}\theta}=1$$ This is due to the fact that $$\lim_{x\to0}\frac{\sin(x)}{x}=1$$ as shown in this answer.
– robjohn
Oct 2 '15 at 19:25
• @robjohn To get the derivative of $\cos(\theta)$ just consider the other cathetus of the small triangle (which is $-d\cos(\theta)$).
– A.Γ.
Oct 3 '15 at 7:27
• I am accepting this answer because I think it is useful to read this post first, since it is a bit more intuitive than the other answers. Even though a (big-list) usually has no accepted answer. Oct 8 '15 at 18:52

This is a copy of my answer to How to prove that $\lim\limits_{x\to0}\frac{\sin x}x=1$?: From the above picture, $\arcsin y$ is twice the area of the orange bit. The area of the red bit is ${1 \over 2}y\sqrt{1-y^2}$. The area of the red bit plus the orange bit is $\int_{0}^y \sqrt{1-Y^2} dY$. So $$\arcsin y = 2\int_{0}^y \sqrt{1-Y^2} dY - y\sqrt{1-y^2}.$$ Differentiating with respect to $y$ gives $\frac{d\arcsin y}{dy} = \frac{1}{\sqrt{1-y^2}}$. Using the theorem for the derivative of inverse functions yields $\sin' \theta = \sqrt{1 - \sin^2 \theta} = \cos \theta$.

A similar thing can be done with the arc length definition of $\arcsin$.

• Interesting, but how would one show that integral? Sep 26 '15 at 13:09
• @wythagoras see now Sep 26 '15 at 13:30
• Oh wow that's clever. Unfortunately I cannot give another +1. Sep 26 '15 at 13:34
• Why shouldn't the last line read $\sqrt{1-\sin^2 x} = \sqrt{\cos^2 x} = |\cos(x)|$? Of course, one may demand that $\cos(x)>0$ over the domain he's differentiating over and then use $\cos(x)=\cos(-x)$ and use the chain rule. Oct 8 '15 at 18:22

My two favorite ways:

Alternative A. Assuming that you are familiar with the Taylor series of both sine and cosine (some purists think that you should not rely on pictures when defining these functions, and power series are the way to go).

Consider the matrix $$A=\left(\begin{array}{cc}0&-1\\1&0\end{array}\right).$$ We can use this as an infinitesimal generator of rotations. IOW it is then easy see, using the Taylor series of $e^x$, that we have $$e^{xA}=\sum_{n=0}^\infty\frac{x^nA^n}{n!}=\left(\begin{array}{cc}\cos x&-\sin x\\\sin x&\cos x\end{array}\right)$$ that we recognize as the familiar rotation matrix $R(x)$. Differentiating this gives, using the chain rule and the known derivative of $e^x$, $$\frac d{dx}e^{Ax}=Ae^{Ax}.$$ Using the rotation matrix representation allows us to rewrite this in the form $$\frac d{dx} R(x)=A R(x)=\left(\begin{array}{cc}-\sin x&-\cos x\\\cos x&-\sin x\end{array}\right).$$ The derivatives of the matrix entries can be read from this. We get $D\cos x$ and $D\sin x$ from two entries actually.

Alternative B. Here I'm using the unit circle and arcs along it in the usual way for the definitions of sine and cosine.

Assume that we have already travelled the distance $\alpha$ along the unit circle in ccw direction, starting from $(1,0)$ obviously. Assume that we have reached the point $P=(x,y)$. We know that $x=\cos\alpha$ and $y=\sin\alpha$. The question I want you to ask yourself is: "which direction are we heading now?" A moment's reflection reveals that we are heading in the direction $\vec{t}$ of the tangent of the unit circle drawn at $P$. That vector $\vec{t}$ is thus orthogonal to the vector $(x,y)$. This allows us to conclude that $\vec{t}$ is parallel to $(-y,x)$. Furthermore, given that $P$ was assumed to be on the unit circle we also know that $||(-y,x)||=\sqrt{x^2+y^2}=1$. By drawing a picture it is clear that the vector $(-y,x)$, drawn starting from $P$, points in the direction of increasing $\alpha$.

Hence we can use $\vec{t}=(-y,x)$. So if we move along the circle an infinitesimal distance $h$ we move from point $P=(x,y)$ to the point $$P'=(x,y)+h\vec{t}=(x-hy,y+hx)=(\cos(\alpha+h),\sin(\alpha+h)).$$ (Ok, this is really just a good approximation. See the last paragraph for a better way of justifying this.) Hence $$\lim_{h\to0}\frac{\cos(\alpha+h)-\cos\alpha}h=\lim_{h\to0}\frac{-hy}h=-y=-\sin\alpha,$$ and similarly $$\lim_{h\to0}\frac{\sin(\alpha+h)-\sin\alpha}h=\lim_{h\to0}\frac{hx}h=x=\cos\alpha.$$

Alternative B probably also feels a bit hand-wavy. It is equivalent to the text book derivation of the formula for the tangent vector of a parametrized plane curve (this time the curve parametrized by $(x,y)=(\cos\alpha,\sin\alpha)$. Using the natural parameter (=arc length $s$), we always get a tangent vector that has unit length. And this time I won't differentiate the component functions but I use the known (unit!) tangent direction along a circle instead :-)

• Alt A can be criticized as leading to a circular argument. Do consider that I only used the derivative of $e^x$, and might have defined sine\cosine as components of the rotation matrix. In Alt B I still use the infinitesimal generator of $SO(2)$, but I try to hide it better :-) Sep 30 '15 at 19:50

This answer uses the following definitions:

$$e^{ix} = \cos(x) + i \sin(x)$$ $$\sin(-x) = -\sin(x)$$ $$\cos(-x) = \cos(x)$$

Rearranging gives the complex exponential definition of cosine:

$$\cos(x) = (e^{ix} + e^{-ix})/2$$ $$\Rightarrow \cos'(x) = i(e^{ix} -e^{-ix})/2$$ The complex exponential definition of sine: $$\sin(x) = (e^{ix} -e^{-ix})/2/i$$ Multiply with the complex conjugate $$\Rightarrow \sin(x) = (-ie^{ix} + ie^{-ix})/2$$ It is now trivial to see that $-\sin(x) = \cos'(x)$.

Similar is the derivative of $\sin(x)$.

• Do you mean you define $\cos$ and $\sin$ as the real and imaginary parts of $e^{ix}$, or the other way around? Sep 30 '15 at 19:58
• @Javier I have seen real analyses books do just that.
– fred
Oct 2 '15 at 15:53
• isnt it a bit "begging the question" since Euler's formula is derived from the Taylor polynomial expansions which meanas you already know what the sin/cos derivatives are? Jul 27 at 15:56

Imagine a particle moving around a circle with a position vector $\textbf r(t) = \textbf{i}\cos t + \textbf{j}\sin t$. The velocity vector $\textbf r'(t)$ must point in the direction tangent to the circle. A tangent to a point on a circle is always perpendicular to the radial line, so $\textbf r(t) \perp \textbf r'(t)$. Now you need to determine $|\textbf r'(t)|$. Since $\int_0^t|\textbf r'(\tau)|\,d\tau$ is the length of the arc covered by the circle in time $t$, which is equal to $t$, we have that $|\textbf r'(t)| = 1$.

This answer uses the geometric definition.

Using the geometric definition one can prove that

$$\sin(\alpha+h)= \sin(\alpha)\cos(h)+\cos(\alpha)\sin(h)$$ $$\cos(\alpha+h)= \cos(\alpha)\cos(h)-\sin(\alpha)\sin(h)$$ $$\sin^2(x)+\cos^2(x)=1$$

Now we want to prove the following limits:

$$\lim_{x\to0} \frac{\sin(x)}{x} = 1 \quad \mathrm{and} \quad \lim_{x\to0} \frac{\cos(x)-1}{x} = 0$$

The first one has a very nice geometric derivation here. I can show the second limit:

$$\lim_{x\to0} \frac{\cos(x)-1}{x} = \lim_{x\to0} \frac{\cos^2(x)-1}{x(\cos(x)+1)} = \lim_{x\to0} \frac{\cos^2(x)-1}{x(\cos(x)+1)} = \lim_{x\to0} \frac{\sin^2(x)}{x(\cos(x)+1)} = \lim_{x\to0} \frac{\sin(x)}{x} \lim_{x\to0} \frac{1}{\cos(x)+1} \lim_{x\to0} \sin(x) = 1 \cdot \frac12 \cdot 0$$

Using this we can use the definition of the derivative:

\begin{align*} \sin'(\alpha) &= \lim_{h\to0} \frac{\sin(\alpha+h)-\sin(\alpha)}{h} \\&= \lim_{h\to0}\frac{\sin(\alpha)\cos(h)+\cos(\alpha)\sin(h)-\sin(\alpha)}{h} \\ &= \lim_{h\to0} \frac{\sin(\alpha)\cos(h)-\sin(\alpha)}{h} + \lim_{h\to0} \frac{\cos(\alpha)\sin(h)}{h} \\ &= \sin(\alpha)\lim_{h\to0} \frac{\cos(h)-1}{h} + \cos(\alpha)\lim_{h\to0} \frac{\sin(h)}{h} \\ &= \sin(\alpha)\cdot 0 + \cos(\alpha)\cdot 1 = \cos(\alpha) \end{align*}

\begin{align*} \cos'(\alpha) &= \lim_{h\to0} \frac{\cos(\alpha+h)-\cos(\alpha)}{h} \\&= \lim_{h\to0}\frac{\cos(\alpha)\cos(h)-\sin(\alpha)\sin(h)-\cos(\alpha)}{h} \\ &= \lim_{h\to0} \frac{\cos(\alpha)\cos(h)-\cos(\alpha)}{h} - \lim_{h\to0} \frac{\sin(\alpha)\sin(h)}{h} \\ &= \cos(\alpha)\lim_{h\to0} \frac{\cos(h)-1}{h} - \sin(\alpha)\lim_{h\to0} \frac{\sin(h)}{h} \\ &= \cos(\alpha)\cdot0-\sin(\alpha)\cdot 1 = -\sin(\alpha) \end{align*}

$$\cos(x)=\Re(e^{ix}) \quad \mathrm{and} \quad \sin(x)=\Im(e^{ix})$$

It are known facts that $$\Re f'(x) = [\Re f(x)]'$$

$$\Im f'(x) = [\Im f(x)]'$$

Therefore $$\cos'(x)=[\Re(e^{ix})]' = \Re[e^{ix}]' = \Re (ie^{ix}) = \Re (i\cos(x)+i^2\sin(x)) \\ = \Re (i\cos(x)-\sin(x)) = -\sin(x)$$

$$\sin'(x)=[\Im(e^{ix})]' = \Im[e^{ix}]' = \Im (ie^{ix}) = \Im (i\cos(x)+i^2\sin(x)) \\ = \Im (i\cos(x)-\sin(x)) = \cos(x)$$

• I think this is one of the most elementary ways to calculate the derivatives. Every 'geometric proof' i've seen did not bother to clarify somewhat less elementary concepts, like; length, angle, ratio, Pi.
– Ranc
Sep 30 '15 at 18:24
• It starts by defining sin x and cos x as the Im and Re of exp(ix) for real x, and defining exp (ix) by the power series. Nothing wrong with that, but eventually you have to show that this co-incides with the geometrically defined functions. Oct 2 '15 at 17:37

To the first order, the tangent is a good approximation of the boundary of a shape.

So can you approximate $(\cos(\theta+d\theta),\sin(\theta+d\theta))$ in terms of $(\cos\theta,\sin\theta)$? In other words, what's: $(\cos(\theta+d\theta),\sin(\theta+d\theta))-(\cos\theta,\sin\theta)$

Well, it's tangent to the circle, and hence points in the perpendicular direction. And its length is $d\theta$. Hence it's $d\theta(-\sin\theta,\cos\theta)$.

This turns out to be the same as Jyrki Lahtonen's proof B.

Instead of using usual definitions, I tried to start from the trigonometric identities, and 'redefine' them as the special functions which satisfy those identities.

Claim. Suppose that there exist differentiable functions $f, g:\mathbb{R}\to\mathbb{R}$ such that

• $\forall x,y\in \mathbb{R}; \; f(x)g(y)+g(x)f(y)=f(x+y)$
• $\forall x,y\in \mathbb{R}; \; g(x)g(y)-f(x)f(y)=g(x+y)$
• $f(0)=0$, $g(0)=1$, $f'(0)=1$, $g'(0)=0$

Then $$\forall x\in \mathbb{R}; \; f'(x)=g(x),\; g'(x)=-f(x)$$

Proof) Let $w(x)=g(x)+if(x)$ ($w:\mathbb{R}\to\mathbb{C}$). Then

\begin{aligned} w(x+y)&=(g(x)g(y)-f(x)f(y))+i(f(x)g(y)+f(y)g(x))\\ &=(g(x)+if(x))(g(y)+if(y))\\ &=w(x)w(y) \end{aligned}

Since $f$ and $g$ are differentiable, $w$ is also differentiable. So \begin{aligned} w'(x)&=\lim_{h\to 0}\frac{w(x+h)-w(x)}{h}\\ &=\lim_{h\to 0}\frac{w(x)w(h)-w(x)}{h}=w(x)\lim_{h\to 0}\frac{w(h)-1}{h}\\ \end{aligned}

$w(0)=g(0)+if(0)=1$, so

$$w'(x)=w(x)\lim_{h\to 0}\frac{w(h)-w(0)}{h-0}=w(x)w'(0)=iw(x)$$

This gives

$$g'(x)+if'(x)=w'(x)=iw(x)=-f(x)+ig(x)$$

$\therefore$ $f'=g$, $g'=-f$. $\quad\square$

Start with $$\sin(x+y)=\sin(x)\cos(y)+\cos(x)\sin(y)\\ \cos(x+y)=\cos(x)\cos(y)-\sin(x)\sin(y)$$ Differentiate with respect to $y$: $$\sin'(x+y)=\sin(x)\cos'(y)+\cos(x)\sin'(y)\\ \cos'(x+y)=\cos(x)\cos'(y)-\sin(x)\sin'(y)$$ Let $y=0$ and note that $\cos'(0)=0$ because $\cos$ has a maximum at $0$: $$\sin'(x)=\cos(x)\sin'(0)\\ \cos'(x)=-\sin(x)\sin'(0)$$ So everything comes down to determining the constant $C=\sin'(0)$: $$\sin'(x)=C\cos(x),\;\;\; \cos'(x)=-C\sin(x).$$ That makes sense because the original identities for $\sin$ and $\cos$ are not affected by scaling $x$ and $y$. The constant $C$ is determined by the system of units you use such as radians vs. degrees. $C=1$ for radians, which requires the standard geometric argument.

It's fairly common to define $\sin(x)$ and $\cos(x)$ as the solutions of differential equation,

$$(1) \quad {{dy^2} \over {dx^2}}=-y$$

The initial conditions require that $\sin(x) \$ satisfies $[y'(0),y(0)]=[1,0]$ and $\cos(x) \$ satisfies $[y'(0),y(0)]=[0,1]$. Using Picard's Method, we can get series expansions for the solution of $(1)$. We have,

$$(2) \quad \sin(x)=x-{{x^3} \over {3!}}+{{x^5} \over {5!}}+\cdots$$ $$(3) \quad \cos(x)=1-{{x^2} \over {2!}}+{{x^4} \over {4!}}+\cdots$$

We already have defined the second derivative of these functions. To find the first derivative, we can simply differentiate $(2)$ and $(3)$ by term.

This method of finding the derivatives alludes to the real applications of the functions. After a few insights, this becomes an equation for harmonic equation. A few centuries later, it becomes the Schrödinger equation.