Determining Signs when Deriving Voltage In my intro E&M class, we were given an example problem to determine the voltage within a cylindrical capacitor as a function of radius. A diagram of such a cylindrical capacitor is below.

The solution from my instructor is as follows.

Let the outer, negatively-charged surface be denoted by “b” and the inner, positively-charged surface be denoted by "a”. So, we have
$$\begin{align}\Delta V & = V_a - V_b\\&= -\int_{r_b}^{r_a} \vec{E}\cdot\text{d}\vec{s}\\ &= -\int_{r_b}^{r_a}E\cos\theta\text{ d}s\end{align}$$
Now we note that $\cos\theta = -1$ in this case and then make the substitution $\text{d}s = - \text{d}r$.
$$\begin{align}\Delta V &= -\int_{r_b}^{r_a} E\cos\theta\text{ d}s\\&= \int_{r_b}^{r_a} E\text{ d}s\\&= -\int_{r_b}^{r_a} E\text{ d}r\end{align}$$


When we actually substitute in the expression for the electric field as a function of $r$, we get the correct answer. However, my concern with this solution is in the nature of the order of substitution.
When I approached this problem, instead of first making a substitution for $\cos\theta$, I first made the substitution $\text{d}\vec{s} = -\text{d}\vec{r}$. To me, this vector substitution made more sense than the scalar substitution of differentials since this would be more indicative of the opposite direction between the "direction of integration" and the radial vector.
So, using this approach, we get
$$\begin{align}\Delta V & = V_a - V_b\\&= -\int_{r_b}^{r_a} \vec{E}\cdot\text{d}\vec{s}\\ &= \int_{r_b}^{r_a}\vec{E}\cdot\text{d}\vec{r}\\&= \int_{r_b}^{r_a} E\cos\theta\text{ d}r\end{align}$$
Now, since the differential radial vector and the electric field are parallel, $\cos\theta = 1$, so we get
$$\begin{align}\Delta V &= \int_{r_b}^{r_a} E\cos\theta\text{ d}r\\&= \int_{r_b}^{r_a} E\text{ d}r\end{align}$$
This is the negative of my instructor's solution, which obviously leads to the wrong solution. Where do I go wrong? Why can I not simply reverse the order in which my teacher makes substitutions?
 A: In your method you have the integral $\displaystyle \int_{r_b}^{r_a}\vec{E}\cdot\text{d}\vec{r}$ which you then put equal to $\displaystyle \int_{r_b}^{r_a} E\cos\theta\text{ d}r$.  
Now what is the value of $\cos \theta$?  
The electric field, $\vec E$, is in the direction from $a$ to $b$ and the integration limits, ie the direction of $d\vec r$, are from $b$ to $a$.
Since the two vectors are in opposite directions then $\cos \theta = -1$.  

I fail to see as to why the derivation has been made so complicated by introducing the vector $d\vec s$.  
In this example the electric field is $\vec E = E \,\hat r$ where $E$ is the magnitude of the electric field in the $\hat r$ direction and $d\vec s$ is equal to $d\vec r = dr \,\hat r$ where $dr$ is the component of the vector $d\vec r$ in the $\hat r$ direction.
The sign of $dr$ is automatically determined during integration by the limits of integration.  
So you write down in one line $\displaystyle \Delta V = V_a - V_b= - \int_{r_b}^{r_a}\vec{E}\cdot\text{d}\vec{r}= - \int_{r_b}^{r_a}E\,\hat r\cdot dr\,\hat r=- \int_{r_b}^{r_a}E\,dr$ 
In the more general case if the direction of the electric field of magnitude $E$ is at an angle of $\theta$ to the $\hat r$ direction then one could write $\vec E = E\cos \theta\, \hat r$ where $E\,\cos \theta$ is the component of the electric field in the $\hat r$ direction.  
In your example if the positive and negative charges had been switched then $\vec E = -E \,\hat r$ because $\theta = 180^\circ \Rightarrow \cos \theta = -1$ and you would be evaluating the integral $\displaystyle - \int_{r_b}^{r_a}-E\,\hat r\cdot dr\,\hat r= \int_{r_b}^{r_a}E\,dr$ 
