If I feed a square wave into a first order, passive, low-pass filter (resistor and capacitor), I get the following results on an oscilloscope (sorry, I don't know how to scale and rotate images):
Why does the overshoot only occur on half of the corners of the square wave? Based on Fourier analysis, partial sums of a square wave should look something like this:
This is the Gibbs phenomenon. Here the overshoot occurs on all 'corners' of the square wave, rather than just the ones following a transition. I got some similar results when testing the frequency response of a unity gain buffer op amp:
Hypothetically, the op amp acts as a low-pass filter due to its finite bandwidth, so it's not surprising that it produces similar results to the actual low-pass filter above.
My question is: based on electrical theory, low-pass filtering should produce a square wave with attenuated higher harmonics, which should produce something similar to the Gibbs phenomenon with overshoot at each of the corners. Why doesn't this happen here? For me, it makes MATHEMATICAL sense that the output wave should have overshoot at each corner, but it makes INTUITIVE sense that the output should only have overshoot at the corners that occur after a transition. Why? Because if the 'ringing' (overshoot/undershoot) also occurred BEFORE a transition, it would seem non-causal - it would almost be as if the wave is guessing that it's about to transition!
How can I reconcile my understanding from the perspective of Fourier theory with what actually happens in real life?