I have the following homework question
Find the Maclaurin series for $f(x) = (x^3+x)\sin x$ and use it to find $f^{(n)}(0)$.
What I did is the following $$f(x)=x^3\sin x+x\sin x$$ which equals to $$f(x)=x^3\sum_{n=0}^\infty\frac{(-1)^nx^{2n+1}}{(2n+1)!}+x\sum_{n=0}^\infty\frac{(-1)^nx^{2n+1}}{(2n+1)!}$$ so $f(x)$ would be $$f(x) =\sum_{n=0}^\infty\frac{(-1)^nx^{2n+4}}{(2n+1)!}+\sum_{n=0}^\infty\frac{(-1)^nx^{2n+2}}{(2n+1)!}$$ and I know that $f^{(n)}(0)$ would be the coefficient of $\dfrac{x^n}{n!}$ but I'm not sure if I have to combine these two sums to find it.
Yes, you need to combine the two series $$f(x) =\sum_{n=0}^\infty\frac{(-1)^nx^{2n+4}}{(2n+1)!}+\sum_{n=0}^\infty\frac{(-1)^nx^{2n+2}}{(2n+1)!}$$
The coefficient of $x^n$ will be, $$ a_n=0 \text { for } n=2k+1$$ and $$a_n = (-1)^{n/2} \big( \frac {1}{(n-3)!} - \frac {1}{(n-1)!} \big)$$ for $ n=2k.$
$$ f(x) = x^2 + (1- 1/{3!})x^4 -( 1/{3!}- 1/{5!})x^6+....$$