Coefficient of integral dependence and prime ideals Let $A \subseteq B$ be an integral extension of rings. Let $b \in B$, and let $b^n+a_1b^{n-1}+\dots+a_{n-1}b+a_n=0$ be an integral dependence relation for $b$, with $a_1,\dots,a_n\in A$.
Given a prime ideal $\mathfrak{p}$ in $B$, I am trying to prove that $b\in\mathfrak{p}$ if and only if $a_1,\dots,a_n\in \mathfrak{p}\cap A$. I have managed to prove the implication $\Leftarrow$, but I am stuck with the other: I am only able to show the claim for $a_n$.
In particular, I am interested in the case where $A$ is the subring of invariants under some group action on $B$, but since I proved one implication in this more general setting I suspect that the other direction may hold too under these assumptions.
 A: It is not true in general. Note that $b\in\mathfrak{p}\Leftrightarrow a_1,\dots,a_n\in\mathfrak{p}\cap A$ implies $$f\left(D(b)\right)=\bigcup_i D(a_i)$$ where $f:\operatorname{Spec} B\to\operatorname {Spec} A,\mathfrak{p}\mapsto A\cap\mathfrak{p}$ is the induced map on the spectra. In particular $f$ would be an open map, and hence going-down would hold for the extension $B/A$. But there are integral extensions for which going-down does not hold (see e.g. here or here).
I don't know about the general case for  the invariant ring under group actions but the following special case is true: If $G$ is a finite group that acts on $B$ and $A=B^G$ is the ring of invariants, then for $b\in B$ the claim (almost, see edit) holds for the polynomial $$\prod_{\sigma\in G}(X-\sigma(b))\in A[X]$$
(Since the coefficients of that polynomials are sums of products of elements of the form $\sigma(b)$)
Edit: It is also not true for the invariant ring, here is an easy example (much easier than the argument above): Let $B=\Bbb Z[i]$ be the ring of integers in $\Bbb Q(i)$ and $A=\Bbb Z$. The element $b=i+2$ satisfies $b^2-4b+5=0$ and we have $b\in \langle b\rangle =:\mathfrak{p}$, but $4\notin \mathfrak{p}\cap A=\langle 5\rangle$.
Note that $A$ is the ring of invariants under the Galois action on $B$.
What is true is the following (in the general setting again): If $b$ is contained in all prime ideals $\mathfrak{p}$ lying over the same prime $\mathfrak{q}$ of $A$ then also all $a_i$ lie in $\mathfrak{q}$. Here the $a_i$ are defined by $$\prod_{\sigma\in G}(X-\sigma(b))=X^n+a_1X^{n-1}+\dots+a_n$$
Since the elements $\sigma\in G$ permute the primes lying over $\mathfrak{q}$ all sums of products of elements of the form $\sigma(b)$ are also contained in all primes $\mathfrak{p}$ lying over $\mathfrak{q}$. Now the coefficients $a_i$ are exactly of this form and are furthermore contained in $A$, so we have $a_i\in \mathfrak{p}\cap A=\mathfrak{q}$
A: Here are my thoughts about your question. For $\Rightarrow$, I think you can manage to prove that all the $a_i$'s are in $\mathfrak{p}\cap A$ by induction. For simplicity set $\mathfrak{q}= \mathfrak{p}\cap A$, and note that it is a prime ideal of $A$.
In what follows I treat the case $b\in B\setminus A$.

*

*First step: $a_n\in \mathfrak{q}$. This follows from looking at the polynomial mod $\mathfrak{p}$, which gives you $a_n\equiv 0 \mod \mathfrak{p}$.


*Induction step: suppose $a_i\in \mathfrak{q}$ for $i\in \left\lbrace k+1, \dots ,n\right\rbrace$, let us show that $a_k\in\mathfrak{q}$.
You can see that:
$$-b^{n-k} \sum_{i=0}^k a_i b^{k-i} = \sum_{i=k+1}^n a_i b^{n-i} \in \mathfrak{q} .$$
But as $b\in B\setminus A$, then $b^{n-k}\notin \mathfrak{q}$, and the latter being a prime ideal then we have $\sum_{i=0}^k a_i b^{k-i}\in\mathfrak{q}\subset\mathfrak{p}$.
Now as $a_ib^{k-i}\in\mathfrak{p}$ for $0\leq i < k$ looking at the previous expression modulo $\mathfrak{p}$ yields $a_k\equiv 0\mod \mathfrak{p}$. Thus $a_k\in \mathfrak{p}\cap A = \mathfrak{q}$, and this concludes the induction.


*Conclusion: we proved that each $a_i$ lies in $\mathfrak{q}$.
This is a "naive" proof, where we do not really understand what's really happening. It might be enlightening to look for a geometric proof using the language of schemes but it'd need some more thought!
