## Calculus Tutorial

#### Intro

Differentiation of a function y = f(x)^g(x)

#### Sample Problem

Problem : Find the differentiation of a function defined as y = f(x)^g(x). Eg : x^x, sinx^cosx etc.

#### Solution

Though we can differentiate the above function by taking log on both side and then applying product rule of differentiation, there is a 2nd method which uses the formula of differentiation of power function i.e. x^n and exponential function i.e. a^x.

We will do it in two steps :

Step 1. Differentiate f(x)^g(x) keeping f(x) as constant and hence function would be an exponential function. So the result would be f(x)^g(x)*ln(f(x))*g'(x) ——– (1)

Step 2. Differentiate f(x)^g(x) keeping g(x) as constant and hence function would be a power function. So the result would be g(x)*f(x)^{g(x)-1}*f'(x) ———— (2)

Now the final answer will be sum of expressions (1) & (2).

Eg. 1. Let y = x^x
dy/dx = x^(x-1).1 + x^x*ln(x)*1

2. y = sinx^cosx
dy/dx = cosx*sinx^(cosx-1)*(cosx) + sinx^cosx*ln(sinx)*(-sinx) 