Question:
a) Find the coefficient of $x^n$ at the following generating function: $ne^{2x}$
b) Find the coefficient of $\frac{x^n}{n!}$ at the following generating function: $n \cos x$
My Approach:
It has been proved that $e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!}$ and that $\cos x = \sum_{n=0}^{\infty} (-1)^n\frac{x^{2n}}{(2n)!}$.
Therefore, for (a) we have:
$$
e^{2x}=\sum_{n=0}^{\infty} \frac{(2x)^n}{n!}
$$
Taking the derivative with respect to $x$:
$$
2e^{2x}=\sum_{n=0}^{\infty} n\frac{2^n\cdot x^{n-1}}{n!}
$$
Multiplying by $x$:
$$
2xe^{2x}=\sum_{n=0}^{\infty} n\frac{2^n\cdot x^n}{n!} = \sum_{n=0}^{\infty}\frac{2^n \cdot x^n}{(n-1)!}
$$
Therefore:
$$
\frac{2^n}{(n-1)!}
$$
is the coefficient… But that's the coefficient for the function $2xe^{2x}$. I don't know if I am missing something, but it's not clear to me what $n e^{2x}$ is… I did the same thing for (b), but I'll hide the details.
Maybe that $n$ is just a constant with different index, and therefore we're actually looking for:
$$
n e^{2x} = n (\sum \frac{2^k x^k}{k!}) \underbrace{\rightarrow}_{\text{Coef. of }x^k} \frac{n 2^k}{k!}
$$
… But I can't think about that because we're asked to find the coefficient of $x^n$, and therefore the index of the infinite series that represent $e^x$ is $n$… What a MESS!
Can someone please clarify to me what is going on with that $n$ multiplying the functions in terms of $x$?
Thank you!
Best Answer
It is sufficient to clarify a.) since we can use the same arguments for b.). It is convenient to use the coefficient of operator $[x^k]$ to denote the coefficient of $x^k$ in a series.
Now the problem a.)
Note: The index variable $k$ in (1) is a so-called bound variable. This means that the scope (i.e. range of validity) is determined by the sigma-operator $\sum$ and the operator precedence rules.
In fact it is even correct to write \begin{align*} \color{blue}{n}e^{2x}&=\color{blue}{n}\sum_{n=0}^\infty \frac{(2x)^n}{n!}\tag{2} \end{align*} where the factor $\color{blue}{n}$ outside the sum is a free variable different to the bound index variable $n$ of the sigma-operator $\sum$. But of course this is a misuse of notation and strictly to avoid in order to support readability of the text.
Side note: A great example of a notational misuse is given by Richard P. Stanley in this MO post.