# How do you find the derivative of f(x)=pi^cosx?

Mar 6, 2015

$f ' \left(x\right) = - \left(\sin x\right) {\pi}^{\cos} x \ln \pi$
(I use $\ln$ for natural logarithm.)

To get this answer, use the formula for differentiating exponential functions with base $a$ and use the chain rule.

The derivative of ${a}^{x}$ is ${a}^{x} \ln a$
(or ${a}^{x} \log a$ if you use $\log$ for the natural logarithm).

So, for example, the derivative of $g \left(x\right) = {\pi}^{x}$ would be $g ' \left(x\right) = {\pi}^{x} \ln \pi$

You function $f \left(x\right) = {\pi}^{\cos} x$ doesn't have exponent simply $x$.
It is of the form $y = {\pi}^{u}$ the derivative of which is ${\pi}^{u} \ln \pi \left(\frac{\mathrm{du}}{\mathrm{dx}}\right)$.
We need the chain rule here, because $u \ne x$.

Because your function has $u = \cos x$, you'll use $\frac{\mathrm{du}}{\mathrm{dx}} = - \sin x$.

$f ' \left(x\right) = {\pi}^{\cos} x \left(\ln \pi\right) \left(- \sin x\right) = - \left(\sin x\right) {\pi}^{\cos} x \ln \pi$.