What's the point of an RMS value? the RMS (root mean square) value of $f(x)$ is defined as:
$$f(x)_{rms}=\sqrt{\frac{\int^b_a (f(x))^2dx}{b-a}}$$
Why do we do this very specific thing of taking the square, the mean, and then the square root of the function? For an AC circuit, why does this tell us the power consumption and not something like the expression below?
$$\frac{\int^b_a|f(x)|dx}{b-a}$$
 A: By definition the rms,  also called the effective or heating value of AC, is the equivalent of DC with respect to resistance heating. The reason for taking the square is because both positive and negative values of current equally produce resistance  heating.
Hope this helps.
A: Consider the instantaneous current $i(t)$ through a resistance $R$. The instantaneous power dissipation is
$$P(t) = Ri^2(t).$$
The average power dissipation during a sufficiently long time $T$ after $t=0$ is
$$P_{avg}=\frac{1}{T}\int\limits_0^T{P(t)dt}=R\frac{1}{T}\int\limits_0^T{i^2(t)dt}=R\sqrt{\frac{1}{T}\int\limits_0^T{i^2(t)dt}}^2=Ri_{rms}^2.$$
This illustrates why RMS values are useful: you can use them to calculate the average power from e.g. the RMS voltage and current in the exact same way you would use the instantaneous values to calculate the instantaneous power (in AC you do need to take phase angles into account). Other ways of averaging quantities, like the mean absolute value as you propose, do not have this property.
A: it is the ac voltage source which is creating the trouble since the direction of voltage is reverse according to its time period so if we have a dc source then power dissipated through r will be $$P=i^2r$$, so here we have to replace this I with the average current because the net current is zero in the total time.
A: I think your definition of the mean value of $f(x)$ over an interval $ab$, $\frac{\int^b_a|f(x)|dx}{b-a}$, is just as valid as $f(x)_{rms}=\sqrt{\frac{\int^b_a (f(x))^2dx}{b-a}}$. The values of both definitions though are different and have different physical units. For an AC-circuit only the second definition gives the right value and unit for power consumption.
For the current $i(t)$ we can write:
$$i(t)_{rms}=\sqrt{\frac{\int_0^T (i(t))^2dt}{T}},$$
giving
$${i(t)_{rms}}^2={\frac{\int_0^T (i(t))^2dt}{T}}$$
Now $$P(t)=R{i(t)}^2,$$
so $$P(t)_{rms}=R({i(t)_{rms}})^2,$$
which means The RMS-value of $P(t)={P(t)}_{rms}$ is equal to $R$ times the the squared value of The RMS-value of $i(t)$ squared, which is equal to
$$P(t)_{rms}=\sqrt{\frac{\int_0^T (P(t))^2dt}{T}}$$
The RMS-value is most convenient for periodic functions.
