Is Sin(x) a 1:1 Function and What Defines a Function?

  • Thread starter Chadlee88
  • Start date
  • Tags
    Functions
In summary, a function is considered injective if for every input there is only one corresponding output. However, sine x is not an injective function because there are multiple inputs that result in the same output.
  • #1
Chadlee88
41
0
Is the following correct.

1. f(x) is a function if for every x value there is exactly one y value. so sin x is a function.

2. does a 1-1 function mean that the line y = constant cut the graph in exactly one place? therefore sin (x) is not a 1:1 function but is still a function?

:redface:
 
Physics news on Phys.org
  • #2
Chadlee88 said:
Is the following correct.

1. f(x) is a function if for every x value there is exactly one y value. so sin x is a function.

2. does a 1-1 function mean that the line y = constant cut the graph in exactly one place? therefore sin (x) is not a 1:1 function but is still a function?

:redface:
Yes that is correct.

[tex] \\sin x[/tex] is a function that is a many to one function. That is there are multiple x values that give the same value as y or f(x). For example if you sub in [tex]x={\pi}/{2}[/tex] and [tex]x={5\pi}/{2}[/tex] into [tex]y= \\sin x[/tex] you get y=1 in both cases.

Thus you have a many to one function. There is also a many to many graph which obviously isn't a function due to the vertical line test.
 
Last edited:
  • #3
Number 2 is not correct. A function (from R to R) is injective if and only if the line y = constant cuts the graph in AT MOST one place.
 

FAQ: Is Sin(x) a 1:1 Function and What Defines a Function?

What is a function in programming?

A function in programming is a block of code that performs a specific task. It can take in inputs, called parameters, and return an output or perform an action.

What is the purpose of using functions in programming?

Functions allow for code reusability, making it easier to organize and maintain code. They also help in creating modular and scalable programs.

How do you define a function in programming?

A function is defined by using the keyword "function" followed by the function name, parameters (if any), and the code that performs the task within curly braces. It can also have a return statement to specify the output.

What is the difference between a function declaration and a function expression?

A function declaration is a statement that defines a function, while a function expression is an assignment of a function to a variable. The main difference is that function declarations are hoisted while function expressions are not.

Can functions in programming have multiple return statements?

Yes, functions can have multiple return statements. However, only one return statement will be executed and the function will exit after that. Any return statements after the first one will be ignored.

Similar threads

Replies
15
Views
1K
Replies
3
Views
1K
Replies
3
Views
1K
Replies
7
Views
1K
Replies
3
Views
997
Replies
14
Views
2K
Back
Top