The following is a problem in the book Agebraic curves by Fulton.
Q: Let $L= k(X)$ be the field of rational functions in one variable. Show that any element of $L$ that is integral over $k[X]$ is already in $k[X]$.
First, I want to know, what do we mean by "any element of $L$ that is integral over $k[X]$ "?
As I understand, we say that $ \frac{F(X)}{G(X)} \in L$ is an integral over $k[X](=B)$ if there exist a polynomial in $B[Y]$, say, $Y^n+b_{n-1}Y^{n-1}+\dots+b_0$ with the coefficients in $b's \in B$ s.t. at $Y = \frac{F(X)}{G(X)}$, the polynomial evaluates to zero.
But, in the book (Fulton- Algebraic Curves), it seems to suggest that there exist $z \in L$ s.t. $z^n+a_1z^{n-1}+\dots+a_n = 0$ where $z= F/G$. Are these two definition equivalent or am I wrong in my understading of the term integral over $k[X]$?
Edit 1: In the book, it is not mentioned that $a_i \in k[X]\; \forall i$.
Edit 2: Let me write here my solution so that my doubt becomes clear.
Solution 1: If $a_i \in k \; \forall i$, then, WLOG, we may assume that $F,G \in k[X]$ are irreducible. We have
$$ F^n + a_1F^{n-1}G+\dots + a_nG^n=0 \\ F^n = - (a_1F^{n-1}G+\dots + a_nG^n) $$
Since LHS divides F, RHS should also which leads to contradiction that $F$ divides $G$.
Solution 2: If $a_i \in k[X] \; \forall i$, assuming $z =F/G$, we won't be able to contradict as $F$ might divide $a_n$.
Now, one another solution that I though of was that since $k[X]$ contains infinitely many of irreducibles, I could choose $G$ to be different irreducible than all the $a_i$s but then based on the selection of $z = F/G$, my $a_i$s might vary. So, this argument doesn't seem correct.