14. Given the function $y=(a+2) x^{2}-2\left(a^{2}-1\right) x+1$, where the independent variable $x$ is a positive integer, and $a$ is also a positive integer. Find the value of $x$ for which the function value is minimum.
14. $y=(a+2)\left(x-\frac{a^{2}-1}{a+2}\right)^{2}+1-\frac{\left(a^{2}-1\right)^{2}}{a+2}$,

Its axis of symmetry is $x=\frac{a^{2}-1}{a+2}=(a-2)+\frac{3}{a+2}$.
Since $a$ is a positive integer,
thus $0<\frac{3}{a+2}<1$ when $a>1$. Since $x$ is an integer and $\frac{a^{2}-1}{a+2}$ is a decimal, $x=\frac{a^{2}-1}{a+2}$ cannot achieve the minimum value.
When $x=a-2$,
$y_{1}=(a+2)(a-2)^{2}-2\left(a^{2}-1\right)(a-2)+1$;
When $x=a-1$,
$y_{2}=(a+2)(a-1)^{2}-2\left(a^{2}-1\right)(a-1)+1$.
Also, $y_{1}-y_{2}=4-a$,
(i) When $4-a>0$, i.e., $1<a<4$ and $a$ is an integer, $x$ takes $a-2$, making $y_{1}$ the minimum value.