Hello
Colleague Filip calculated well ... but the average value of the voltage.
From the definition of the rms value, this voltage (a rectangle with a duty cycle of 50%) must give off the same amount of heat as a DC voltage in the same period (I messed up a bit, but I'll give you a picture below that will explain everything). So P=U*I, I=U/R that gives P=U^2/R, and the heat generated is energy, so we multiply the power by time, which in our case is 2 seconds. It was for direct current.
Now we calculate for a rectangle with a filling of 50%, i.e. for one second we can assume the waveform as a constant voltage of 2 V.
The thermal energy generated in both cases must be equal, so (U^2/R)*2seconds = (u^2/R)*1second (the second second is zero, so we don't take it into account). Now simple mathematical relations and we get the formula U=u/2^0.5, which means that the rms value of a square wave with a duty cycle of 50% and an amplitude of 2 V is 1.41 V.
or
U=((1/T)*integral from 0 to T zu^2 after dt)^0.5 (for more advanced).
We associate the average value of the current with the amount of flowing charge, i.e. with the surface area in a given period.
We associate the effective value with the heat generated in a given period.
Goodbye (it's nice to go back to school)