Question
Question: Find the derivative of \[x\cos x\]....
Find the derivative of xcosx.
Solution
We need to find the derivative of xcosx. 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)′=u′v+uv′
Where u and v are two functions and u′=dxd(u).
We will then use the basic derivative formulas for x and cosx and then substitute in the above formula.
Complete step-by-step solution:
Finding the derivative of xcosx i.e. dxd(xcosx)=(xcosx)′
Taking x=u−−−−−−(1)
And cosx=v−−−−−−(2)
Using (1) , (2) and Product Rule i.e. (uv)′=u′v+uv′, we have
(xcosx)′=((x)′×cosx)+(x×(cosx)′)
⇒dxd(xcosx)=((dxd(x))×cosx)+(x×(dxd(cosx)))−−−−−−(3)
We know,
dxd(xn)=nxn−1−−−−−−(4)
And dxd(cosx)=(−sinx)−−−−−−(5)
Using (4) and (5) in (3), we get
⇒dxd(xcosx)=((1×x1−1)×cosx)+(x×(−sinx))
⇒dxd(xcosx)=((1×x0)×cosx)+(x×(−sinx))
As we know, x0=1. Using this, we have
⇒dxd(xcosx)=((1×1)×cosx)+(x×(−sinx))
⇒dxd(xcosx)=((1)×cosx)+(x×(−sinx))
Using 1×a=a, we have
⇒dxd(xcosx)=(cosx)+(−xsinx)
Using +(−f(x))=−f(x), we have
⇒dxd(xcosx)=cosx−xsinx, which is the required answer.
Hence, the derivative of xcosx is cosx−xsinx.
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 u or v. It’s just that we need to apply the formula correctly and remember that the derivative of cosx is negative of sinx and not just sinx.