# `y = log_2 (e^-x cos(pix))` Differentiate the function.

### 1 Answer | Add Yours

We are given y=log2(exp(-x)*cos(pi*x))=1/ln(2)*ln(exp(-x)*cos(pi*x)). Since the domain of ln(X) is X>0, it means cos(pi*x) cannot equal to zero, we will use this later.

First we use the Chain rule, to the first portion of the answer,

y' = 1/ln(2) * 1/(exp(-x)*cos(pi*x)) * ...

since (ln(f(x)))' = 1/f(x) * f'(x).

The f(x) = exp(-x)*cos(pi*x)

Here use the Product rule, since we have two functions, which are easy to differentiate.

Thus, f'(x) = -exp(-x)*cos(pi*x) + exp(-x)*(-sin(pi*x)*pi)

= -exp(-x) * (cos(pi*x) + sin(pi*x) * pi)

So now y' = 1/ln(2) * 1/(exp(-x)*cos(pi*x)) * -exp(-x) * (cos(pi*x) + sin(pi*x) * pi).

We can immediately cancel the exp(-x). And since cos(pi*x) is never zero, we may divide by it.

Thus, y'(x) = -1/ln(2)*(1 + pi*sin(pi*x)/cos(pi*x))

= -1/ln(2)*(1 + pi*tan(pi*x))