# How to show x and y are equal?

I'm working on a proof to show that f: $\mathbb{R} \to \mathbb{R}$ for an $f$ defined as $f(x) = x^3 - 6x^2 + 12x - 7$ is injective. Here is the general outline of the proof as I have it right now:

Proof: For a function to be injective, whenever $x,y \in A$ and $x\neq y$, then $f(x) \neq f(y)$, i.e., where $A$, $B$ are finite sets, every two elements of $A$ must have distinct images in $B$, which also implies that there must be at least as many elements in $B$ as in $A$ such that the cardinality of $A$ is less than or equals the cardinality of $B$.

We shall prove the contra-positive: If $\exists$ $f(x) = f(y)$, then $x=y.$

Let $x^3 - 6x^2 + 12x - 7 = y^3 - 6y^2 + 12y - 7$.

Then by addition and some algebra, we get $x(x^2 - 6x + 12) = y(y^2 - 6y + 12)$

This feels dumb to ask but how do I continue to finally get the result that $x = y$?

-
Hint: show that the function is increasing. – M.B. Aug 5 '12 at 19:53
Sorry I don't understand. Do you mean differentiate and show that the derivative is always positive or something? – Arthur Collé Aug 5 '12 at 20:07
Exactly. If a function is increasing, do you see why it would have to be injective? – Kevin Carlson Aug 5 '12 at 20:12
Much of the first sentence of the proof is OK. The stuff about finite sets is of no particular relevance. The "formula" $\exists\,f(x)=f(y)$ is not well-formed. – André Nicolas Aug 5 '12 at 20:28
To say a function is "increasing" means that if $a < b$ then $f(a) < f(b)$. Suppose $x \neq y$. Then either $x < y$ or $x > y$. In either case, one cannot have $f(x) = f(y)$ and therefore increasing functions are injective. – user29743 Aug 5 '12 at 20:50

## 3 Answers

Note that $w^3-6w^2+12w-8=(w-2)^3$. So $w^3-6w^2+12w-7=(w-2)^3+1$.

So we want to show that if $(x-2)^3+1=(y-2)^3+1$ then $x=y$.

Equivalently, we want to show that if $(x-2)^3=(y-2)^3$ then $x=y$. This is easy, the cube function is increasing.

Remark: We can use the basic algebra of ordered fields to show that if $s^3=t^3$ then $s=t$. For $s^3-t^3=(s-t)(s^2+st+t^2)$. But $$2(s^2+st+t^2)=(s+t)^2+s^2+t^2,$$ so $s^2+st+t^2$ can only be $0$ when $s=t=s+t=0$.

-

A differentiable function with everywhere positive derivative is injective. The derivative of $f$ is $f'(x)=3x^2-12x+12=3(x^2-4x+4)=3(x-2)^2$. This is positive for $x\ne2$. To see that the zero derivative at $x=2$ doesn't destroy injectivity, integrate this to find $f(x)=(x-2)^3+C$ (with $C=1$). Thus $f$ is a shifted version of $x^3$, which is injective.

-
It is sufficient that $f'$ does not change sign in order for $f$ to be injective. – AD. Aug 5 '12 at 20:33
@AD: That's not true. You could insert a stretch where $f$ is identically $0$ into $f(x)=x^3$ without the derivative ever changing sign. I suspect that it's sufficient that the zeros of $f'$ are isolated, but that seems like overkill for a problem that can easily be reduced to $x^3$. – joriki Aug 5 '12 at 20:50
You are right. What I meant was "for polynomial $f$" (or smooth $f$). – AD. Aug 5 '12 at 21:07
Sorry, not smooth but analytic (one may consider $f(x)=\exp(-1/x^2)$ on $\mathbb{R}^+$) – AD. Aug 5 '12 at 21:33

Hint $\rm\,\ 0 = f(x)\!-\!f(y) = (\color{#C00}{x\!-\!y})\,\left(\left(\color{blue}{y\!-\!2}\ +\dfrac{\color{#0A0}{x\!-\!2}}2\right)^2\! + 3\,\left(\dfrac{\color{#0A0}{x\!-\!2}}{2}\right)^2\right)\iff \begin{eqnarray}\rm \color{#C00}{x=y}\quad \ or\\\rm\ \color{#0A0}{x=2}\ \ and\ \ \color{blue}{y = 2}\end{eqnarray}$

Remark $\$ This approach doesn't require noticing that $\rm\:f(x) = (x-2)^3\!+1.\:$ Rather, we use only $\rm\:x\!-\!y\:|\:f(x)\!-f(y)\:$ (Factor Theorem), and we complete the square in the quadratic cofactor.

-