How do you differentiate g(x) = x^cosx ?

1 Answer
Jun 3, 2016

g'(x)=(x^cos(x)(cos(x)-xsin(x)ln(x)))/x

Explanation:

Let

y=x^cos(x)

take the natural logarithm of both sides.

ln(y)=ln(x^cos(x))

Simplify the right-hand side using the rule: ln(a^b)=b*ln(a)

ln(y)=cos(x)*ln(x)

Differentiate both sides. The left-hand side will use the chain rule, and the right hand side the product rule.

1/y(dy/dx)=-sin(x)*ln(x)+cos(x)*1/x

Simplifying the right-hand side:

1/y(dy/dx)=(cos(x)-xsin(x)ln(x))/x

Solve for dy/dx by multiplying both sides by y, or x^cos(x).

dy/dx=(x^cos(x)(cos(x)-xsin(x)ln(x)))/x