RC filter with an square wave input
You should get a crude saw-tooth shaped output. Only the rising edge from -A to A should go through this hi-pass filter. A real-world setup and an oscilloscope would show a cleaner image, including the negative going return spike.They would be visible on an oscilloscope, which can draw pulses or any wave shape with very fast rise and fall times, as the signal draws directly on the display without any software intervention. I do not know why it is not on your plot, unless it did not have time for the drawing engine to do them, which is using software to calculate how to draw the image. The other reason for missing parts of the waveform would be a calculation with an irrational or out-of range t value. Where is your t value for Vout?