# What is the derivative of cos(pi x)?

Aug 30, 2016

$- \pi \sin \left(\pi x\right)$

#### Explanation:

Here, we have a function inside another function (function composition). The outside function is $\cos \left(x\right)$, and the inside function is $\pi x$.

That means we can view $\cos \left(\pi x\right)$ as a function composition in the form $f \left(g \left(x\right)\right)$, where $f \left(x\right) = \cos \left(x\right)$ and $g \left(x\right) = \pi x$.

In order to find the derivative of a function composition, we must use the chain rule, which states if we have a function $y = f \left(g \left(x\right)\right)$, its derivative is $y ' = f ' \left(g \left(x\right)\right) \cdot g ' \left(x\right)$.

Another way of "reading" this is to say that when differentiating, first differentiate the outside function while leaving the inside function intact, and then multiply that by the derivative of the inside function.

Here, we see that the derivative of the outside function, $\cos \left(x\right)$, is $- \sin \left(x\right)$. So, we will write $- \sin \left(x\right)$ but keep the inside function intact, giving us a $- \sin \left(\pi x\right)$. We then multiply that by the derivative of $\pi x$, which is just $\pi$, giving the full derivative of $- \pi \sin \left(\pi x\right)$.

Or, we can use $f$ and $g$:

• $f \left(x\right) = \cos \left(x\right) \implies f ' \left(x\right) = - \sin \left(x\right)$
• $g \left(x\right) = \pi x \implies g ' \left(x\right) = \pi$,

So if $y = f \left(g \left(x\right)\right)$ then

$y ' = f ' \left(g \left(x\right)\right) \cdot g ' \left(x\right) = - \sin \left(\pi x\right) \cdot \pi = - \pi \sin \left(\pi x\right)$.