# Prove that the function $f: N \rightarrow N$, defined by $f(x)=x^{2}+x+1$, is one-one but not onto.

Question.
Prove that the function $f: N \rightarrow N$, defined by $f(x)=x^{2}+x+1$, is one-one but not onto.

Solution:
$f: N \rightarrow N$, defined by $f(x)=x^{2}+x+1$

Injectivity:
Let x and y be any two elements in the domain (N), such that f(x) = f(y).
$\Rightarrow x^{2}+x+1=y^{2}+y+1$
$\Rightarrow\left(x^{2}-y^{2}\right)+(x-y)=0$
$\Rightarrow(x+y)(x-y)+(x-y)=0$
$\Rightarrow(x-y)(x+y+1)=0$
$\Rightarrow x-y=0 \quad[(\mathrm{x}+\mathrm{y}+1)$ cannot be zero because $x$ and $y$ are natural numbers $]$
$\Rightarrow x=y$

So, f is one-one.

Surjectivity:
The minimum number in $N$ is $1 .$
When $x=1$,
$x^{2}+x+1=1+1+1=3$
$\Rightarrow x^{2}+x+1 \geq 3$, for every $x$ in $N$.
$\Rightarrow f(x)$ will not assume the values 1 and 2 .
So, $f$ is not onto.