Solveeit Logo

Question

Question: What is the derivative of \[y = {x^{\cos x}}\] ?...

What is the derivative of y=xcosxy = {x^{\cos x}} ?

Explanation

Solution

Hint : We are given with a function y. we have to find the derivative of the given function. The function has another trigonometric function as a power of the base function. So we will apply natural log on both sides and then we will use the product rule for it. That will give the derivative of the function.

Complete step by step solution:
Given that,
y=xcosxy = {x^{\cos x}}
The derivative of the function is given as;
dydx=ddxxcosx\dfrac{{dy}}{{dx}} = \dfrac{d}{{dx}}{x^{\cos x}}
Now we will apply the natural log to the given function first,
lny=lnxcosx\ln y = \ln {x^{\cos x}}
We know the rule for natural log,
lny=cosx.lnx\ln y = \cos x.\ln x
Now applying the product rule on RHS that is taking the derivative of the first function and keeping the second function as it is and then adding the derivative of the second function keeping the first function as it is.
Here cos and natural log are the two functions.
We know that, ddxcosx=sinx\dfrac{d}{{dx}}\cos x = - \sin x and ddxlnx=1x\dfrac{d}{{dx}}\ln x = \dfrac{1}{x}
1y.dydx=(sinx)lnx+cosx1x\dfrac{1}{y}.\dfrac{{dy}}{{dx}} = \left( { - \sin x} \right)\ln x + \cos x\dfrac{1}{x}
rearranging the terms,
1y.dydx=(sinx)lnx+cosxx\dfrac{1}{y}.\dfrac{{dy}}{{dx}} = \left( { - \sin x} \right)\ln x + \dfrac{{\cos x}}{x}
Transposing y we get,
dydx=y[(sinx)lnx+cosxx]\dfrac{{dy}}{{dx}} = y\left[ {\left( { - \sin x} \right)\ln x + \dfrac{{\cos x}}{x}} \right]
Taking the positive term first,
dydx=y[cosxxsinx.lnx]\dfrac{{dy}}{{dx}} = y\left[ {\dfrac{{\cos x}}{x} - \sin x.\ln x} \right]
This is the derivative of the above function.
So, the correct answer is “ dydx=y[cosxxsinx.lnx]\dfrac{{dy}}{{dx}} = y\left[ {\dfrac{{\cos x}}{x} - \sin x.\ln x} \right] ”.

Note : Note that when two functions that can be derivated are there we use this product rule. If y=f(x).g(x)y = f\left( x \right).g\left( x \right) then the product rule says that y=f(x).g(x)+f(x).g(x)y' = f\left( x \right).g'\left( x \right) + f'\left( x \right).g\left( x \right) Don’t get confused with integration by parts. It is the concept used in integration of the functions.