Integrator
Hello,
Maybe you saw the output drifting (depending on the total time of simulation).
To avoid too much drift, you can use the feedback as suggested by LvW. Play with the value of the resistor. A lower value will give more departure from straight slopes, but less DC offset at the output.
By adding the resistor, in fact you make a low pass filter, but with a corner frequency far below the frequency of your signal. The DC gain will be
DC gain = -(resistor parallel to C1)/R1
You may add a resistor (R = R1) in the + input to give some reduction in offset due to input bias current. Of course you can also take a better opamp with less input current, less input offset current and less offset voltage.