Example 2. Given $a_{\mathrm{n}}=3 n-1$, find $S_{\mathrm{n}}$.


Solve the system 
\[
\left\{\begin{array}{l}
2 a=3, \\
-a+b=-1
\end{array}\right.
\]
to get
\[
\left\{\begin{array}{l}
a=\frac{3}{2}, \\
b=\frac{1}{2} .
\end{array}\right.
\]

Therefore, 
\[
S_{n}=\frac{3}{2} n^{2}+\frac{1}{2} n.
\]