# Integral dependence and fraction fields [duplicate]

Consider $\mathbb{Q}[x]\subset\mathbb{Q}(x)\subset\mathbb{Q}(x)[y]=:K$, where $$y^2=x,$$ and let $O_K$ be the integral closure of $\mathbb{Q}[x]$ in $\mathbb{Q}(x)[y]$. Show that $\mathbb{Q}[x][y]=O_K$.
$\mathbb{Q}[x][y]\subset O_K$ for, if $a\in\mathbb{Q}[x][y]$ then $a$ is a root of $f(y)=y-a(y)$, which is a monic polynomial with coefficients in $\mathbb{Q}[x]$. Therefore $a\in O_K$.
Now I want to show $O_K\subset\mathbb{Q}[x][y]$. Let $a\in O_K$. As $a\in\mathbb{Q}(x)[y]$, I may write $$a=\sum \frac{r_j(x)}{s_j(x)}y^j \ , \quad r_j,s_j\in\mathbb{Q}[x]$$ The goal is to show that all $s_j\in\mathbb{Q}$. Since $a$ is $\mathbb{Q}[x]$-integral we have an equation like $$a^n+q_1(x)a^{n-1}+\cdots+q_n(x)=0 \ , \quad q_j\in\mathbb{Q}[x]$$ but I am not sure how to use this now, plus the fact that $y^2=x$.
This question was merged with Integral closure of $\mathbb{Q}[X]$ in $\mathbb{Q}(X)[Y]$ because it is an exact duplicate of that question.