Solution (source code)

= Solution

Let $v$ be the inverting-input potential. The non-inverting input is grounded, so the <ideal operational amplifier> rules give $v=0$ and no input current. <Kirchhoff's current law> at that node therefore gives
$$
\frac{V_{\mathrm{in}}-v}{R}=C\frac{d(v-V_{\mathrm{out}})}{dt}=-C\frac{dV_{\mathrm{out}}}{dt}.
$$
Integrating from an initial time $t_0$,
$$
\boxed{V_{\mathrm{out}}(t)=V_{\mathrm{out}}(t_0)-\frac1{RC}\int_{t_0}^tV_{\mathrm{in}}(u)\,du.}
$$
This <op amp integrator> performs inverted time integration; the initial <voltage> across the <capacitor> supplies the integration constant. For zero initial conditions its <transfer function> is $H(s)=-1/(sRC)$. In sinusoidal steady state, with the convention $e^{i\omega t}$,
$$
\boxed{H(i\omega)=-\frac1{i\omega RC}=\frac{i}{\omega RC},\qquad |H|=\frac1{\omega RC},\qquad \arg H=+90^\circ.}
$$
For example, a cosine input produces a negative sine output after its constant component is set. The additional inversion makes the phase $+90^\circ$ modulo $360^\circ$, rather than the $-90^\circ$ of non-inverting integration.