Flatness for family of hypersurfaces Let $X \to Y$ be a family of hypersurfaces in a constant $\mathbb{P}^n$, i.e. $X \subset Y \times \mathbb{P}^n$ is locally on $Y$ given by one equation of degree $d$ in $\mathbb{P}^n$.
Is $X \to Y$ automatically flat? I know that it is so if $Y$ is reduced, since in this case the fact that the Hilbert polynomial of $X_y$ is constant on $Y$ implies that the family is actually flat. So is $X \to Y$ still automatically flat when $Y$ is nonreduced?
 A: This is an example when proving "locally free" instead of merely "flat" is easier and more straightforward, and no Noetherian assumption on the base is needed. The point is that if some coefficient $a$ of a polynomial $f\in R[x_1,\dotsc x_n]$ is nonzero at $p\in Spec R$ (i.e. nonzero in $R/p$) then it is invertible in an open neighborhood $D(a)\ni p$. 
So let $f\in R[x_1,\dotsc,x_n]$ be a polynomial of degree $d$, $p$ be a point of $Spec R$ (i.e. a prime ideal in $R$) and $k$ be the quotient field of $R/p$. Let $\bar f \in k[x_1,\dotsc,x_n]$ be the reduction of $f$ modulo $p$.
Using a change of coordinates in $k[x_1,\dotsc,x_n]$, put $\bar f$ in a Weierstrass form w.r.t. to the variable $x_n$. This means that 
$$ \bar f= \bar a x_n^d + p_{d-1}x_n^{d-1} + \dots + p_0 $$
for some polynomials $p_j$ in the remaining variables $x_1,\dotsc,x_{n-1}$, and $\bar a\in k$, $\bar a\ne 0$.
If $k$ is infinite, this can be done by a linear change of coordinates. If $k$ is finite, there is a little trick.
If $r_i/s_i\in k$ are the coefficients involved in the change of coordinates ($r_i,s_i\in R$) then this change of coordinates can be done already in the ring $R'=R[1/a \prod s_i]$, i.e. over the open set $Spec R'= D(a\prod s_i)$ in $Spec R$ containing $[p]$. Further, $a$ is invertible over this set.
Now, over $R'$ the quotient $R'[x_1,\dotsc,x_n]/(f)$ is a free $R'[x_1,\dotsc,x_{n-1}]$-module with a basis $1,x_n,\dotsc, x_n^{d-1}$. Hence, it is a free $R'$-module. QED
This proves the statement for a family of nonzero hypersurfaces in $\mathbb A^n$. For a family of nonzero hypersurfaces in $\mathbb P^n$, cover $\mathbb P^n$ by $\mathbb A^n$ appropriately.
A: (Of course, you have the implicit assumption that the equation of degree $d$ is not $0$.)  The answer is yes.  In the case where $Y$ is locally Noetherian, it is true by the "slicing criterion for flatness on the source", as $\mathbb{P}^n_Y \rightarrow Y$ is flat.  See Exercise 25.6.F in the May 12 2012 version of http://math216.wordpress.com/2011-12-course/ .  Your special case is essentially Cor. 2 on p. 152 of Matsumura's "Commutative Algebra".  To get to the general case, use the general technique that finitely presented morphisms (as yours is!) can (locally on the target) be pulled back from the Noetherian situation (see Exercise 10.3.G in the notes linked to above); but this may be more than you care to know.
A: Consider the projective space of degree $d$ monomials in $n+1$ variables $\mathbb{P}^{\binom{n+d}{d}-1}$. On this projective space there is a universal family of hypersurfaces in $\mathbb{P}^n$. This family is flat since the Hilbert polynomial is constant, and the base is reduced.
Now given any family $X \to Y$ of not necessarily flat hypersurfaces of degree $d$ in $\mathbb{P}^n$, there exists a unique moduli map $Y \to \mathbb{P}^{\binom{n+d}{d}-1}$ such that $X\to Y$ is the pullback of the universal family via the moduli map. Since flatness is stable under base change, the map $X \to Y$ must also be flat even when $Y$ is not reduced.
NOTE: I suspect that this answer may contain a mistake due to some sort of "circular" reasoning. At the moment I can not see this mistake though.
