Source: https://www.colorado.edu/amath/sites/default/files/attached-files/wk04_functions.pdf