Nonsingular projective variety of degree $d$ 
For each $d>0$ and $p=0$ or $p$ prime find a nonsingular curve in $\mathbb{P}^{2}$ of degree $d$. 

I'm very close just stuck on one small case. If $p\nmid d$ then $x^{d}+y^{d}+z^{d}$ works. If $p\mid d$ then I have chosen the curve $zx^{d-1}+xy^{d-1}+yz^{d-1}$. After some work using the Jacobian criterion for nonsingularity I arrive at $3z=0$. As long as $p\neq 3$ this curve is nonsingular. But I haven't been able to deal with the $p=3$ case. Any ideas? Thanks in advance.   
 A: If $\operatorname{char}(k)=3$ and $d$ is divisible by $3$, then the curve
$$
C=V(X^d+ZX^{d-1}+XY^{d-1}+YZ^{d-1}) \subset \Bbb P^2_{k}
$$
is non-singular of degree $d$.
Indeed, if $[x:y:z] \in C$ is a singular point, then, by considering the partial derivatives of the equation defining $C$, we obtain $zx^{d-2}=y^{d-1}$, $xy^{d-2}=z^{d-1}$ and $yz^{d-2}=x^{d-1}$. Multiplying these equalities by $x,y,z$ respectively, we obtain
$$
zx^{d-1}=xy^{d-1}=yz^{d-1}
$$
and substituting this into the above equation yields
$$
0=x^d+zx^{d-1}+xy^{d-1}+yz^{d-1}=x^d+3zx^{d-1}=x^d
$$
as we are in characteristic $3$. Hence $x=0$, but then by the above equalities, $y,z$ have to be equal to zero as well, which is impossible. Therefore, $C$ is non-singular.
Edit:
At Fredrik's request, I add how I came up with that example. I hope that my explanation is at least somewhat helpful, as I am not sure about that.
I started by looking at the curve suggested by the OP, and reassured myself that it is indeed singular in characteristic $3$ (for example $[1:1:1]$ is a singular point). The reason is that, roughly speaking, in the equation of the curve, you have $3$ summands, so in characteristic $3$ you cannot conclude that for a singular point $[x:y:z] \in C$, you necessarily have $x=0$ (this would imply $y=z=0$, and we were done).
I tried fixing this by considering something like $2XZ^{d-1}+2XY^{d-1}+YZ^{d-1}$ ("so that it doesn't add up to $3$"), but that didn't work, the introduction of the $2$'s in the equation changes the partial derivatives as well, and we have the same problem in the end.
After playing around a little bit, I wrote down the equation (I forgot why)
$$
X^d+ZX^{d-1}+XY^{d-1}+YZ^{d-1}
$$
and realized quickly that this has to work, because now the partial derivatives are the same as the ones of the curve we started with (thanks to the condition that $3 \vert d$), but this curve has $4$ summands, instead of $3$, so that the problem with the curve of the OP would disappear.
