# Proving functions are injective or surjective

determine with proof whether the functions are injective or surjective:

1) $g: \mathbb{R} \rightarrow \mathbb{R}$ $g(x) = 3x^3 - 2x$

2)$g: \mathbb{Z} \rightarrow \mathbb{Z}$ $g(x) = 3x^3 - 2x$

for 1) using the definition set $f(x_1) = f(x_2)$ and we get $3x_1^3 - 2x_1 = 3x_2^3 - 2x_2$ and we can this does not imply x_1 is equal to x_2 as we take values e.g. x_1 = 0 and x_2 = rt2/3 and get $f(x_1) = f(x_2) = 0$ but x_1 is not x_2

for surjectivity I'm kind of stuck

we have to show $\forall y \in \mathbb{R} \exists x \in \mathbb{R}$ s.t. $f(x) = y$ but I don't know where to start

for the second one:

I done the same approach as the first but I'm not sure whether or not it's injective as I'm dealing with the integers

-
For surjectivity on the first one, as you say, you need to find an $x$ for any given $y$ such that $f(x)=y$. So set: $$y=3x^2-2x$$ If for any $y$ you can find an $x$ that makes that equation true, then the function is surjective. Can you do that? You may be able to use this to prove surjectivity in question (2). For injectivity in question (2) I'm not sure, have you tried just looking for counterexamples? –  Jack M Nov 8 '13 at 21:52
Note: the graph of the first is a parabola, which will have a maximum (or minimum) value. So... –  The Chaz 2.0 Nov 8 '13 at 21:59

1. $g(x)=3x^3−2x$ in $\mathbb R$ is continuous function. If it is injective, it must monotonous. But its derivative $9x^2-2$ is clearly not always positive (negative between $\pm\frac{\sqrt{2}}{3}$), so $g$ can't be injective. It's surjective because it's continuous and $\lim_{x\rightarrow-\infty}g(x)=-\infty$ and $\lim_{x\rightarrow\infty}g(x)=\infty$ (So by continuity, it takes all values between those limits).
2. $g(x)=3x^3−2x$ in $\mathbb Z$ : $g(n+1)-g(n)= 9n(n+1)+1>0$ for all integers $n$. So $g$ is increasing and injective.
But $g(1)=1$ and $g(2)=20$, so there is no integer such that $g(n)=7$ for example, because $g$ is increasing. So $g$ is not surjective.