Exercise 5.14(d), chapter I in Hartshorne Let $f$ be an irreducible polynomial in $k[x,y]$ such that $P=(0,0)$ is a double point of $Y=Z(f)$, that is, $f=f_2+f_3+\cdots$, where $f_i$'s are homogeneous term of degree $i$, $f_2\neq0$, then we want to show that $k[[x,y]]/(f)\cong k[[x,y]]/(y^2-x^r)$ for some $r\geq 2$. (here char $k\neq2$).
If $f_2$ has two different linear factor, by a linear transform, then $k[[x,y]]/(f)\cong k[[x,y]]]/(xy)$. By a linear transform again, we have  $k[[x,y]]]/(xy)\cong k[[x,y]]/(y^2-x^2)$. Hence $k[[x,y]]]/(f)\cong k[[x,y]]/(y^2-x^2)$.
If $f_2$ has only one linear factor, by a linear transform, W.L.O.G., we can assume that $f_2=y^2$. Since $f$ is irreducible in $k[x,y]$, then there exists some $r\geq3$ such that $x^r$ appears in $f_r$, here we can assume that $r$ is the smallest such number. Now I want to find some automatism $\phi$ of $k[[x,y]]$ such that $\phi(y^2-x^r)=f$. But I got stuck.
 A: Let's develop the discussion from the comments. Remember, we're trying to finish the solution in the case when $f_2=y^2$.

Weierstrass Preperation theorem (Bourbaki's Commutative Algebra, VII.3.8 prop 6): Let $A$ be a complete local ring. If $f=\sum_{n=0}^\infty a_nt^n \in A[[t]]$ so that not all $a_i$ are in the maximal ideal of $A$, there is a unique unit $u\in A[[t]]$ and a unique polynomial $F$ of the form $F=t^s+b_{s-1}t^{s-1}+\cdots+b_0$ with $b_i\in\mathfrak{m}$ so that $f=uF$.

We apply this with $A=k[[x]]$ and $y$ in the role of $t$. The conclusion of the theorem gives us that $f=u \cdot(y^2+y\cdot v(x)+ w(x))$. Next, as $\operatorname{char} k\neq 2$, we may substitute $y=y-\frac{1}{2}v(x)$, which takes $y^2+y\cdot v(x)+w(x)$ to $y^2-w'(x)$. By the assumption that $P$ is a double point, $w'(x)$ has valuation at least two. As $k$ is algebraically closed, we may scale $x$ so that $w'(x)=x^n(1+U(x))$ where $U(x)$ has no constant term. Then we may then use the fact that $\sqrt{1+x}=\sum_{i=0}^\infty \binom{1/2}{i}x^i$ is defined for any field of characteristic not two in order to construct the automorphism $y\mapsto y\cdot\sqrt{1+U(x)}$ and see that $k[[x,y]]/(y^2-w'(x))\cong k[[x,y]]/(y^2-x^n)$ for $n>2$. (Thanks to kindasorta for pointing out the step involving $\sqrt{1+x}$.) By the uniqueness of $u$ and $F$ from the theorem, the uniqueness of the substituiont $y=y-\frac12v(x)$, and the fact that all further transformations don't change the order of the power series in $x$, we see that $n$ is uniquely determined.
