Question: What is an easy or efficient way to see or prove that $$ 1+2a+3a^2+\cdots+na^{n-1}+(n+1)a^n+na^{n+1}+\cdots+3a^{2n-2}+2a^{2n-1}+a^{2n}\tag{1} $$ is equal to $$ (1+a+a^2+\cdots+a^n)^2\tag{2} $$ Maybe this is a particular case of a more general, well-known result?
Context: This is used with $a:=e^{it}$ to get an expression in terms of $\sin$ for the Fejér kernel.
Thoughts: I thought about calculating the coefficient $c_k$ of $a^k$. But my method is not so obvious that we can get from $(1)$ to $(2)$ in the blink of an eye.
$\mathbf{k=0}$ : clearly $c_0=1$.
$\mathbf{1\leq k\leq n}$ : $c_k$ is the number of integer solutions of $x_1+x_2=k$ with $0\leq x_1,x_2\leq k$, which in turn is the number of ways we can choose a bar $|$ in $$ \underbrace{|\star|\star|\cdots|\star|}_{k\text{ stars}} $$ So $c_k=k+1$.
$\mathbf{k=n+i\quad(1\leq i\leq n)}$ : $c_k$ is the number of integer solutions to $x_1+x_k=n+i$ with $0\leq x_1,x_2\leq n$, which in turn is the number of ways we can choose a bar $|$ in $$ \underbrace{|\star|\star|\cdots|\star|}_{n+i\text{ stars}} $$ different from the $i$-th one from each side. So $c_k=(n+i)+1-2i=n-i+1$.
