TITLE: Getting two very different answers for Maclaurin series for $xe^{x}$ - how is this possible?
QUESTION [5 upvotes]: I am currently trying to find the Maclaurin series for $xe^{x}$ in Calculus II. This is what I've done so far:
$$f(x) = xe^{x}$$
$$f'(x) = xe^{x} + e^{x}$$
$$f''(x) = xe^{x} + 2e^{x}$$
$$f'''(x) = xe^{x} + 3e^{x}$$
$$f^{[4]}(x) = xe^{x}+4e^{x}$$
and so on. Evaluating them at x = 0 gives me 0, 1, 2, 3, 4.... respectively.
Thus, I can say that:
$$xe^{x} = x + \frac{2x^{2}}{2!} + \frac{3x^{3}}{3!} + \frac{4x^{4}}{4!} ... \frac{nx^{n}}{n!}$$
And therefore:
$$xe^{x} = \sum_{n=0}^{\infty}\frac{nx^{n}}{n!}$$
However, there is more to it. I can rewrite the function:
$$xe^{x} = x + x^{2} + \frac{x^3}{2} + \frac{x^4}{6} ...$$
And then:
$$xe^{x} = \frac{x}{0!} + \frac{x^{2}}{1!} + \frac{x^{3}}{2!} + \frac{x^{4}}{3!} ... \frac{x^{n+1}}{n!}$$
Which means:
$$xe^{x} = \sum_{n=0}^{\infty}\frac{x^{n+1}}{n!}$$
How is this possible? How can $$\sum_{n=0}^{\infty}\frac{x^{n+1}}{n!} = \sum_{n=0}^{\infty}\frac{nx^{n}}{n!}$$?
Have I made an error somewhere? Or is this mathematically possible? Thank you.

REPLY [4 votes]: Good question!
You did not make any mistakes.
We may see that
$$f(x)=\sum_{n\ge0}\frac{n}{n!}x^n=0+\sum_{n\ge1}\frac{n}{n!}x^n.$$
We then see that $n/n!=1/(n-1)!$ when $n\ge1$. Thus
$$f(x)=\sum_{n\ge1}\frac{x^n}{(n-1)!}=\sum_{n\ge0}\frac{x^{n+1}}{n!}=xe^x.$$