Flat connection of a vector bundle over a 1 dim. manifold I'd like to show that a connection of a vector bundle $E$ over a 1 dim. manifold $M$ is flat, or equiv. that its curvature is zero. Let $D$ denote the connection, $\sigma$ a section of $E$ and $v,w$ vector fields on $M$. Since $M$ is $1$-dim., we have $v = fw$ for some $f \in C^{\infty}(M)$. I compute the curvature
\begin{align} R(v,w)\sigma =& D_v D_w \sigma - D_w D_v \sigma - D_{[v,w]} \sigma \\
=& fD_wD_w \sigma - D_wfD_w \sigma - D_{[fw,w]}\sigma \\
=&(wf) \sigma - D_{[fw,w]} \sigma
\end{align} 
where I used linearity and the product rule. I don't see how to reduce this to $0$.
 A: First, it's not quite true that the fact that the bundle is one-dimensional forces $v = fw$, since $w$ could be zero at some point. (One can assume $w$ is never zero by doing the calculation locally, but you should be careful about this.)
Second, it appears that you've made a small mistake applying the Leibniz rule for connections when moving from the second line to the third line. We have
$$
   D_w f D_w \sigma = f D_w D_w \sigma + w(f) D_w \sigma, 
$$
which means the expression in your third line should read
$$
   (wf) D_w \sigma - D_{[fw, w]} \sigma. \tag{$*$}
$$
Finally, the step you seem to be missing involves the following rule for Lie brackets: If $X, Y$ are tangent vector fields and $f \in \mathscr{C}^{\infty}(M)$ then
$$
  [fX, Y] = fXY - Y(fX) = Y(f)X - f[X,Y],
$$
which can be seen by applying the left side to a function $g \in \mathscr{C}^\infty(M)$ and using the Leibniz rule $X(fg) = fX(g) + X(f)g$. Then
$$
   D_{[fw, w]} \sigma = D_{w(f)w - f[w,w]} \sigma = D_{w(f)w} \sigma = (wf) D_w \sigma,
$$
so that $(*)$ reduces to $0$. 
I'll remark that the above actually proves the symmetry $R(v,v)\sigma = 0$ for connections on any vector bundle over any manifold $M$; it's just the fact that we can write $v = fw$ that is special to $\dim(M) = 1$.
