For a complex waveform as follows:
One can find the squared rms of the complete waveform by finding rms of individual components and then square multiplying it with the corresponding duty cycle. $$s_n = \frac{1}{T} \int_0^T u(t)^2 dt$$ $$u_{rms} = \sqrt{d_1 s_1 +d_2 s_2 + \cdots + d_n s_n}$$
EDIT1: For example finding the rms of following waveform,
$$ I_{rms} = \sqrt{d_1 I_1^2 + d_2 I_2^2}$$ Is the above method also applicable for sinusoidal wave or any other non-linear waveforms?
EDIT2: If I want to calculate the rms of a sine function defined from 54 degrees to 180 degrees with peak value of 27.44 I get 11.48 but the actual answer is 12.66.
$$ RMS = \sqrt{27.44^2 * 0.35 * 0.5} = 11.48 $$ here, duty cycle = 0.35