# Cylindrical/Spherical Capacitor derivation sign issues

In deriving the capacitance for a cylindrical and spherical capacitors, I keep obtaining the incorrect sign on V. I completely understand the problem besides one step.

$$ε_0φ = q_{enc}$$

$$ε_0\int{E • dA} = q_{enc}$$

if we were to draw a cylindrical gaussian surface concentric with the two cylinders, the angle between the vector of the area of the surface and the net electric field would be 0. Therefore, the dot product would be 1. Also, E would be constant on the surface due to symmetry, so E can be taken out of the integral leaving only dA. Integrating dA yields A:

$$ε_0EA = q_{enc}$$

$$ε_0E(2πrL) = q_{enc}$$ where r is the radius of the cylindrical surface and L is the length of the surface.

$$E = \frac{q_{enc}}{2πrLε_0}$$

Now we substitute this in for E into:

$$V = -\int_R^r{E • dS}$$

where R is the radius of the larger Cylinder and r is the radius of the smaller cylinder. We integrate by moving a positive test charge from the negative to positive cylinder (assuming the inner cylinder is positive); therefore, V should be positive.

$$V = -\int_R^r{\frac{q_{enc}}{2πrLε_0} • dS}$$

the dot product between the electric field and dS would be -1 if we consider the angle between the vectors to be 180.

$$V = \int_R^r{\frac{q_{enc}}{2πrLε_0} dS}$$

substitute in dr=dS

$$V = \int_R^r{\frac{q_{enc}}{2πrLε_0} dr}$$

$$V = \frac{q_{enc}}{2πLε_0} [ln|r| + C]_R^r$$

$$V = \frac{q_{enc}}{2πLε_0}ln(r/R)$$