Question
Question: How do you find the derivative of: \(y=x\sin x+\cos x\)...
How do you find the derivative of:
y=xsinx+cosx
Solution
To find the derivative of the given expression, we are going to use the product rule in xsinx. We know that in the product rule, let us take two functions f(x)&g(x) and multiply them then we are going to use the product rule as follows: dxd(f(x)g(x))=f(x)g′(x)+g(x)f′(x). Also, we need the derivative of the following functions: dxdsinx=cosx and dxdcosx=−sinx.
Complete step-by-step solution:
The function given in the above problem which we have to differentiate is as follows:
y=xsinx+cosx
Taking derivative with respect to x on both the sides we get,
dxdy=dxd(xsinx+cosx)
Distributing the derivative in both the functions xsinx&cosx and we get,
dxdy=dxd(xsinx)+dxd(cosx) ……….. (1)
Now, we are going to use product rule to find the derivative of xsinx with respect to x. In the below, we are showing the product rule by using two functions f(x)&g(x) as follows:
dxd(f(x)g(x))=f(x)g′(x)+g(x)f′(x)
Substituting f(x)=x and g(x)=sinx in the above differentiation and we get,
dxd(xsinx)=x(sinx)′+sinx(x)′
We know the derivative of sinx with respect to x is cosx and the derivative of x with respect to x is 1 so applying these derivatives in the above we get,