Solveeit Logo

Question

Question: What is the derivative of \({{\left( \cos x \right)}^{\sin x}}\)?...

What is the derivative of (cosx)sinx{{\left( \cos x \right)}^{\sin x}}?

Explanation

Solution

Assume the given function as y=f(x)y=f\left( x \right). Take log to the base e both the sides and use the property of logarithm given as lnam=mlna\ln {{a}^{m}}=m\ln a to simplify the R.H.S. Now, differentiate both the sides of the assumed function y and use the chain rule of derivative to find the derivative of L.H.S. Use the formulas d(lny)dy=1y\dfrac{d\left( \ln y \right)}{dy}=\dfrac{1}{y}, d(sinx)dx=cosx\dfrac{d\left( \sin x \right)}{dx}=\cos x and d(cosx)dx=sinx\dfrac{d\left( \cos x \right)}{dx}=-\sin x for the simplification. For the derivative of R.H.S use the product rule of differentiation given as d(u×v)dx=vdudx×udvdx\dfrac{d\left( u\times v \right)}{dx}=v\dfrac{du}{dx}\times u\dfrac{dv}{dx} where u and v are functions of x. Finally, substitute back the assumed value of y to get the value of dydx\dfrac{dy}{dx}.

Complete step by step answer:
Here we have been provided with the function (cosx)sinx{{\left( \cos x \right)}^{\sin x}} and we are asked to differentiate it. Let us assume this function as y so we have,
y=(cosx)sinx\Rightarrow y={{\left( \cos x \right)}^{\sin x}}
Now, we need to find the value of dydx\dfrac{dy}{dx}. Taking natural log, i.e. log to the base e, on both the sides we get,
lny=ln((cosx)sinx)\Rightarrow \ln y=\ln \left( {{\left( \cos x \right)}^{\sin x}} \right)
Using the property of log given as lnam=mlna\ln {{a}^{m}}=m\ln a we get,
lny=sinxln(cosx)\Rightarrow \ln y=\sin x\ln \left( \cos x \right)
Differentiating both the sides with respect to x we get,
dlnydx=d(sinx×ln(cosx))dx\Rightarrow \dfrac{d\ln y}{dx}=\dfrac{d\left( \sin x\times \ln \left( \cos x \right) \right)}{dx}
Using the chain rule of derivative in the L.H.S where we will differentiate lny\ln y with respect to y and then its product will be taken with the derivative of y with respect to x, so we get,
dlnydy×dydx=d(sinx×ln(cosx))dx\Rightarrow \dfrac{d\ln y}{dy}\times \dfrac{dy}{dx}=\dfrac{d\left( \sin x\times \ln \left( \cos x \right) \right)}{dx}
Using the formula d(lny)dy=1y\dfrac{d\left( \ln y \right)}{dy}=\dfrac{1}{y} we get,
1y×dydx=d(sinx×ln(cosx))dx\Rightarrow \dfrac{1}{y}\times \dfrac{dy}{dx}=\dfrac{d\left( \sin x\times \ln \left( \cos x \right) \right)}{dx}
Using the product rule of derivative given as d(u×v)dx=vdudx×udvdx\dfrac{d\left( u\times v \right)}{dx}=v\dfrac{du}{dx}\times u\dfrac{dv}{dx} assuming u=sinxu=\sin x and v=ln(cosx)v=\ln \left( \cos x \right) in the R.H.S we get,
1y×dydx=sinx×d(ln(cosx))dx+ln(cosx)×d(sinx)dx\Rightarrow \dfrac{1}{y}\times \dfrac{dy}{dx}=\sin x\times \dfrac{d\left( \ln \left( \cos x \right) \right)}{dx}+\ln \left( \cos x \right)\times \dfrac{d\left( \sin x \right)}{dx}
Using the formulas d(sinx)dx=cosx\dfrac{d\left( \sin x \right)}{dx}=\cos x and chain rule of derivative for the differentiation of ln(cosx)\ln \left( \cos x \right) we get,
1y×dydx=sinx×d(ln(cosx))d(cosx)×d(cosx)dx+ln(cosx)×cosx\Rightarrow \dfrac{1}{y}\times \dfrac{dy}{dx}=\sin x\times \dfrac{d\left( \ln \left( \cos x \right) \right)}{d\left( \cos x \right)}\times \dfrac{d\left( \cos x \right)}{dx}+\ln \left( \cos x \right)\times \cos x
Using the formula d(cosx)dx=sinx\dfrac{d\left( \cos x \right)}{dx}=-\sin x we get,
1y×dydx=sinx×1(cosx)×(sinx)+ln(cosx)×cosx dydx=1y[cosxln(cosx)sin2xcosx] \begin{aligned} & \Rightarrow \dfrac{1}{y}\times \dfrac{dy}{dx}=\sin x\times \dfrac{1}{\left( \cos x \right)}\times \left( -\sin x \right)+\ln \left( \cos x \right)\times \cos x \\\ & \Rightarrow \dfrac{dy}{dx}=\dfrac{1}{y}\left[ \cos x\ln \left( \cos x \right)-\dfrac{{{\sin }^{2}}x}{\cos x} \right] \\\ \end{aligned}
Substituting back the value of y we get,
dydx=1(cosx)sinx[cosxln(cosx)sin2xcosx]\therefore \dfrac{dy}{dx}=\dfrac{1}{{{\left( \cos x \right)}^{\sin x}}}\left[ \cos x\ln \left( \cos x \right)-\dfrac{{{\sin }^{2}}x}{\cos x} \right]
Hence, the above relation is our answer.

Note: You can also remember the direct formula for the derivative of the function of the form uv{{u}^{v}} where u and v both are variables and functions of x. What we have to do is we will consider two parts of the derivative. In the first part we will assume u as constant and v as derivative and differentiate using the formula d(uv)dx=uvlogu(dvdx)\dfrac{d\left( {{u}^{v}} \right)}{dx}={{u}^{v}}\log u\left( \dfrac{dv}{dx} \right). In the second part we will consider v as constant and u as variable and apply the formula d(uv)dx=vuv1(dudx)\dfrac{d\left( {{u}^{v}} \right)}{dx}=v{{u}^{v-1}}\left( \dfrac{du}{dx} \right) for the derivative. Finally, we will take the sum of these two expressions to get the answer.