# [SOLVED]Inverse of the function and find if is surjective/injective

#### wishmaster

##### Active member
For the given function i have to find if is surjective/injective and find the inverse of the function:

$$\displaystyle f(x)=\frac{3x-2}{x+2}$$

I now that for inverse i have to express $x$ somehow,but i dont know how to do it....
Thank you for the help!

#### topsquark

##### Well-known member
MHB Math Helper
For the given function i have to find if is surjective/injective and find the inverse of the function:

$$\displaystyle f(x)=\frac{3x-2}{x+2}$$

I now that for inverse i have to express $x$ somehow,but i dont know how to do it....
Thank you for the help!
Let y = f(x) so you have
$$\displaystyle y=\frac{3x-2}{x+2}$$

To find the inverse exchange the roles of x and y:
$$\displaystyle x=\frac{3y-2}{y+2}$$

Now solve for y.

-Dan

#### Klaas van Aarsen

##### MHB Seeker
Staff member
You will need the inverse to answer those questions.

Does every value in the codomain have at least one original?
Does every value in the codomain have at most one original?

#### wishmaster

##### Active member
I understand this,but how to prove it mathematicly?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
I understand this,but how to prove it mathematicly?
Can you write down the inverse function first?

#### wishmaster

##### Active member
Can you write down the inverse function first?
I have calculated that inverse is : $$\displaystyle -\frac{2-2x}{x-3}$$

#### Klaas van Aarsen

##### MHB Seeker
Staff member
I have calculated that inverse is : $$\displaystyle -\frac{2-2x}{x-3}$$
Good.
So pick any element in $\mathbb R$.
Your formula gives a unique original of that value for the original function f.
There is 1 exception: the value 3 does not have an original.

So each element in the codomain $\mathbb R$ of f has either 1 or 0 originals.
As such the function f is injective, since each element has at most 1 original.
But the function f is not surjective, since not every element has at least 1 original.
Therefore, f is not bijective either.

If we restrict the codomain to $\mathbb R \backslash \{ 3 \}$, it is both surjective and bijective.

#### wishmaster

##### Active member
Good.
So pick any element in $\mathbb R$.
Your formula gives a unique original of that value for the original function f.
There is 1 exception: the value 3 does not have an original.

So each element in the codomain $\mathbb R$ of f has either 1 or 0 originals.
As such the function f is injective, since each element has at most 1 original.
But the function f is not surjective, since not every element has at least 1 original.
Therefore, f is not bijective either.

If we restrict the codomain to $\mathbb R \backslash \{ 3 \}$, it is both surjective and bijective.
Thank you very much! But how do i prove this mathematicly? This is theory,i have to calculate it somehow......

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Thank you very much! But how do i prove this mathematicly? This is theory,i have to calculate it somehow......
First off, I just noticed that your inverse is incorrect.
If you have $$\displaystyle y=f(x)=\frac{3x-2}{x+2}$$, then $$\displaystyle x = -\frac{2y+2}{y-3}$$.

Anyway, I guess you want it a bit more formal?

Well, $f(x)=3$ has no solution, which we can see from the formula $$\displaystyle x = -\frac{2y+2}{y-3}$$, which we deduced from $f(x)=y$, therefore f is not surjective (proof by counter example).

Then suppose f is not injective, then there are $x_1, x_2, y \in \mathbb R$, with $x_1 \ne x_2$, such that $y=f(x_1)=f(x_2)$.
That means that $$\displaystyle x_1 = -\frac{2y+2}{y-3}$$, but also that $$\displaystyle x_2 = -\frac{2y+2}{y-3}$$.
These are both the same value, which is a contradiction.
Therefore f is injective (proof by contradiction).

#### wishmaster

##### Active member
First off, I just noticed that your inverse is incorrect.
If you have $$\displaystyle y=f(x)=\frac{3x-2}{x+2}$$, then $$\displaystyle x = -\frac{2y+2}{y-3}$$.

Anyway, I guess you want it a bit more formal?

Well, $f(x)=3$ has no solution, which we can see from the formula $$\displaystyle x = -\frac{2y+2}{y-3}$$, which we deduced from $f(x)=y$, therefore f is not surjective (proof by counter example).

Then suppose f is not injective, then there are $x_1, x_2, y \in \mathbb R$, with $x_1 \ne x_2$, such that $y=f(x_1)=f(x_2)$.
That means that $$\displaystyle x_1 = -\frac{2y+2}{y-3}$$, but also that $$\displaystyle x_2 = -\frac{2y+2}{y-3}$$.
These are both the same value, which is a contradiction.
Therefore f is injective (proof by contradiction).
i dont know.....seems inverse is correct,checked by many programs.....

Yes,i want it formal,and you have given me a great answer,for what im very thankful!

Staff member

Staff member

#### wishmaster

##### Active member
$$- \frac{2(x+1)}{x-3}$$
Note that it is not what you originally gave.
There's a difference with a minus sign.
Ah well.

Good!
Im not as close so smart as you,but arent those results the same?

Yes,good for me!

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Im not as close so smart as you,but arent those results the same?
I'm afraid not.
Let me try and show it:
\begin{array}{}
- \frac{2(x+1)}{x-3}
& =- \frac{2+2x}{x-3} & \qquad (1)\\
&= \frac{-(2+2x)}{x-3} \\
&= \frac{-2-2x}{x-3} & \qquad (2) \\
\end{array}
I'm trying to show here that (1) and (2) are proper alternate forms of the inverse.
However, (your version) is different from either of them.

#### wishmaster

##### Active member
I'm afraid not.
Let me try and show it:
\begin{array}{}
- \frac{2(x+1)}{x-3}
& =- \frac{2+2x}{x-3} & \qquad (1)\\
&= \frac{-(2+2x)}{x-3} \\
&= \frac{-2-2x}{x-3} & \qquad (2) \\
\end{array}
I'm trying to show here that (1) and (2) are proper alternate forms of the inverse.
However, (your version) is different from either of them.
Isnt $$\displaystyle -\frac{1}{3}$$ or $$\displaystyle \frac{-1}{3}$$ the same thing?
But yes,i believe it was my mistake,i dont want to be a smart guy here,just want to learn proper math

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Isnt $$\displaystyle -\frac{1}{3}$$ or $$\displaystyle \frac{-1}{3}$$ the same thing?
But yes,i believe it was my mistake,i dont want to be a smart guy here,just want to learn proper math
Yes, that is the same thing.

However, $$\displaystyle -\frac{1+1}{3}=- \frac 2 3$$ and $$\displaystyle \frac{-1+1}{3} = 0$$ are not the same thing.

#### Petrus

##### Well-known member
I'm afraid not.
Let me try and show it:
\begin{array}{}
- \frac{2(x+1)}{x-3}
& =- \frac{2+2x}{x-3} & \qquad (1)\\
&= \frac{-(2+2x)}{x-3} \\
&= \frac{-2-2x}{x-3} & \qquad (2) \\
$$\displaystyle -\frac{2-2x}{x-3} =\frac{-(2-2x)}{x-3}$$
so $$\displaystyle -\frac{1}{3}=\frac{-(1)}{3}$$
$$\displaystyle |\pi\rangle$$