Find the coefficient of $x^n$ in the expansion of $$\left(1 + \frac{x}{1!} + \frac{x^2}{2!}+\cdots +\frac{x^n}{n!} \right)^2$$
How do you even start this problem? Do you use multinomial theorem or binomial theorem? Could anyone please help? I found this in a textbook of mine. What I feel hard is what to do with the factorials?
To do this, you need to look at every combination of terms that gives $x^n = x^j \cdot x^{n-j}$. We can do this using the multinomial theorem, or just multiply it out.
\begin{align*}\left(1+\frac{x}{1!} + \ldots + \frac{x^n}{n!}\right)^2 &= \left(1+\frac{x}{1!} + \ldots + \frac{x^n}{n!}\right)\left(1+\frac{x}{1!} + \ldots + \frac{x^n}{n!}\right)\\ &= 1\left(1+\frac{x}{1!} + \ldots + \frac{x^n}{n!}\right) + \frac{x}{1!}\left(1+\frac{x}{1!} + \ldots + \frac{x^n}{n!}\right) + \ldots\\ &+ \frac{x^n}{n!}\left(1+\frac{x}{1!} + \ldots + \frac{x^n}{n!}\right)\\ &= 1 + 2\frac{x}{1!} + \frac{x^2}{2!} + \left(\frac{x}{1!}\right)^2 + \frac{x^2}{2!} + \ldots \end{align*} So the $1$ coefficient is $1$, the $x$ term is $\frac{2}{1!}$, the $x^2$ term is $\frac{1}{2!} + \frac{1}{1!}\frac{1}{1!} + \frac{1}{2!}$, the $x^3$ term is $\frac{1}{3!} + \frac{1}{1!}\frac{1}{2!} + \frac{1}{2!}\frac{1}{1!} + \frac{1}{3!}$. Continuing in this manner, we get that the $x^n$ term is (using the first few terms to predict the pattern):
$$\frac{1}{n!} + \frac{1}{1!}\frac{1}{(n-1)!} + \frac{1}{2!}\frac{1}{(n-2)!} + \cdots + \frac{1}{(n-2)!}\frac{1}{2!} + \frac{1}{(n-1)!}\frac{1}{1!} + \frac{1}{n!}$$ or rewriting as a sum, we could rewrite this as \begin{align*}\sum_{j=0}^n \frac{1}{j!}\frac{1}{(n-j)!}&= \frac{1}{n!}\sum_{j=0}^n \frac{n!}{j!(n-j)!}\\ &= \frac{1}{n!}\sum_{j=0}^n \left(\begin{array}{c}n\\j\end{array}\right) 1^j 1^{n-j}\\ &= \frac{1}{n!}(1+1)^n\\ &= \frac{1}{n!}2^n \end{align*} (the second-to-last equality is the binomial theorem)
(To make sense of this when $j=0$ or $j=n$, we use the convention $0! = 1$)