Domains and ranges of trigonometric functions