The integrator is the basic building block for all of our analog computers.
The coolest thing about this circuit is that it does calculus!
The current through the resistor is:
\[i=\frac{v_{IN}}{R}\]
which is the same current that flows into the capacitor.
\[i=\frac{v_{IN}}{R}=C\frac{dv_C}{dt}\]
Notice that $v_C=-v_{OUT}$.
\[i=\frac{v_{IN}}{R}=-C\frac{dv_{OUT}}{dt}\]
Now we just have to get the expression into the final form.
\[\frac{-v_{IN}}{RC}dt=dv_{OUT}\]
\[\frac{-1}{RC}\int_{t_0}^t{v_{IN}dt}=\int_{v_0}^v{dv_{OUT}}\]
\[\frac{-1}{RC}\int_{t_0}^t{v_{IN}dt}+v_{0}=v_{OUT}\]