# Derivative of Cosine, cos(x) – Formula, Proof, and Graphs

The Derivative of Cosine is one of the first transcendental functions introduced in Differential Calculus (or Calculus I). The derivative of cosine is equal to minus sine, -sin(x). This derivative can be proved using limits and trigonometric identities.

In this article, we will discuss how to derive the trigonometric function cosine. We will cover brief fundamentals, its definition, formula, a graph comparison of cosine and its derivative, a proof, methods to derive, and a few examples.

##### CALCULUS

Relevant for

Learning about the proof and graphs of the derivative of cosine.

See proof

##### CALCULUS

Relevant for

Learning about the proof and graphs of the derivative of cosine.

See proof

## Proof of the Derivative of the Cosine Function

The trigonometric function cosine of an angle is defined as the ratio of a side adjacent to an angle in a right triangle to the hypothenuse. Illustrating it through a figure, we have

where C is 90°. For the sample right triangle, getting the cosine of angle A can be evaluated as

$latex \cos{(A)} = \frac{b}{c}$

where A is the angle, b is its adjacent side, and c is the hypothenuse of the right triangle in the figure.

Before learning the proof of the derivative of the cosine function, you are hereby recommended to learn the Pythagorean theorem, Soh-Cah-Toa & Cho-Sha-Cao, and the first principle of limits as prerequisites.

To review, any function can be derived by equating it to the limit of

$$\frac{d}{dx} f(x) = \lim \limits_{h \to 0} {\frac{f(x+h)-f(x)}{h}}$$

Suppose we are asked to get the derivative of

$latex f(x) = \cos{(x)}$

we have

$$\frac{d}{dx} f(x) = \lim \limits_{h \to 0} {\frac{ \cos{(x+h)} – \cos{(x)} }{h}}$$

Analyzing our equation, we can observe that the first term in the numerator of the limit is a cosine of a sum of two angles x and h. With this observation, we can try to apply the sum and difference identities for cosine and sine, also called Ptolemy’s identities. Applying this, we have

$$\frac{d}{dx} f(x) = \lim \limits_{h \to 0} {\frac{ \cos{(x+h)} – \cos{(x)} }{h}}$$

$$\frac{d}{dx} f(x) = \lim \limits_{h \to 0} {\frac{ (\cos{(x)}\cos{(h)} – \sin{(x)}\sin{(h)}) – \cos{(x)} }{h}}$$

Let’s try to re-arrange the numerator

$$\frac{d}{dx} f(x) = \lim \limits_{h \to 0} {\frac{ \cos{(x)}\cos{(h)} – \cos{(x)} – \sin{(x)}\sin{(h)} }{h}}$$

Factoring the first and second terms of our re-arranged numerator, we have

$$\frac{d}{dx} f(x) = \lim \limits_{h \to 0} {\frac{ \cos{(x)}(\cos{(h)} – 1) – \sin{(x)}\sin{(h)}) }{h}}$$

Doing some algebraic re-arrangements, we have

$$\frac{d}{dx} f(x) = \lim \limits_{h \to 0} {\frac{ \cos{(x)} (-(1-\cos{(h)})) – \sin{(x)}\sin{(h)} }{h}}$$

$$\frac{d}{dx} f(x) = \lim \limits_{h \to 0} {\frac{ -\cos{(x)} (1-\cos{(h)}) – \sin{(x)}\sin{(h)} }{h}}$$

$$\frac{d}{dx} f(x) = \lim \limits_{h \to 0} { \left( \frac{ -\cos{(x)} (1-\cos{(h)}) }{h} – \frac{ \sin{(x)}\sin{(h)} }{h} \right) }$$

$$\frac{d}{dx} f(x) = \lim \limits_{h \to 0} { \frac{ -\cos{(x)} (1-\cos{(h)}) }{h} } – \lim \limits_{h \to 0} { \frac{ \sin{(x)}\sin{(h)} }{h} }$$

Since we are calculating the limit in terms of h, all functions that are not h will be considered as constants. Re-arranging, we have

$$\frac{d}{dx} f(x) = -\cos{(x)} \left( \lim \limits_{h \to 0} { \frac{ (1-\cos{(h)}) }{h} } \right) – \sin{(x)} \left( \lim \limits_{h \to 0} { \frac{ \sin{(h)} }{h} } \right)$$

In accordance with the limits of trigonometric functions, the limit of trigonometric function $latex \cos{(\theta)}$ to $latex \theta$ as $latex \theta$ approaches zero is equal to one. The same can be applied to $latex \cos{(h)}$ over $latex h$. Applying, we have

$$\frac{d}{dx} f(x) = -\cos{(x)} \left( \lim \limits_{h \to 0} { \frac{ (1-\cos{(h)}) }{h} } \right) – \sin{(x)} \cdot 1$$

$$\frac{d}{dx} f(x) = -\cos{(x)} \left( \lim \limits_{h \to 0} { \frac{ (1-\cos{(h)}) }{h} } \right) – \sin{(x)}$$

We have already evaluated the limit of the last term. However, the first term is still impossible to be definitely evaluated due to the denominator $latex h$. Let’s try to use another trigonometric identity and see if the trick will work.

We may try to use the half-angle identity in the numerator of the first term.

$$\frac{d}{dx} f(x) = -\cos{(x)} \left( \lim \limits_{h \to 0} { \frac{ (1-\cos{(h)}) }{h} } \right) – \sin{(x)}$$

$$\frac{d}{dx} f(x) = -\cos{(x)} \left( \lim \limits_{h \to 0} { \frac{ \left(2\sin^{2}{\left(\frac{h}{2}\right)}\right) }{h} } \right) – \sin{(x)}$$

Applying the rules of fraction to the first term and re-arranging algebraically once more, we have,

$$\frac{d}{dx} f(x) = -\cos{(x)} \left( \lim \limits_{h \to 0} { \frac{ \frac{\sin^{2}{\left(\frac{h}{2}\right)}}{1} }{ \frac{h}{2} }} \right) – \sin{(x)}$$

$$\frac{d}{dx} f(x) = -\cos{(x)} \left( \lim \limits_{h \to 0} { \frac{ \sin^{2}{\left(\frac{h}{2}\right)} }{ \frac{h}{2} }} \right) – \sin{(x)}$$

$$\frac{d}{dx} f(x) = -\cos{(x)} \left( \lim \limits_{h \to 0} { \frac{ \sin{\left(\frac{h}{2}\right)} \cdot \sin{\left(\frac{h}{2}\right)} }{ \frac{h}{2} } }\right) – \sin{(x)}$$

$$\frac{d}{dx} f(x) = -\cos{(x)} \left( \lim \limits_{h \to 0} { \sin{\left(\frac{h}{2}\right)} \cdot \left( \frac{ \sin{\left(\frac{h}{2}\right)} }{ \frac{h}{2} } \right) }\right) – \sin{(x)}$$

As you notice once more, we have a sine of a variable over that same variable. In this case, it is $latex \sin{\left(\frac{h}{2}\right)}$ all over $latex \frac{h}{2}$. Hence, we can apply again the limits of trigonometric functions of $latex \frac{\sin{(\theta)}}{\theta}$.

$$\frac{d}{dx} f(x) = -\cos{(x)} \left( \lim \limits_{h \to 0} { \sin{\left(\frac{h}{2}\right)} \cdot 1} \right) – \sin{(x)}$$

Finally, we have successfully made it possible to evaluate the limit of the first term. Evaluating by substituting the approaching value of $latex h$, we have

$$\frac{d}{dx} f(x) = -\cos{(x)} \left( \lim \limits_{h \to 0} { \sin{\left(\frac{h}{2}\right)} }\right) – \sin{(x)}$$

$$\frac{d}{dx} f(x) = -\cos{(x)} \left( \lim \limits_{h \to 0} { \sin{\left(\frac{0}{2}\right)}} \right) – \sin{(x)}$$

$$\frac{d}{dx} f(x) = -\cos{(x)} \left( \lim \limits_{h \to 0} { \sin{(0)}} \right) – \sin{(x)}$$

$$\frac{d}{dx} f(x) = -\cos{(x)} \left( \lim \limits_{h \to 0} {0} \right) – \sin(x)$$

$$\frac{d}{dx} f(x) = -\cos{(x)} \cdot 0 – \sin{(x)}$$

$$\frac{d}{dx} f(x) = -\sin{(x)}$$

Therefore, the derivative of the trigonometric function ‘cosine‘ is:

$$\frac{d}{dx} (\cos{(x)}) = -\sin{(x)}$$

## How to derive a Cosine Function?

The derivative process of a cosine function is very straightforward assuming you have already learned the concepts behind the usage of the cosine function and how we arrived to its derivative formula.

### METHOD 1: Derivative of Cosine of any angle x in terms of the same angle x.

Step 1: Analyze if the cosine of an angle is a function of that same angle. For example, if the right-hand side of the equation is $latex \cos{(x)}$, then check if it is a function of the same angle x or f(x). After this, proceed to Step 2 until you complete the derivation steps.

Note: If $latex \cos{(x)}$ is a function of a different angle or variable such as f(t) or f(y), it will use implicit differentiation which is out of the scope of this article.

Step 2: Then directly apply the derivative formula of the cosine function

$latex \frac{dy}{dx} = -\sin{(x)}$

If nothing is to be simplified anymore, then that would be the final answer.

### METHOD 2: Derivative of Cosine of any function u in terms of x.

Step 1: Express the function as $latex F(x) = \cos{(u)}$, where $latex u$ represents any function other than x.

Step 2: Consider $latex \cos{(u)}$ as the outside function $latex f(u)$ and $latex u$ as the inner function $latex g(x)$ of the composite function $latex F(x)$. Hence we have

$latex f(u) = \cos{(u)}$

and

$latex g(x) = u$

Step 3: Get the derivative of the outer function $latex f(u)$, which must use the derivative of the cosine function, in terms of $latex u$.

$latex \frac{d}{du} \left( \cos{(u)} \right) = -\sin{(u)}$

Step 4: Get the derivative of the inner function $latex g(x) = u$. Use the appropriate derivative rule that applies to $latex u$.

Step 5: Apply the basic chain rule formula by algebraically multiplying the derivative of outer function $latex f(u)$ by the derivative of inner function $latex g(x)$

$latex \frac{dy}{dx} = \frac{d}{du} (f(u)) \cdot \frac{d}{dx} (g(x))$

$latex \frac{dy}{dx} = -\sin{(u)} \cdot \frac{d}{dx} (u)$

Step 6: Substitute $latex u$ into $latex f'(u)$

Step 7: Simplify and apply any function law whenever applicable to finalize the answer.

## Graph of Cosine x VS. The Derivative of Cosine x

Given the function

$latex f(x) = \cos{(x)}$

the graph is illustrated as

And as we know by now, by deriving $latex f(x) = \cos{(x)}$, we get

$latex f'(x) = -\sin{(x)}$

which is illustrated graphically as

Illustrating both graphs in one, we have

Analyzing the differences of these functions through these graphs, you can observe that the original function $latex f(x) = \cos{(x)}$ has a domain of

$latex (-\infty,\infty)$ or all real numbers

and exists within the range of

$latex [-1,1]$

whereas the derivative $latex f'(x) = -\sin{(x)}$ has a domain of

$latex (-\infty,\infty)$ or all real numbers

and exists within the range of

$latex [-1,1]$

## Examples

Below are some examples of using either the first or second method in deriving a cosine function.

### EXAMPLE 1

Derive: $latex f(\beta) = \cos{(\beta)}$

Solution: Analyzing the given cosine function, it is only a cosine of a single angle $latex \beta$. Therefore, we can use the first method to derive this problem.

Step 1: Analyze if the cosine of $latex \beta$ is a function of $latex \beta$. In this problem, it is. Hence, proceed to step 2.

Step 2: Directly apply the derivative formula of the cosine function and derive in terms of $latex \beta$. Since no further simplification is needed, the final answer is:

$latex f'(\beta) = -\sin{(\beta)}$

### EXAMPLE 2

Derive: $latex F(x) = \cos{\left(10-5x^2 \right)}$

Solution: Analyzing the given cosine function, it is a cosine of a polynomial function. Therefore, we can use the second method to derive this problem.

Step 1: Express the cosine function as $latex F(x) = \cos{(u)}$, where $latex u$ represents any function other than x. In this problem,

$latex u = 10-5x^2$

We will substitute this later as we finalize the derivative of the problem.

Step 2: Consider $latex \cos{(u)}$ as the outside function $latex f(u)$ and $latex u$ as the inner function $latex g(x)$ of the composite function $latex F(x)$. For this problem, we have

$latex f(u) = \cos{(u)}$

and

$latex g(x) = u = 10-5x^2$

Step 3: Get the derivative of the outer function $latex f(u)$, which must use the derivative of the cosine function, in terms of $latex u$.

$latex \frac{d}{du} \left( \cos{(u)} \right) = -\sin{(u)}$

Step 4: Get the derivative of the inner function $latex g(x)$ or $latex u$. Since our $latex u$ in this problem is a polynomial function, we will use power rule and sum/difference of derivatives to derive $latex u$.

$latex \frac{d}{dx}(g(x)) = \frac{d}{dx} \left(5-10x^2 \right)$

$latex \frac{d}{dx}(g(x)) = -10x$

Step 5: Apply the basic chain rule formula by algebraically multiplying the derivative of outer function $latex f(u)$ by the derivative of inner function $latex g(x)$

$latex \frac{dy}{dx} = \frac{d}{du} (f(u)) \cdot \frac{d}{dx} (g(x))$

$latex \frac{dy}{dx} = -\sin{(u)} \cdot (-10x)$

Step 6: Substitute $latex u$ into $latex f'(u)$

$latex \frac{dy}{dx} = -\sin{(u)} \cdot (-10x)$

$latex \frac{dy}{dx} = -\sin{(10-5x^2)} \cdot (-10x)$

Step 7: Simplify and apply any function law whenever applicable to finalize the answer.

$latex \frac{dy}{dx} = -\sin{(10-5x^2)} \cdot (-10x)$

$latex \frac{dy}{dx} = 10x\sin{(10-5x^2)}$

And the final answer is:

$latex F'(x) = = 10x\sin{\left(10-5x^2\right)}$

or

$latex F'(x) = = 10x\sin{\left(5(2-x^2)\right)}$  