> restart;

 > with(codegen,fortran):

Our initial equations:

 > eq1 := r*u1p + r*v1p = -w2/(1.0-w3*r^2) - 2.0*w1;

 > eq2 := -2.0*r*u1p + r*v1p = -2.0*w1 - w2 + r^2*(3.0*w1^2-r^2*w1^3 - 2.0*w2^3/(1.0-w3*r^2)^2);

 >

Deriving Equation 1:

 > eq1a:= simplify(eq1 - eq2);

 > eq1b := subs(w1=u1+v1, w2=-2.0*u1+v1, w3=2.0*v2+2.0*(2.0*u1^2-v1^2), eq1a);

 > eq1c := eq1b/3.0/r;

 > expand(eq1c,r):

Thus, we arrive at Equation 1 (for reference from the comments in our Fortran code):

 > fortran(rhs(eq1c));

`      t0 = 0.3333333333D0*r*(-1.D0*(-0.2D1*u1+v1)*(0.2D1*v2+0.4D1*u1**2-`

`     #0.2D1*v1**2)+(-0.2D1*u1+v1)*(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)**2*`

`     #r**2-3.D0*(u1+v1)**2+6.D0*(u1+v1)**2*(0.2D1*v2+0.4D1*u1**2-0.2D1*v`

`     #1**2)*r**2-3.D0*(u1+v1)**2*(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)**2*r`

`     #**4+r**2*(u1+v1)**3-2.D0*r**4*(u1+v1)**3*(0.2D1*v2+0.4D1*u1**2-0.2`

`     #D1*v1**2)+r**6*(u1+v1)**3*(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)**2+2.`

`     #D0*(-0.2D1*u1+v1)**3)/(-1.D0+(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)*r*`

`     #*2)**2`

Now to derive Equation 2:

 > eq2a := simplify(2.0*eq1+eq2);

 > eq2b := subs(w1=u1+v1, w2=-2.0*u1+v1, w3=2.0*v2+2.0*(2.0*u1^2-v1^2), eq2a);

 > eq2c := eq2b/3.0/r;

 > expand(eq2c,r):

Ergo, here's Equation 2:

 > fortran(rhs(eq2c));

`      t0 = -0.3333333333D0/r*(9.D0*v1-4.D0*(-0.2D1*u1+v1)*(0.2D1*v2+0.4D`

`     #1*u1**2-0.2D1*v1**2)*r**2-12.D0*(u1+v1)*(0.2D1*v2+0.4D1*u1**2-0.2D`

`     #1*v1**2)*r**2+6.D0*(u1+v1)*(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)**2*r`

`     #**4+(-0.2D1*u1+v1)*(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)**2*r**4-3.D0`

`     #*r**2*(u1+v1)**2+6.D0*r**4*(u1+v1)**2*(0.2D1*v2+0.4D1*u1**2-0.2D1*`

`     #v1**2)-3.D0*r**6*(u1+v1)**2*(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)**2+`

`     #r**4*(u1+v1)**3-2.D0*r**6*(u1+v1)**3*(0.2D1*v2+0.4D1*u1**2-0.2D1*v`

`     #1**2)+r**8*(u1+v1)**3*(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)**2+2.D0*r`

`     #**2*(-0.2D1*u1+v1)**3)/(-1.D0+(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)*r`

`     #**2)**2`

Define v1p for use in rw3p equation below:

 > v1p := -.3333333333/r*(9.*v1-4.*(-2.0*u1+v1)*(2.0*v2+4.00*u1^2-2.0*v1^2)*r^2-12.*(u1+v1)*(2.0*v2+4.00*u1^2-2.0*v1^2)*r^2+6.*(u1+v1)*(2.0*v2+4.00*u1^2-2.0*v1^2)^2*r^4+(-2.0*u1+v1)*(2.0*v2+4.00*u1^2-2.0*v1^2)^2*r^4-3.*r^2*(u1+v1)^2+6.*r^4*(u1+v1)^2*(2.0*v2+4.00*u1^2-2.0*v1^2)-3.*r^6*(u1+v1)^2*(2.0*v2+4.00*u1^2-2.0*v1^2)^2+r^4*(u1+v1)^3-2.*r^6*(u1+v1)^3*(2.0*v2+4.00*u1^2-2.0*v1^2)+r^8*(u1+v1)^3*(2.0*v2+4.00*u1^2-2.0*v1^2)^2+2.*r^2*(-2.0*u1+v1)^3)/(-1.+(2.0*v2+4.00*u1^2-2.0*v1^2)*r^2)^2;

 >

Define u1p for use in rw3p equation below:

 > u1p := .3333333333*r*(-1.*(-2.0*u1+v1)*(2.0*v2+4.00*u1^2-2.0*v1^2)+(-2.0*u1+v1)*(2.0*v2+4.00*u1^2-2.0*v1^2)^2*r^2-3.*(u1+v1)^2+6.*(u1+v1)^2*(2.0*v2+4.00*u1^2-2.0*v1^2)*r^2-3.*(u1+v1)^2*(2.0*v2+4.00*u1^2-2.0*v1^2)^2*r^4+r^2*(u1+v1)^3-2.*r^4*(u1+v1)^3*(2.0*v2+4.00*u1^2-2.0*v1^2)+r^6*(u1+v1)^3*(2.0*v2+4.00*u1^2-2.0*v1^2)^2+2.*(-2.0*u1+v1)^3)/(-1.+(2.0*v2+4.00*u1^2-2.0*v1^2)*r^2)^2;

 >

Deriving our final equation:

 > rw3pa := -3.0*w3+2.0*w2^2/(1.0-w3*r^2) + 4.0*w1^2-4.0*r^2*w1^3 + r^4*w1^4;

 > rw3pb := subs(w1=u1+v1, w2=-2.0*u1+v1, w3=2.0*v2+2.0*(2.0*u1^2-v1^2), rw3pa);

 > v2p := 0.5*rw3pb/r-4.0*u1*u1p + 2.0*v1*v1p;

 > expand(v2p,r):

Concordantly, we arrive at Equation 3:

 > fortran(v2p);

`      s1 = 0.5D0*(-0.6D1*v2-0.12D2*u1**2+0.6D1*v1**2+0.2D1*(-0.2D1*u1+v1`

`     #)**2/(0.1D1-(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)*r**2)+0.4D1*(u1+v1)`

`     #**2-0.4D1*r**2*(u1+v1)**3+r**4*(u1+v1)**4)/r`

`      s3 = -0.1333333333D1*u1*r*(-1.D0*(-0.2D1*u1+v1)*(0.2D1*v2+0.4D1*u1`

`     #**2-0.2D1*v1**2)+(-0.2D1*u1+v1)*(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)`

`     #**2*r**2-3.D0*(u1+v1)**2+6.D0*(u1+v1)**2*(0.2D1*v2+0.4D1*u1**2-0.2`

`     #D1*v1**2)*r**2-3.D0*(u1+v1)**2*(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)*`

`     #*2*r**4+r**2*(u1+v1)**3-2.D0*r**4*(u1+v1)**3*(0.2D1*v2+0.4D1*u1**2`

`     #-0.2D1*v1**2)+r**6*(u1+v1)**3*(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)**`

`     #2+2.D0*(-0.2D1*u1+v1)**3)/(-1.D0+(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2`

`     #)*r**2)**2`

`      s4 = -0.6666666666D0*v1/r*(9.D0*v1-4.D0*(-0.2D1*u1+v1)*(0.2D1*v2+0`

`     #.4D1*u1**2-0.2D1*v1**2)*r**2-12.D0*(u1+v1)*(0.2D1*v2+0.4D1*u1**2-0`

`     #.2D1*v1**2)*r**2+6.D0*(u1+v1)*(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)**`

`     #2*r**4+(-0.2D1*u1+v1)*(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)**2*r**4-3`

`     #.D0*r**2*(u1+v1)**2+6.D0*r**4*(u1+v1)**2*(0.2D1*v2+0.4D1*u1**2-0.2`

`     #D1*v1**2)-3.D0*r**6*(u1+v1)**2*(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)*`

`     #*2+r**4*(u1+v1)**3-2.D0*r**6*(u1+v1)**3*(0.2D1*v2+0.4D1*u1**2-0.2D`

`     #1*v1**2)+r**8*(u1+v1)**3*(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2)**2+2.D`

`     #0*r**2*(-0.2D1*u1+v1)**3)/(-1.D0+(0.2D1*v2+0.4D1*u1**2-0.2D1*v1**2`

`     #)*r**2)**2`

`      s2 = s3+s4`

`      t0 = s1+s2`

 > ?fortran

 >