Example 14 (7th Canadian Mathematical Olympiad) Given the sequence $\left\{a_{n}\right\}$ satisfies $a_{1}=\frac{1}{2}, a_{1}+a_{2}+\cdots+$ $a_{n}=n^{2} a_{n}, n \geqslant 1$. Find the general term formula of $\left\{a_{n}\right\}$.
When $n \geqslant 2$, from $a_{1}+a_{2}+\cdots+a_{n}=n^{2} a_{n}, a_{1}+a_{2}+\cdots+a_{n-1}=(n-1)^{2} a_{n-1}$, subtracting the two equations yields $a_{n}=n^{2} a_{n}-(n-1)^{2} a_{n-1}$.
From this, we get $\frac{a_{n}}{a_{n-1}}=\frac{n-1}{n+1}(n=2,3, \cdots)$, so
$$
a_{n}=\frac{a_{n}}{a_{n-1}} \cdot \frac{a_{n-1}}{a_{n-2}} \cdots \cdot \frac{a_{2}}{a_{1}} \cdot a_{1}=\frac{n-1}{n+1} \cdot \frac{n-2}{n} \cdot \frac{n-3}{n-1} \cdots \cdots \frac{1}{3} \cdot \frac{1}{2}=\frac{1}{n(n+1)} .
$$
(6) Generating Function Method
Given an infinite sequence $a_{0}, a_{1}, a_{2}, \cdots, a_{n}, \cdots$, construct the power series formally
$$
f(x)=a_{0}+a_{1} x+a_{2} x^{2}+\cdots+a_{n} x^{n}+\cdots \xlongequal{\text { notation }} \sum_{n=0}^{\infty} a_{n} x^{n},
$$

then $f(x)$ is called the generating function of the sequence $\left\{a_{n}\right\}$.