I am a student and I have a problem in solving this derivative, so please help me.
The problem:
$$ y(x)=x⋅\sin(x)+x^2⋅\cos(3x)$$
I give this problem to online derivative calculator like derivative-calculator.net but the answer is not equal to my teacher answer.
online calc answer: $$ y^\prime(x)=−3x2⋅\sin(3x)+2x⋅\cos(3x)+\sin(x)+x⋅\cos(x) $$ teacher answer: $$ y^\prime(x) = 1⋅\sin(x)+x⋅\cos(x)+2x⋅\cos(3x)-3x^2⋅\sin(3x) $$ what is the correct answer? thanks.