Fix $n$ and let $H\_1$ and $H\_2$ be two hypersurfaces in ${\bf A}^n$ (not necessarily smooth or irreducible, but we'll assume reduced). If the complements $U\_i = {\bf A}^n \setminus H\_i$ are isomorphic as schemes, does this imply that the $H\_i$ are isomorphic?


From asking other people, the answer is yes via Euler characteristic arguments when the $H\_i$ are smooth, but I have in mind singular examples. 


As for the ground field, the polynomials I have in mind are defined over ${\bf Z}$, so choose whatever field you like. Probably I'd prefer an answer for the complex numbers though.



Are complements of non-isomorphic affine hypersurfaces necessarily non-isomorphic?
Your question appears as the 'Complement problem' in Hanspeter Kraft's article [Challenging problems on affine n-space](http://archive.numdam.org/ARCHIVE/SB/SB_1994-1995__37_/SB_1994-1995__37__295_0/SB_1994-1995__37__295_0.pdf) and it seems from that article that the problem is still open for $H\_1, H\_2$ irreducible. Even the case of $n=2$ is non-trivial. In this case, the article mentions a result of Kraft and Vust saying that the curves $H\_1$ and $H\_2$ in $A^2$ are isomorphic if their genus is $\ge 1$.


In the case where $H\_1$ and $H\_2$ are reducible however, I suspect that there are many counterexamples. I.e., take $H\_1=Z(xy(x-y))$ and $H\_2=Z(xy(y-1))$, the complements of these curves are isomorphic.


EDIT: A better example, due to Vust:


Take $C\_1=Z(y^2-x^3)$ and $C\_2=Z(y)$ and let $f:A^2\to A^2$ be the map $f(x,y)=(xy,y)$. Then $f^{-1}(C\_1\cup C\_2) = C\_2\cup C$ where $C$ is the curve $Z(x^3y-1)$, which is disjoint from $C\_2$. It follows that $f$ induces an isomorphism $$A^2\setminus C\_1\cup C\_2\simeq A^2\setminus C\cup C\_2.$$


