Integral closure of $\mathbb{Q}[X]$ in $\mathbb{Q}(X)[Y]$ Consider the ring $\mathbb{Q}[X]$ of polynomials in $X$ with coefficients in the field of rational numbers. Consider the quotient field $\mathbb{Q}(X)$ and let $K$ be the finite extension of $\mathbb{Q}(X)$ given by $K:=\mathbb{Q}(X)[Y]$, where $Y^2-X=0$.
Let $O_{K}$ be the integral closure of $\mathbb Q[X]$ in $K$. Certainly $O_{K}$ contains both $\mathbb{Q}[X]$ and $Y$, hence
$$ O_{K}\supseteq \mathbb{Q}[X][Y]$$
My guess is that actually "=" holds. How can be proved this?
 A: Consider an element $f \in \Bbb{Q}(X)[Y]$. Then $f$ is of the form $g + hY$ where $g,h \in \Bbb{Q}(X)$. If $f$ is integral over $\Bbb{Q}[X]$ then consider the minimal polynomial $m_f(t)$ of $f$ over $\Bbb{Q}(X)$. We find 
$$m_f(t) = t^2 - 2gt + g^2 - h^2X.$$
Now because $\Bbb{Q}[X]$ is a UFD with fraction field $\Bbb{Q}(X)$, Gauss' Lemma applies to tell us that the coefficients of this minimal polynomial actually lie in $\Bbb{Q}[X]$.
Thus we just need to show that $h \in \Bbb{Q}[X]$ to complete the proof of the problem. We have $g^2 - h^2X$ being integral over $\Bbb{Q}[X]$ and so $g^2 - h^2X \in \Bbb{Q}[X]$. Since $g \in \Bbb{Q}[X]$ it follows that $h^2X \in \Bbb{Q}[X]$. Now write $h = h_1/h_2$; assume that $h_2 \nmid h_1$. Then for $h_1^2X/h_2^2$ to be in $ \Bbb{Q}[X]$ necessarily $h_2$ is a unit and so $h \in \Bbb{Q}[X]$. Thus the integral closure is as claimed.
A: Let's view ${\bf Q}\rm (x)[y]/(y-x^2)$ as ${\bf Q}\rm(x)[x^{1/2}]$. Set ${\bf Q}\rm(x)[x^{1/2}]\subseteq{\bf Q}\rm(x^{1/2})$ and observe
$$\rm \frac{1}{p(x)+x^{1/2}q(x)}=\frac{p(x)-x^{1/2}q(x)}{p(x)^2-x~\,q(x)^2}\in{\bf Q}(x)[x^{1/2}].$$
Since every $\rm f(x^{1/2})\in{\bf Q}[x^{1/2}]$ may be written as $\rm p(x)+x^{1/2}q(x)$, the above establishes that any rational function in $\rm x^{1/2}$ is in ${\bf Q}(x)[x^{1/2}]$, so in fact we may say that $\rm{\bf Q}(x)[x^{1/2}]={\bf Q}(x^{1/2})$.
Thus, we want to find the integral closure of ${\bf Q}[x]$ within ${\bf Q}(x)[y]\cong{\bf Q}(x^{1/2})$. Given any polynomial in the latter $\rm a:=p(x)+x^{1/2}q(x)$ you can find a polynomial in the variable $T$ with coefficients from ${\bf Q}[x]$ of which $\rm a$ is a root (make a quadratic from the roots $\rm p(x)\pm x^{1/2}q(x)$); this shows the first inclusion $\rm{\bf Q}[x^{1/2}]\subseteq {\cal O}_{{\bf Q}(x^{1/2})}$, now you want the reverse inclusion.
Suppose we have an $\rm a(x^{1/2})/b(x^{1/2})\in{\bf Q}(x^{1/2})\setminus {\bf Q}[x^{1/2}]$, and let $\rm \pi(x^{1/2})$ be an irreducible factor of the denominator $\rm b(x^{1/2})$ with valuation $\rm e$ (i.e. $\rm\pi(x^{1/2})^e\mid b(x)$ but $\rm\pi(x^{1/2})^{e+1}\nmid b(x)$.) Now let $\rm f(T)$ be a polynomial in $\rm {\bf Q}[x][T]$ such that $\rm f(a/b)=0$; clear denominators to show that we have something which is $\rm\ne0\bmod \pi(x^{1/2})$ equal to $0$, impossible. 
See here for the (arguably easier-to-digest) number field analogue of this line of reasoning  (via clearing denominators to reach a congruence contradiction). As an aside, both number fields and function fields enjoy partial fraction decomposition - in the former case it is encoded in the Prufer factorization ${\bf Q}/{\bf Z}\cong\bigoplus{\bf Z}(p^\infty)$ (a special case of $p$-primary decomposition for abelian groups), where the Prufer $p$-groups are ${\bf Z}(p^\infty)\cong{\bf Q}_p/{\bf Z}_p\cong{\bf Z}[p^{-1}]$ (i.e. rationals with $p$-power denominators modulo the integers under addition).
A: Yes, your guess is correct.   
The key of the explanation is to write $Y=\sqrt X$, a psychological change of notation which makes clear that actually $\mathbb Q[X][Y]=\mathbb Q[\sqrt X]=\mathbb Q[Y]$ and that $\mathbb Q(X)[Y]=\mathbb Q(X)[\sqrt X]=\mathbb Q(\sqrt X)=\mathbb Q(Y)$.  
The reverse inclusion that you are after $ O_{K}\subseteq \mathbb{Q}[X][Y]$ is then quite clear : a rational function  $f(Y)\in K=\mathbb Q(\sqrt X)=\mathbb Q(Y)$ integral over $\mathbb Q[ X]$ is a fortiori integral over $\mathbb Q[\sqrt X]=\mathbb Q[Y]$ so that, as you wished,  $f(Y)\in \mathbb Q[Y]$, since $\mathbb Q[Y]$ is integrally closed in $\mathbb Q(Y)$.
