<s>[INST] Finding the coefficient of a term in an expansion. I was looking over some problems from the American Invitational Mathematics Examination (AIME) and this problem from the 2004 AIME caught my eye:

Let $C$ be the coefficient of $x^2$ in the expansion of the product $(1 - x)(1 + 2x)(1 - 3x)\cdots(1 + 14x)(1 - 15x).$ Find $|C|.$

Evidently, the coefficient of $x$ is $-8$, since summing the coefficients of $x$ within the binomials gives $-1+2-3+\cdots+14-15 = -8$, but how would I go about finding the coeffecient of $x^2$?
 [/INST] FIRST METHOD
$$\begin{align}
&\;\;\;\;\underbrace{\color{magenta}{(1-x)(1+2x)}\color{blue}{(1-3x)(1+4x)}\cdots \color{green}{(1-13x)(1+14x)}}_{14\text{ terms}}(1-15x)\\
&=\underbrace{\color{magenta}{(1+x-2x^2)}\color{blue}{(1+x-12x^2)}\cdots \color{green}{(1+x-182x^2)}}_{7\text{ terms}} (1-15x)\\
&=(1+ax+bx^2+\cdots+\bullet\;  x^{14})(1-15x)\\
&=1+(a-15)x+(b-15a)x^2+\cdots
\end{align}$$
Equating coefficients gives 
$$a=7\\ 
b=-(\underbrace{1\cdot 2}_2+\underbrace{3\cdot 4}_{12}+\cdots +\underbrace{13\cdot 14}_{182})+\binom 72=-483$$
The coefficient of $x^2$ is 
$$C=b-15a=-588\\
|C|=\color{red}{588}$$

SECOND METHOD
Consider combination of two factors at a time.
Coefficient if $x^2$ is
$$\begin{align}
\sum_{i=2}^{15}(-1)^i\ i\color{green}{\sum_{j=1}^{i-1}(-1)^j\ j}
&=\sum_{i=2}^{15}(-1)^i\ i\cdot \color{green}{(-1)^{i-1}\bigg\lfloor \frac i2\bigg\rfloor}\\
&=-\sum_{i=2}^{15}i\bigg\lfloor \frac i2\bigg\rfloor\\
&\color{lightgrey}{=-\left[(2+3)\cdot 1+(4+5)\cdot 2+(6+7)\cdot 3+\cdots+(14+15)\cdot 7\right]}\\
&\color{lightgrey}{=\sum_{r=1}^7 (2r+(2r+1))r}\\
&=\color{red}{-588}
\end{align}$$
</s>