i have a question with this ideal op-amp integrator circuit
where R=1k and C=1uF. Then i put a 50mV 100Hz square wave at the input and get the following response, which is what i expected and calculated beforehand.
(I'm aware that this is not a real practical integrator and this question has been taken account before making this post.)
The thing is, that you can see some sort of "DC offset" which I'm being questioned on why is it there. My explanation would be that when i have an input pulse, the op amp would have to drain (or supply) current through the capacitor and resistor in order to achieve the voltage across the resistor and sustain the virtual ground. This current is constant, hence charge in the capacitor grows linearly and so does voltage. Assuming the capacitor is initially discharged, the first pulse charges it to a value A and the contrary pulse discharges it to zero. A and then zero, A and then zero and so on in a triangular symmetrical way, so the average voltage is A/2. Of course the output voltage is the capacitor voltage because of the virtual ground.
At every cycle the voltage starts/ends at zero since the integral of every whole cycle of this signal is zero, that makes sense too.
I don't know why this "DC offset" wouldn't be there as it makes sense, but still my answer is not taken as valid. Is there some transient response I'm not seeing? Would the signal start at t=-infinity change anything?