why must \$"i"\$ of the current source in the figure be the \$"i_{rms}"\$,not \$i_m\$?
In the first set of equations, the RMS value of current is taken equal to the current levels shown in the graph.  This is correct because, during each 1 second period, the current is constant.  For a constant (DC) current the RMS value is equal to the constant value. This is because the RMS value of a current is defined to be the DC current that generates the same amount of heat in a resistor. In your equation, you divided the constant current value by the square root of 2 in an apparent attempt to calculate the RMS value. This is not correct for a constant current as explained above.  It is correct for a sine wave current if it is the peak value that is divided. This is why you did not get the correct answer.