1

Define $f: \mathbb R \setminus \{-1,-2\} \rightarrow \mathbb R $ by $$f(x)=\frac {x^2-1}{x^2+3x+2}$$

To find the range of $f$, we use the "discriminant method" (used in e.g. 1, 2, 3):

  1. Write $y=\frac {x^2-1}{x^2+3x+2}$.
  2. If $x^2+3x+2\neq0$ (or $x\neq -1,-2$), then we may cross-multiply to get: $$y(x^2+3x+2)=x^2-1.$$
  3. Rearrange: $(y-1)x^2+3yx+2y+1=0$.
  4. Check discriminant: $(3y)^2-4(y-1)(2y+1)=y^2+4y+4=(y+2)^2$ which is non-negative for all $y \in \mathbb R$.
  5. Conclude: The range of $f$ is $\mathbb R$.

The above though is incorrect. It turns out that the range of $f$ is $\mathbb R \setminus \{-2,1\}$. What went wrong above?

(Can we fix the above argument? In particular what do we need to add so that we can discover also that $-2$ and $1$ are not in the range of $f$ while every other real number is? Or is this argument always invalid?)

5 Answers5

2

You multiplied with $$x^2+3x+2$$ which is $\ 0\ $ for $\ x=-2\ $ and $\ x=-1\ $.

Peter
  • 84,454
  • So this method is never valid? Or how can it be fixed? –  Apr 22 '20 at 08:02
  • The new equation is equivalent besides for the two values giving the additional and wrong values for the range. You just have to consider the case, when $x^2+3x+2=0$ holds seperately. – Peter Apr 22 '20 at 08:03
2

What you have proved is that for any real number $x$ there exists $x$ such that $y(x^{2}+3x+2)=x^{2}-1$. To say that $y$ is in the range of $f$ you have to make sure that the point $x$ you get belongs to the domain of $f$. For $y=-2$ and $y=1$ it does not.

The argument using the discriminant is incomplete since the solution you got does not give $f(x)=y$ for the two exceptional values of $y$: it involves division by $0$.

1

With $y = 1$, note your equation has a $0$ coefficient for $x^2$, so it's not a quadratic any more. Instead, you have

$$\begin{equation}\begin{aligned} 3yx + 2y + 1 & = 0 \\ 3x + 3 & = 0 \\ x & = -1 \end{aligned}\end{equation}\tag{1}\label{eq1A}$$

However, $x = -1$ is one of the excluded values, which means that $y = 1$ must be as well.

With $y \neq 1$, you get with the quadratic equation that

$$\begin{equation}\begin{aligned} x & = \frac{-3y \pm (y + 2)}{2(y - 1)} \\ x(2(y - 1)) & = -3y \pm (y + 2) \end{aligned}\end{equation}\tag{2}\label{eq2A}$$

Consider the case where $x = -2$. You then get

$$-4(y - 1) = -3y \pm (y + 2) \tag{3}\label{eq3A}$$

Thus you have that $-4y + 4 = -3y - y - 2 = -4y - 2$, which is not possible, or that $-4y + 4 = -3y + y + 2 = -2y + 2 \implies y = 1$, which has already been discounted. Also, consider the case where $x = -1$, you have $-2y + 2 = -3y + y + 2 = -2y + 2$, which is always true, or that $-2y + 2 = -3y - y - 2 = -4y - 2 \implies y = -2$. Actually, using $y = -2$ in \eqref{eq3A} gives $-6x = 6 \implies x = -1$, which confirms this value of $y$ is not allowed either, meaning since there are no other restrictions on the values of $y$, the range of $f$ is $\mathbb R \setminus \{-2,1\}$.

For another way to solve this, note you have

$$x^2 - 1 = (x + 1)(x - 1) \tag{4}\label{eq4A}$$ $$x^2 + 3x + 2 = (x + 1)(x + 2) \tag{5}\label{eq5A}$$

Thus, for $R \setminus \{-1,-2\}$, you get

$$\begin{equation}\begin{aligned} f(x) & = \frac{x^2-1}{x^2+3x+2} \\ & = \frac{(x + 1)(x - 1)}{(x + 1)(x + 2)} \\ & = \frac{x-1}{x+2} \\ & = \frac{x + 2 - 2 - 1}{x + 2} \\ & = 1 + \frac{-3}{x + 2} \end{aligned}\end{equation}\tag{6}\label{eq6A}$$

Since $\frac{-3}{x + 2} \neq 0$, you have $f(x) \neq 1$. Also, since $x \neq -1$, you also have

$$\frac{-3}{x + 2} \neq \frac{-3}{-1 + 2} = -3 \tag{7}\label{eq7A}$$

which means $f(x) \neq 1 + (-3) = -2$ as well.

Since $\frac{-3}{x+2}$ has a range of all other real values (which I'll leave to you to show), this means that $f(x)$ does as well, apart from the previously mentioned $1$ and $-2$ so, once again, the range of $f$ is $\mathbb R \setminus \{-2,1\}$.

John Omielan
  • 47,976
0

If I understand it correctly, you'd want to know why your solution fails and when you can't use the discriminant method.

The definition of the discriminant of a polynomial $$p(x)=a_nx^n+...+a_1x+a_0$$ requires, for algebraic reasons, that the degree of $p(x)$ is precisely $n$, that is $a_n\neq0$ .
In your problem, the polynomial is $$p(x)=(y-1)x^2+3yx+2y+1 . \tag{1}$$ So, when we reach the point 3 of your solution, we have to split it into 2 cases.

The first one, $$a_n=a_2=y-1=0,$$ must be examined without using any discriminant argument (or, more precisely, we could use linear polynomial discriminant argument, but it should be useless because it's always equal to 1 and, so, it doesn't depends on the coefficients of $p(x)=3x+3$).
In this case, we have $$y=1\implies x=-1,$$ the latter of which is not in the domain of $f$.
So, even if $y=1$ is a valid value for the parameter $y$ in the equation $p(x)=(y-1)x^2+3yx+2y+1=0$, that gives $x=-1$ as solution, we have that: $$(-1,1)\notin \{(x,y)\in\mathbb{R}^2:y=f(x)\} ,$$ and then $y=1$ is not in the range.

In the second case, $$a_2=y-1\neq0,$$ we can use your discriminant argument, but remembering, in the end, to check if the solutions we obtain are compatible with the initial costraints, i.e. the domain of $f$.

Let's say $D_y$ is the discriminant of $p_y(x)$, where we use the subscript $y$ because both depend on $y$.
We found that $$\forall y,D_y\geq0$$ which means that, for each value of $y$, we have at least a solution $x$ for $p_y(x)=0$.
In other words, we found that $$S=\{y\in\mathbb{R}:\exists x:p_y(x)=0\}=\mathbb{R}.$$ Let's say $T$ is the range of $f$.
We know that $T\subseteq S$, but we don't know if $S\subseteq T$: picking $y_0\in S=\mathbb{R}$, we have that $$\exists x_0:p_{y_0}(x_0)=0$$ but, before saying that $y_0\in T$, we have to check if $x_0$ is in the domain of $f$, that is $x_0\ne-1 \land x_0\ne-2$.
For example, if $y=-2\in S$, we have that $$p_{-2}(x)=-3x^2-6x-3=0$$ has one solution that is $x=-1$, but $f$ is not defined in $-1$, so $-2\notin T$ (incidentally, this is the only example we can produce, but we don't know yet).

Ignoring the example, we need a way to identify all values $y$ such that $p_y(x)=0$ has the solution $x=-1$, or the solution $x=-2$, or the couple of solutions $(x_1,x_2)=(-1,-2)$.
Setting $x=-1$ in $p_y(x)=0$ we have an identity, so there is nothing we can say. Intead, setting $x=-2$ in $p_y(x)=0$ we have $-3=0$, and this means that there are no chances that exists an $y$ such that $p_y(x)=0$ has a solution $x=-2$.
So, the residual problem is to identify all values $y$ such that $p_y(x)=0$ has the only solution $x=-1$.
How can we handle this case?
We know that $p_y(x)=0$ has one solution if and only if $D_y=0$, that is $y=-2$.
In this scenario, we have, as seen before: $$p_{-2}(x)=-3x^2-6x-3$$ and then $$p_{-2}(x)=0 \iff x=-1$$ So, we can conclude that $y=-2\in S$ but $y=-2\notin T$.
Summarizing what precedes, we can say that:
$$T=S\setminus \{1,-2\}.$$

  • I think the first part of your answer is correct. But I have doubts about the second part (starting with "In the second case, ..."): In particular, how do you know to check specifically for $y=-2$? (This seems to have come from nowhere.) –  Apr 23 '20 at 00:34
  • @JerryS1988 Relating to the discriminant, varying the parameter y into the equation, we have 0, 1 or 2 solutions. These 3 alternatives are conceptually different. The second case, $y$ such that one solution exists, is that from which the condition $y=-2$ arises. We find $y=-2,p(x)=0\implies x=-1$, so we can exclude $-2$ from the range because the implication tell us that every other solution different from $-1$ will never lead to $y=-2$. The third case leads to the argument about the couple of solutions: if you think that it isn't clear, I'll try to rearrange. – Edoardo Buscicchio Apr 23 '20 at 15:56
  • @JerryS1988 Trying to clarify, the 3 alternatives are conceptually different because they are linked to the property of $f$.
    $y:D(p)<0$ are definitely out of the range of $f$, $y:D(p)=0$ are (potential) value of $f$ for which the preimage is a singleton, $y:D(p)>0$ are (potential) value of $f$ for which the preimage exibit that $f$ is not injective. The word "potential" refers to the discussion about the eligibility of the $x$ derived from them, regarding being or not in the domain.
    – Edoardo Buscicchio Apr 23 '20 at 16:51
  • I can't see why the case where the discriminant equals zero (or $y=-2$) is special and merits additional investigation. –  Apr 24 '20 at 01:35
  • The discriminant method does not end when we find $y$ for which the equation $p(x)=0$ is solvable: we have to check if the solutions, depending on $y$, are in the domain of $f$ or not. So, we have to do it manually (see my answer, that I'm going to edit) or we can use again the property of the discriminant to bypass some work. So we split into two cases, $D(p)=0$ and $D(p)>0$, because the check will be conceptually different for them: from the first case, $D(p)=0$, arises the condition $y=-2$. – Edoardo Buscicchio Apr 24 '20 at 12:46
0

Note that the function $f(x) = \frac{(x + 1)(x - 1)}{(x + 1)(x + 2)} $ has a hole at $x=-1$, i.e. it can not take the value $f(-1)=-2$ because it is undefined for $x=-1$. Moreover $f(x)$ is of a fractional form, with the horizontal asymptotes at $f(\pm\infty)=1$.

So, using the discriminant argument on $y(x^{2}+3x+2)=x^{2}-1$, you artificially removed the hole and the asymptotes, which correspond to the values $-2$ and $1$ and they should be excluded from the range.

Quanto
  • 97,352