Function Repository Resource:

FunctionRootMeanSquare

Source Notebook

Compute the root mean square of a function

Contributed by: Wolfram|Alpha Math Team

ResourceFunction["FunctionRootMeanSquare"][expr,{var,a,b}]

finds the root mean square of expr in terms of var over the interval from a to b.

ResourceFunction["FunctionRootMeanSquare"][f,var]

finds the root mean square of a periodic function f in terms of var.

Details

The root mean square is the square root of the mean square, which is a special case of the generalized power mean. For a continuous function, the root mean square of a periodic function is the square root of the average value integral of over the the period. The root mean square (RootMeanSquare) also applies to lists of discrete values.

Examples

Basic Examples (3) 

Compute the root mean square of cos(x) from 0 to 2π:

In[1]:=
ResourceFunction["FunctionRootMeanSquare"][Cos[x], {x, 0, 2 Pi}]
Out[1]=

Compute the root mean square for sin(x) over the function period:

In[2]:=
ResourceFunction["FunctionRootMeanSquare"][Sin[x], x]
Out[2]=

Compute the root mean square for 3sin(t)-2cos(2t):

In[3]:=
ResourceFunction["FunctionRootMeanSquare"][3 Sin[t] - 2 Cos[2 t], t]
Out[3]=

Publisher

Wolfram|Alpha Math Team

Version History

  • 2.0.0 – 23 March 2023
  • 1.0.0 – 11 January 2022

Related Resources

Author Notes

To view the full source code for FunctionRootMeanSquare, evaluate the following:

In[1]:=
SystemOpen[
 FileNameJoin[{DirectoryName[FindFile["ResourceFunctionHelpers`"]], "RootMeanSquareL2.wl"}]]

License Information