First, we need to know the definition of a function.
Definition: “Let A and B be nonempty sets. A function f from A to B is an assignment of exactly one element of B to each element of A. We write f(a) = b if b is the unique element of B assigned by the function f to the element a of A. If f is a function from A to B, we write f: A → B.” Discrete mathematics and its applications By Rosen.
Now we can solve the exercise.
a) f(n)=±n
f(2)=2, f(2)=-2
From the definition of function “…. A function f from A to B is an assignment of exactly one element of B to each element of A…”.
Therefore, it is not a function.
b)f(n)= √(n2+1)
It is a function because is defined for each element of the domain. Notice that n2+1>0 for all n∈Z and the square root is defined on R for any positive integer.
c) f(n) = 1/(n2 − 4)
From the definition of function “…. A function f from A to B is an assignment of exactly one element of B to each element of A…”.
This function is not defined for n=2.
Therefore, it is not a function because is not defined for each element of the domain.
Related exercises: