Change of variables for functions with invariant integral #106
                  
                    
                      cmichelenstrofer
                    
                  
                
                  started this conversation in
                Theory
              
            Replies: 2 comments
-
| The required scaling is pretty obvious for the cases where it is only a change of units. E.g. for S(f) with f in rad/s to Hz if you consider the units of both the frequency and the spectrum and the fact that the units of frequency times the unit of the spectrum need to give you units of elevation variance (m^2) in the case of the elevation variance spectrum. Similar to the spread function where the product of units needs to be non-dimensional. The conversion between f and T is not as trivial. | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            -
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Some functions are defined by properties of their integral, and their integral over a differential area must be invariant over a change of variables. That is, a function is defined such that
 is defined such that  dx = C) , and the integral over the same area (a-b) needs to be the same constant C even after change of variables. These functions include:
, and the integral over the same area (a-b) needs to be the same constant C even after change of variables. These functions include:
If we have a function f such that its integral over a range is a constant C:
dx=C)
)
dx)
dx=C=\int_{g(x_0)}^{g(x_f)}f\left(g^{-1}(y)\right)\frac{1}{g^\prime(y)}dy)
and we want to change the variables from x to y, where x and y are related by the invertible function g as
and
The change of variables is
Example: Spread function radians to degrees.) and want it in terms of angle in degrees
 and want it in terms of angle in degrees ) the function g is
 the function g is =\frac{180}{\pi}\theta_r) and
 and =\frac{180}{\pi}) . This gives
. This gives
If we have the spread function as a function of angle in radians
The opposite situation is
 = \frac{180}{\pi}D_d(f, \frac{180}{\pi}\theta_r))
Example: Elevation variance spectrum radians to Hz.
By similar arguments the result is
The opposite situation is
 = \frac{1}{2\pi}S_f(\frac{1}{2\pi}\omega))
These also apply to the energy spectrum, simply carry the factor (for gravity waves).
 (for gravity waves).
Example: Elevation variance spectrum frequency to period.
In this case the function g is not a linear function, but applying the same methodology for period T in seconds and frequency f in Hz we get
The opposite situation is
 = \frac{-1}{f^2}S_T(\frac{1}{f}))
The negative sign is due to the order of the integration bounds being reversed. We could make a definition decision here so that) is positive.
 is positive.
TLDR;
For functions whose integral must be invariant over change of variables it is not sufficient to convert the input of the function. For instance when converting a plot of (w, S(w)) to (f, S(f)), it is not only the x-axis that needs to be scaled, the y-axis will have have a scaling too. Similar for changing the spread function between inputs in radians and degrees. The case for converting the spectrum from frequency input to period input is a bit more complicated, see above.
Beta Was this translation helpful? Give feedback.
All reactions