Let $\mathfrak{g}$ be a complex semisimple Lie algebra of rank $r$. Let $\mathfrak{g}^{\mathrm{reg}}$ be the set of $X\in\mathfrak{g}$ whose centralizer $Z\_{\mathfrak{g}}(X):=\{Y\in\mathfrak{g}:[X,Y]=0\}$ has dimension $r$ (called the set of *regular elements* here).



> 
> **Question.** Can we find polynomial maps
>  $$f\_1,\ldots,f\_r:\mathfrak{g}\to\mathfrak{g}$$
>  such that for all $X\in\mathfrak{g}^{\mathrm{reg}}$, $\{f\_1(X),\ldots,f\_r(X)\}$ is a basis for $Z\_{\mathfrak{g}}(X)$?
> 
> 
> 


The answer is trivially yes for $\mathfrak{g}=\mathfrak{sl}(2,\mathbb{C})$. Simply take $f\_1:\mathfrak{sl}(2,\mathbb{C})\to\mathfrak{sl}(2,\mathbb{C})$ to be the identity map.


Using *Mathematica*, I also found two such polynomials $f\_1,f\_2$ for $\mathfrak{g}=\mathfrak{sl}(3,\mathbb{C})$, but they are a bit too messy to write down here.




---


**Edit.** In other words, if we let
$$E=\{(X,Y)\in\mathfrak{g}^{\mathrm{reg}}\times\mathfrak{g}:[X,Y]=0\}$$
then $E$ is a vector bundle of rank $r$ over $\mathfrak{g}^{\mathrm{reg}}$ and the question is if it is trivial in the algebraic category.



Trivialization of the vector bundle of centralizers of regular elements
The answer is 'yes', and it follows from Theorem 0.1 in B. Kostant, "Lie group representations on polynomial rings" (American Journal of Mathematics, **85** (1963), 327–404). Here is the argument/construction:


Let $\phi\_1,\ldots,\phi\_r$ be generators of the ring of ad-invariant polynomial functions on $\frak{g}$. (We can assume that $\phi\_1(X)=\tfrac12\langle X,X \rangle$, where $\langle, \rangle$ is the Killing form on $\frak{g}$, and we can assume that $\phi\_i$ is homogeneous of degree $m\_i+1$ where $1=m\_1\le m\_2\cdots\le m\_r$ are the exponents of $\frak{g}$. By Kostant's Theorem 0.1 quoted above, the differentials
$$
\mathrm{d}\phi\_1,\ldots, \mathrm{d}\phi\_r
$$
are linearly independent at each point $X\in\frak{g}^{\mathrm{reg}}$. 


Define a polynomial map $f\_i:\frak{g}\to\frak{g}$ homogeneous of degree $m\_i$ for $i=1,\ldots,r$ as the 'gradient' of $\phi\_i$ with respect to the Killing metric, i.e., 
$$
(\mathrm{d}\phi\_i)\_X(Y) = \langle f\_i(X),Y\rangle.
$$
Because $\phi\_i$ is ad-invariant, it satisfies $(\mathrm{d}\phi\_i)\_X\bigl([X,Y]\bigr)=0$ for all $Y\in\frak{g}$. Consequently,
$$
\bigl\langle [X,f\_i(X)],Y\bigr\rangle = -\bigl\langle f\_i(X),[X,Y]\bigr\rangle = 0
$$
for all $Y$, and, since the Killing form is nondegenerate, this implies that $[X,f\_i(X)]$ vanishes identically on $\frak{g}$. (Note that $f\_1(X) = X$.)


By Kostant's result, the vectors $f\_1(X), f\_2(X),\ldots, f\_r(X)$ are linearly independent and hence are a basis of $Z\_{\frak{g}}(X)$ for all $X\in\frak{g}^{\mathrm{reg}}$.


Thus, these polynomial vector fields furnish a solution to the OP's problem.


