RMS stands for "the Root of the Mean of the Square".
This means we must first square the function, then
calculate the mean, and finally calculate the square
root of that.
This is calculated like this:
Vrms=sqrt(1/T*integrate[0 to T]((f(t))^2) dt)
where
f(t) is the function and may be a simple value as in this problem
and that first gets squared as
Square=(f(t))^2
and then we calculate the mean with
Mean=1/T*integrate[0 to T](Square)dt
and then take the square root
Vrms=sqrt(Mean)
Because the specified wave has two parts, we have to divide the sections
up into two parts. The first part goes from 0 to 4 seconds, and the
second part goes from 4 to 8 seconds.
The first part has amplitude of 3, and the second part has amplitude of -1.
Since we have two parts, we use two integrals instead of one and make sure
we get the times correct:
Vrms=sqrt(1/8*(integrate[0 to 4](3^2)dt+integrate[4 to 8]((-1)^2)dt))
and first to simplify the constants a little we end up with:
Vrms=sqrt(1/8*(integrate[0 to 4](9)dt+integrate[4 to 8](1)dt))
Since the integral of a constant K is K*t+C, we replace the constants with
those values and run the dependent variable t between the two limits of
integration for each part:
Vrms=sqrt(1/8*((9*t+C1)from[0 to 4] + (1*t+C2)from[4 to 8]))
and now all that is left to do is the calculations as shown:
Vrms=sqrt(1/8*(((9*4+C1)-(9*0+C1)) + (1*8+C2)-(1*4+C2)))
and since the constants C1 and C2 cancel out we are left with:
Vrms=sqrt(1/8*(((9*4)-(9*0)) + (1*8)-(1*4)))
now doing some simple math and noting
(1*8)-(1*4)=(1*4)
we get:
Vrms=sqrt(1/8*((9*4)+(1*4)))
and note this is now in the same form as the linked picture has shown,
and the final answer is the same:
Vrms=sqrt(1/8*(40))=sqrt(40/8)=sqrt(5)=2.2360 approximately.
Some problems require splitting the integral up into even more parts than two.
It all depends on how well you can describe the function or functions for
the wave. If you cant do it all in one shot, split the integral.