Calculate $f^{(25)}(0)$ for $f(x)=x^2 \sin(x)$

Solution 1:

$$f(x) = x^2\sin x$$ $$ = x^2 \left(x - \frac{x^3}{3!} +...- \frac{x^{23}}{23!} +...\right)$$ $$ = -\frac{x^{25}}{23!} +...$$ $$f^{(25)}(x) = -\frac{25!}{23!} + ...$$ $$f^{(25)}(0) = -600$$

WolframAlpha verifies that the $8^{23}$ should not be there.

Solution 2:

use the leibnitz rule to find the nth derivative of the function. $$\frac{d^n}{dx^n}(uv) = ^nC_0u \frac{d^n}{dx^n} (v)+^nC_1 \frac{d}{dx} (u) \frac{d^{n-1}}{dx^{n-1}} v+...... ^nC_n \frac{d^n}{dx^n} (u)v$$ here $ u=x^2$ and $v=\sin x$ also note $$ \frac{d^n}{dx^n} (\sin x)=sin(x+n\frac{\pi}{2})$$ on solving you get $$f^{n}(x)=x^2\sin(x+n\frac{\pi}{2})+2nx\sin(x+(n-1)\frac{\pi}{2})+n(n-1)\sin (x+(n-2)\frac{\pi}{2})$$