Solution (source code)

= Solution

Any direct-current component of the input produces an output ramp. The <input offset voltage> and <input bias currents> of a real <operational amplifier> therefore charge the feedback <capacitor> until the output saturates. Even the desired signal can exceed the available output swing when integrated for too long. Initial <capacitor> charge also introduces an unknown integration constant.

Place a large <resistor> $R_f$ in parallel with the feedback <capacitor>. The idealized <transfer function> then becomes
$$
\boxed{H(s)=-\frac{R_f/R}{1+sR_fC}.}
$$
Its finite direct-current gain $-R_f/R$ supplies a return path and bounds the response to a small offset; it approximates $-1/(sRC)$ when $\omega R_fC\gg1$. The chosen gain must still keep offsets within the output range. A reset switch across the <capacitor> can set the initial charge, while low-offset amplifiers, bias compensation and input offset adjustment reduce drift. Useful integration also requires frequencies below the amplifier's own response limit.