How do you differentiate y=x^2sinx+xcosx?

1 Answer
Nov 10, 2016

dy/dx = x^2cosx + xsinx + cosx

Explanation:

If you are studying maths, then you should learn the Product Rule for Differentiation, and practice how to use it:

d/dx(uv)=u(dv)/dx+(du)/dxv , or, (uv)' = (du)v + u(dv)

I was taught to remember the rule in words; "The first times the derivative of the second plus the derivative of the first times the second ".

This can be extended to three products:

d/dx(uvw)=uv(dw)/dx+u(dv)/dxw + (du)/dxvw

So with f(x) = x^2sinx + xcosx we will need to apply the product rule twice;

For the first component Let y = x^2sinx
{ ("Let "u = x^2, => , (du)/dx = 2x), ("And "v = sinx, =>, (dv)/dx = cosx ) :}

d/dx(uv)=u(dv)/dx + (du)/dxv
:. d/dx(x^2sinx)=(x^2)(cosx) + (2x)(sinx)
:. d/dx(x^2sinx)=x^2cosx + 2xsinx ..... [1]

For the second component Let y = xcosx
{ ("Let "u = x, => , (du)/dx = 1), ("And "v = cosx, =>, (dv)/dx = -sinx ) :}

d/dx(uv)=u(dv)/dx + (du)/dxv
:. d/dx(xcosx)=(x)(-sinx) + (1)(cosx)
:. d/dx(xcosx)=cosx - xsinx ..... [2]

Combining the results [1] ad [2] we get;

dy/dx = x^2cosx + 2xsinx + cosx - xsinx
:. dy/dx = x^2cosx + xsinx + cosx