Solveeit Logo

Question

Question: Find the derivative of \[x\cos x\]....

Find the derivative of xcosxx\cos x.

Explanation

Solution

We need to find the derivative of xcosxx\cos x. We see that the given term is a product of two functions. And so, we need to apply the product rule, which states that:
(uv)=uv+uv\left( {uv} \right)' = u'v + uv'
Where uu and vv are two functions and u=ddx(u)u' = \dfrac{d}{{dx}}\left( u \right).
We will then use the basic derivative formulas for xx and cosx\cos x and then substitute in the above formula.

Complete step-by-step solution:
Finding the derivative of xcosxx\cos x i.e. ddx(xcosx)=(xcosx)\dfrac{d}{{dx}}\left( {x\cos x} \right) = \left( {x\cos x} \right)'
Taking x=u(1)x = u - - - - - - (1)
And cosx=v(2)\cos x = v - - - - - - (2)
Using (1) , (2) and Product Rule i.e. (uv)=uv+uv\left( {uv} \right)' = u'v + uv', we have
(xcosx)=((x)×cosx)+(x×(cosx))\left( {x\cos x} \right)' = \left( {\left( x \right)' \times \cos x} \right) + \left( {x \times \left( {\cos x} \right)'} \right)
ddx(xcosx)=((ddx(x))×cosx)+(x×(ddx(cosx)))(3)\Rightarrow \dfrac{d}{{dx}}\left( {x\cos x} \right) = \left( {\left( {\dfrac{d}{{dx}}\left( x \right)} \right) \times \cos x} \right) + \left( {x \times \left( {\dfrac{d}{{dx}}\left( {\cos x} \right)} \right)} \right) - - - - - - (3)
We know,
ddx(xn)=nxn1(4)\dfrac{d}{{dx}}\left( {{x^n}} \right) = n{x^{n - 1}} - - - - - - (4)
And ddx(cosx)=(sinx)(5)\dfrac{d}{{dx}}\left( {\cos x} \right) = \left( { - \sin x} \right) - - - - - - (5)
Using (4) and (5) in (3), we get
ddx(xcosx)=((1×x11)×cosx)+(x×(sinx))\Rightarrow \dfrac{d}{{dx}}\left( {x\cos x} \right) = \left( {\left( {1 \times {x^{1 - 1}}} \right) \times \cos x} \right) + \left( {x \times \left( { - \sin x} \right)} \right)
ddx(xcosx)=((1×x0)×cosx)+(x×(sinx))\Rightarrow \dfrac{d}{{dx}}\left( {x\cos x} \right) = \left( {\left( {1 \times {x^0}} \right) \times \cos x} \right) + \left( {x \times \left( { - \sin x} \right)} \right)
As we know, x0=1{x^0} = 1. Using this, we have
ddx(xcosx)=((1×1)×cosx)+(x×(sinx))\Rightarrow \dfrac{d}{{dx}}\left( {x\cos x} \right) = \left( {\left( {1 \times 1} \right) \times \cos x} \right) + \left( {x \times \left( { - \sin x} \right)} \right)
ddx(xcosx)=((1)×cosx)+(x×(sinx))\Rightarrow \dfrac{d}{{dx}}\left( {x\cos x} \right) = \left( {\left( 1 \right) \times \cos x} \right) + \left( {x \times \left( { - \sin x} \right)} \right)
Using 1×a=a1 \times a = a, we have
ddx(xcosx)=(cosx)+(xsinx)\Rightarrow \dfrac{d}{{dx}}\left( {x\cos x} \right) = \left( {\cos x} \right) + \left( { - x\sin x} \right)
Using +(f(x))=f(x) + \left( { - f(x)} \right) = - f(x), we have
ddx(xcosx)=cosxxsinx\Rightarrow \dfrac{d}{{dx}}\left( {x\cos x} \right) = \cos x - x\sin x, which is the required answer.
Hence, the derivative of xcosxx\cos x is cosxxsinx\cos x - x\sin x.

Note: We need to remember that when the product of two functions is given, we have to use the product rule always. While using the product rule, we can choose any function to be uu or vv. It’s just that we need to apply the formula correctly and remember that the derivative of cosx\cos x is negative of sinx\sin x and not just sinx\sin x.