I've been tasked with drawing the input and output waveforms, indicating the voltage levels, of an integrator with a given frequency of 20kHz and an initial voltage of zero.

For wave frequency, frequency = 1/Period, thus my period per wave (T) is 50 micro seconds. (Not 100% sure if I am applying this correctly to the equation).

My Resistor is 10K OHMS, my Capacitor is 0.01 micro Farads.

Again, initial voltage=0.

Voltage in (square wave) is plus/minus 4 v.

I've attached my attempt to answer the question, as well as my work.

A questions is, when I am calculating for Vout, I don't seem to reach the (expected) value of 2 v, either positive or negative. Am I supposed to reach a 2v output? My output is consistently either zero or negative 1. For this question, is this correct?

Where am I going wrong - OR, is this the correct answer?

Thank you.