2. Toss a coin and a die at the same time, if the coin shows heads it is recorded as 2, if it shows tails it is recorded as 1, this number multiplied by the die's number of dots is recorded as $x$ (for example, if the coin shows heads and the die shows 3 dots, then $x=2 \times 3=6$), then the mathematical expectation of $x$ is $\qquad$
$$
\begin{array}{l}
x=1,2,3,4,5,6,8,10,12, P(x=1)=\frac{1}{2} \times \frac{1}{6}=\frac{1}{12}, \\
P(x=2)=\frac{1}{2} \times \frac{1}{6}+\frac{1}{2} \times \frac{1}{6}=\frac{1}{6}, P(x=3)=\frac{1}{2} \times \frac{1}{6}=\frac{1}{12}, \\
P(x=4)=\frac{1}{2} \times \frac{1}{6}+\frac{1}{2} \times \frac{1}{6}=\frac{1}{6}, P(x=5)=\frac{1}{2} \times \frac{1}{6}=\frac{1}{12}, \\
P(x=6)=\frac{1}{2} \times \frac{1}{6}+\frac{1}{2} \times \frac{1}{6}=\frac{1}{6}, P(x=8)=\frac{1}{2} \times \frac{1}{6}=\frac{1}{12}, \\
P(x=10)=\frac{1}{2} \times \frac{1}{6}=\frac{1}{12}, P(x=12)=\frac{1}{2} \times \frac{1}{6}=\frac{1}{12},
\end{array}
$$

So $E(x)=\frac{1}{12}(1+4+3+8+5+12+8+10+12)=\frac{21}{4}$.
$$