How to derive the curve Ed25519 from Curve25519? According to the paper "Faster addition and doubling on elliptic curves" by Bernstein and Lange, the Montgomery curve (Curve25519) $$v^{2}=u^{3}+486662\cdot u^{2}+u$$ is birationally equivalent to the Edwards curve (Ed25519)
$$x^{2}+y^{2}=1+(121665/121666)\cdot x^{2}y^{2}.$$The paper says that the transformation is easy and can be done with$$v=\sqrt{486662}\cdot u/x$$
$$u=(1+y)/(1-y).$$
However, when I try to do this transformation I do not obtain the Edwards curve, but I get
$$(2+d)x^{2}+dy^{2}=d+(d-2)x^{2}y^{2}$$ with $d=486662$. 

So I wonder how, starting from Curve25519, I can get to $e=121665/121666$ and 
$$x^{2}+y^{2}=1+e\cdot x^{2}y^{2}?$$ Thanks!



The detailed transformation:
First off, your equation is correct and there seems to be no calculation mistake.

To understand on how to get from 
$$(2+d)x^{2}+dy^{2}=d+(d-2)x^{2}y^{2}$$
 to 
$$x^{2}+y^{2}=1+e\cdot x^{2}y^{2}$$
one first needs to observe that $e=(d-2)/(d+2)=121665/121666$ holds. 

The next step is to consider:
"What operations are actually allowed with birational equivalence?". According to this presentation on a similar topic, linear transformations in the coordinates don't break the birational equivalence as do simple equivalence transformations (the ones having takens us here).

So the substitution $x^2:=x^2\cdot d/(d+2)$ is allowed. If you now perform the substitution, you'll observe 
$$dx^{2}+dy^{2}=d+d(d-2)/(d+2)x^{2}y^{2}$$
and dividing by $d$ yields the desired equation.