Solveeit Logo

Question

Question: How do you find the derivative of \(2x\cos x\)?...

How do you find the derivative of 2xcosx2x\cos x?

Explanation

Solution

In this problem we need to calculate the derivative of the given function. We can observe that the given function has two different functions in multiplication. The first one is the algebraic function which is 2x2x. The second one is the trigonometric function which is cosx\cos x. We will write the both functions as two separate variables. Now we will differentiate the both the variables with respect to xx by using the differentiation formulas. After calculating the derivatives of each function, we will use the uvuv formula of the differentiation which is ddx(uv)=udvdx+vdudx\dfrac{d}{dx}\left( uv \right)=u\dfrac{dv}{dx}+v\dfrac{du}{dx}. We will substitute the differentiation values of each variable in the above equation and simplify them to get the required result.

Complete step-by-step solution:
Given that, 2xcosx2x\cos x.
In the above function we have two functions, the first one is 2x2x second one is cosx\cos x.
Let us assume that
u=2xu=2x, v=cosxv=\cos x
Differentiating the above equations with respect to xx, then we will get
dudx=ddx(2x)\Rightarrow \dfrac{du}{dx}=\dfrac{d}{dx}\left( 2x \right), dvdx=ddx(cosx)\Rightarrow \dfrac{dv}{dx}=\dfrac{d}{dx}\left( \cos x \right)
We have the differentiation formulas ddx(ax)=a\dfrac{d}{dx}\left( ax \right)=a, ddx(cosx)=sinx\dfrac{d}{dx}\left( \cos x \right)=-\sin x. Applying the above formulas in the above equation, then we will get
dudx=2\Rightarrow \dfrac{du}{dx}=2, dvdx=sinx\Rightarrow \dfrac{dv}{dx}=-\sin x
Now differentiating the given function 2xcosx2x\cos x with respect to xx, then we will have ddx(2xcosx)\dfrac{d}{dx}\left( 2x\cos x \right).
Applying the formula ddx(uv)=udvdx+vdudx\dfrac{d}{dx}\left( uv \right)=u\dfrac{dv}{dx}+v\dfrac{du}{dx} in the above value, then we will get
ddx(2xcosx)=2xdvdx+cosxdudx\Rightarrow \dfrac{d}{dx}\left( 2x\cos x \right)=2x\dfrac{dv}{dx}+\cos x\dfrac{du}{dx}
Substituting the values, we have, in the above equation, then we will get
ddx(2xcosx)=2x(sinx)+cosx(2) ddx(2xcosx)=2cosx2xsinx \begin{aligned} & \Rightarrow \dfrac{d}{dx}\left( 2x\cos x \right)=2x\left( -\sin x \right)+\cos x\left( 2 \right) \\\ & \Rightarrow \dfrac{d}{dx}\left( 2x\cos x \right)=2\cos x-2x\sin x \\\ \end{aligned}
Hence the derivative of the given value 2xcosx2x\cos x is 2cosx2xsinx2\cos x-2x\sin x.

Note: In this problem we have calculated the values of dudx\dfrac{du}{dx}, dvdx\dfrac{dv}{dx} separately which is not necessary for this particular problem. But it is a good practice to calculate them separately. It will be very useful when we have complex functions.