2 x *cos(x)
Apply the product rule:
f(x)=x2f{\left(x \right)} = x^{2}f(x)=x2; to find ddxf(x)\frac{d}{d x} f{\left(x \right)}dxdf(x):
Apply the power rule: x2x^{2}x2 goes to 2x2 x2x
g(x)=cos(x)g{\left(x \right)} = \cos{\left(x \right)}g(x)=cos(x); to find ddxg(x)\frac{d}{d x} g{\left(x \right)}dxdg(x):
The derivative of cosine is negative sine:
The result is: −x2sin(x)+2xcos(x)- x^{2} \sin{\left(x \right)} + 2 x \cos{\left(x \right)}−x2sin(x)+2xcos(x)
Now simplify:
The answer is:
2 - x *sin(x) + 2*x*cos(x)
2 2*cos(x) - x *cos(x) - 4*x*sin(x)
2 -6*sin(x) + x *sin(x) - 6*x*cos(x)