2. If $(1+x)^{n}=a_{0}+a_{1} x+a_{2} x^{2}+\cdots+$ $a_{n} x^{n}$, then $a_{0}+a_{1}+2 a_{2}+\cdots+n a_{n}=$ $\qquad$
2. $n \cdot 2^{n-1}+1$.

Solution: Differentiate both sides with respect to $x$:
$$
n(1+x)^{n-1}=a_{1}+2 a_{2} x+\cdots+n a_{n} x^{n-1}
$$

Let $x=1$, then $n \cdot 2^{n-1}=a_{1}+2 a_{2}+\cdots+n a_{n}$ and $a_{0}=1$
$$
\therefore a_{0}+a_{1}+2 a_{2}+\cdots+n a_{n}=n \cdot 2^{n-1}+1
$$