# A Function and its Domain, Codomain and Image

## Homework Statement

Find a function where the domain is integers, codomain is real numbers, and image isn't equal to codomain.

## The Attempt at a Solution

I know that it means that when I plug in an integer I will obtain a real number, but how do I make it so that the image is not equal to the codomain? I don't quite understand what that means. Does it mean the function is injective?

Here is what I have so far for my first attempt:
f: ℤ→ℝ
f(x)=√x4+5

However if my x is 2 and -2 I get the same answer. So I am struggling with how to get an injective function.

However here is my second attempt:
f: ℤ→ℝ
f(x) = 1/(x3-3)

Is my second attempt correct?

Thank you.

Related Calculus and Beyond Homework Help News on Phys.org
Delta2
Homework Helper
Gold Member
You don't have to find a 1-1 (injective) function. All you need is that the function image should not be equal to the codomain which in this case is the set of real numbers. So its enough to show that there is a real number ##y## such that there is no ##x## such that ##f(x)=y##.

Both of your examples are correct. To see this take as real number ##y## the ##\pi##. There is no integer ##x## such that ##f(x)=\pi## for both cases of how the function f is defined.

You don't have to find a 1-1 (injective) function. All you need is that the function image should not be equal to the codomain which in this case is the set of real numbers. So its enough to show that there is a real number ##y## such that there is no ##x## such that ##f(x)=y##.

Both of your examples are correct. To see this take as real number ##y## the ##\pi##. There is no integer ##x## such that ##f(x)=\pi## for both cases of how the function f is defined.
Okay thank you very much, I understand.