Let the function f:R→R be defined by f(x)=cos x,∀x∈R. Show that f is neither one-one nor onto.
Given function, f(x)=cos x,∀x∈R
Now, f(π2)=cos π2=0
f(−π2)=cos(−π2)=0⇒f(π2)=f(−π2)
So, f(x) is not one-one.
Now, from the definition of f(x), the codomain of f is R. However, the range of f=[−1,1]. Since the range of f is a proper subset of its codomain, f is not onto.