How do I find the general formula for the even-order derivative of $y = x\sin (x)$?
I tried using integration by parts and separation followed by mathematical induction, but I failed to obtain the correct answer, which is:
$$\frac {\mathsf d^{2n}y}{\mathsf dx^{2n}} = (−1)^n(x\sin (x) − (2n\cos (x))).$$
For the induction proof we need to prove that $(n=1)$
$$\frac {d^{2}y}{dx^{2}} = 2⋅\cos (x) - x⋅\sin (x)$$
and $(n \to n+1)$
$$\frac {d^{2(n+1)}y}{dx^{2(n+1)}} = (−1)^{n+1}⋅(x\sin (x) − (2(n+1)\cos (x)))$$
The first equation is easy to derive. For the second equation we basically have to take
$$\frac {d^{2}}{dx^{2}} \left( \frac {d^{2n}y}{dx^{2n}}\right) = \frac {d^{2}}{dx^{2}} \left( (−1)^{n}⋅(x\sin (x) − 2n\cos (x)) \right)$$
since we assume that the equation is valid up to the number $n$ (induction hypothesis). We get
$$\frac{d}{dx} \left( (−1)^{n} ⋅ (\sin(x) + x \cos(x) + 2n\sin(x) \right)$$
which leads to
$$\frac {d^{2}}{dx^{2}} \left( \frac {d^{2n}y}{dx^{2n}}\right) = (−1)^{n} ⋅ (\cos(x) + \cos(x) - x \sin(x) + 2n\cos(x) \\ = (−1)^{n} ⋅ (- x \sin(x) + 2(n+1)\cos(x)) = (−1)^{n+1} ⋅ (x \sin(x) - 2(n+1)\cos(x)) =\frac {d^{2(n+1)}y}{dx^{2(n+1)}}$$
which completes the induction proof.