y = x2(cos(x)) therefore we will need to use the product rule,
dy/dx = u dv/dx + v du/dx
where u = x2 and v = cos(x)
du/dx = 2x and dv/dx = - sin(x), (don't forget the negative symbol when differentiating cosine)
dy/dx = x2(- sin(x)) + cos(x)(2x)
dy/dx = 2x(cos(x)) - x2(sin(x))