Solveeit Logo

Question

Question: How do you differentiate \(y = {x^{2\cos x}}\)?...

How do you differentiate y=x2cosxy = {x^{2\cos x}}?

Explanation

Solution

In this problem we have given an equation and we are asked to differentiate the given term. The term which is given for us is somewhat difficult to differentiate. So we cannot differentiate normally, so we are going to chain rule methods to differentiate the given term.

Formula used: ddx(xn)=nxn1\dfrac{d}{{dx}}\left( {{x^n}} \right) = n{x^{n - 1}}
ddx(cosx)=sinx\dfrac{d}{{dx}}\left( {\cos x} \right) = - \sin x
ddxIn(x)=1x\dfrac{d}{{dx}}In\left( x \right) = \dfrac{1}{x}
uv=uvvuuv = u{v'} - v{u'}

Complete step-by-step solution:
Let us take y=f(x)=x2cosxy = f\left( x \right) = {x^{2\cos x}}
Now let’s differentiate f(x)f\left( x \right) with respect to xx, and we get
dydx=ddx(x2cosx)ddx(2cosx)(1)\Rightarrow \dfrac{{dy}}{{dx}} = \dfrac{d}{{dx}}\left( {{x^{2\cos x}}} \right)\dfrac{d}{{dx}}\left( {2\cos x} \right) - - - - - (1), here we use the formulasddx(xn)=nxn1\dfrac{d}{{dx}}\left( {{x^n}} \right) = n{x^{n - 1}} and ddx(cosx)=sinx \Rightarrow \dfrac{d}{{dx}}\left( {\cos x} \right) = - \sin x in the right hand side to derive the equation (1) and we get,
dydx=(2cosx×x2cosx1)(2sinx)\Rightarrow \dfrac{{dy}}{{dx}} = \left( {2\cos x \times {x^{2\cos x - 1}}} \right)\left( { - 2\sin x} \right)
Multiplying the terms on the right hand side, implies
dydx=4sinxcosx×x2cosx1\Rightarrow \dfrac{{dy}}{{dx}} = - 4\sin x\cos x \times {x^{2\cos x - 1}}

Therefore, we have differentiated the given term and we get dydx=4sinxcosx×x2cosx1\dfrac{{dy}}{{dx}} = - 4\sin x\cos x \times {x^{2\cos x - 1}} as the required answer.

Additional Information: The chain rule states that the derivative of f(g(x))f\left( {g\left( x \right)} \right)isf(g(x)).g(x){f'}\left( {g\left( x \right)} \right).{g'}\left( x \right). In other word, it helps us to differentiate composite functions. In calculus, logarithmic differentiation or differentiation by taking logarithms is a method used to differentiate functions by employing the logarithmic derivative of a function ff, (In f)=ff{\left( {In{\text{ }}f} \right)'} = \dfrac{{{f'}}}{f}. This technique is often performed in cases where it is easier to differentiate the logarithm of a function rather than the function itself.

Note: We can use some other method of logarithmic differentiation to derive y=x2cosxy = {x^{2\cos x}} .
Let’s rewrite the yy as ee to a power.
y=x2cosx=e2cosxln(x)(1)\therefore y = {x^{2\cos x}} = {e^{2\cos xln(x)}} - - - - - \left( 1 \right)
Now use the formula ddx(eu)=eududx\dfrac{d}{{dx}}\left( {{e^u}} \right) = {e^u}\dfrac{{du}}{{dx}}in (1)
Differentiate (1), we get
dydx=e2cosxln(x)ddx2cosxln(x)\dfrac{{dy}}{{dx}} = {e^{2\cos xln\left( x \right)}}\dfrac{d}{{dx}}2\cos xln\left( x \right)
Differentiation of In(x)In\left( x \right)is1x\dfrac{1}{x}, and also we need to use uvuv formula, now apply this in the above equation, we get
dydx=x2cosx[2cosxx2sinxln(x)]\dfrac{{dy}}{{dx}} = {x^{2\cos x}}\left[ {\dfrac{{2\cos x}}{x} - 2\sin xln\left( x \right)} \right]
This is also one of the ways to differentiate the given term by using logarithmic differentiation.