2 Find all pairs of positive integers $(a, b)$, such that
$$
\frac{a^{2}}{2 a b^{2}-b^{3}+1}
$$

is an integer.
Solution 1 Let $(a, b)$ be a pair of positive integers that satisfy the condition. Since $k = \frac{a^{2}}{2 a b^{2}-b^{3}+1} > 0$, it follows that $2 a b^{2}-b^{3}+1 > 0$, and $a > \frac{b}{2} - \frac{1}{2 b^{2}}$, thus $a \geqslant \frac{b}{2}$. Combining this with $k \geqslant 1$, i.e., $a^{2} \geqslant b^{2}(2 a - b) + 1$, we know that $a^{2} > b^{2}(2 a - b) \geqslant 0$. Therefore,
$$
a > b \text{ or } 2 a = b.
$$

Now, let $a_{1}, a_{2}$ be the two solutions of the equation in $a$ (with $k, b$ fixed)
$$
a^{2} - 2 k b^{2} a + k(b^{3} - 1) = 0,
$$

and assume one of them is an integer. Then, by $a_{1} + a_{2} = 2 k b^{2}$, the other solution is also an integer. Without loss of generality, assume $a_{1} \geqslant a_{2}$, then $a_{1} \geqslant k b^{2} > 0$, and further, by $a_{1} a_{2} = k^{2}(b^{3} - 1)$, we get
$$
0 \leqslant a_{2} = \frac{k(b^{3} - 1)}{a_{1}} \leqslant \frac{k(b^{3} - 1)}{k b^{2}}.
$$

When $b \geqslant 2$, we have
$$
(2 k b^{2} - b - 1)^{2} - \Delta = 4 k b^{2} - 4 k - (b + 1)^{2} = 4 k(b^{2} - 1) - (b + 1)^{2} > (4 k - 1)(b^{2} - 1) > 0; \\
(2 k b^{2} - b + 1)^{2} - \Delta = 4 k b^{2} - 4 k - (b - 1)^{2} = 4 k(b^{2} - 1) - (b - 1)^{2} > (4 k - 1)(b^{2} - 1) > 0.
$$

Therefore, (3) holds.
Using the fact that $\Delta$ is a perfect square and (3), we have
$$
\Delta = 4 k^{2} b^{4} - 4 k(b^{3} - 1) = (2 k b^{2} - b)^{2},
$$

Thus, $4 k = b^{2}$, and $b$ is even. Let $b = 2 l$, then $k = l^{2}$. Using (2), we can solve for $a = l$ or $8 l^{4} - l$.

In summary, the pairs $(a, b)$ that satisfy the condition are $(2 l, 1)$, $(l, 2 l)$, or $(8 l^{4} - l, 2 l)$, where $l$ is a positive integer. Direct verification shows that they meet the requirements.