# Range of a Rational Function with arbitrary constant

Find a condition on $c$ so that the function $f(x) =\frac{x+c}{x^2-3x-c}$ has the whole of the real numbers as its range.

I'm not entirely sure how to approach this problem.

The answer is $-2<c<0$ , however, I don't know how to get to it.

So I was thinking for a line $y=k$

if $\frac{x+c}{x^2-3x-c} = k$

$x+c=kx^2-3kx-ck$

$kx^2-(3k+1)x-ck-c=0$

Solution is discriminant, $\Delta \ge 0$

$\therefore$

$(3k+1)^2+4k(ck+c) \ge 0$

$(9+4c)k^2+(6+4c)k+1 \ge 0$

However, we don't know $k$; do we take the discriminant of the discriminant???

Alternatively, it may be best to consider horizontal asymptotes.

$\lim_{x\to\pm\infty}f(x)=\frac{x}{x^2}=\frac{1}{x}=0$

I'm not entirely sure how the $-2<c$ comes into this. Any help is much appreciated.

• $$c \geq \frac{9k^2+6k+1}{4k^2+4k}$$ (If $k^2+k\geq 0$, else $\leq$) But this must hold for ALL $k\in\mathbb R$ (with the respective ratio). Btw I think you also assume $k>0$ in your descriminant. – SK19 May 11 '18 at 16:33

you have arrived at $$(9+4c)k^2+(6+4c)k+1 \ge 0$$
For this quadratic to be non-negative, it must have a discriminant which is not positive, so now you have $$(6+4c)^2-4(9+4c)\leq0$$ $$\implies c(c+2)\leq0$$ $$\implies-2\leq c\leq0$$
However when $c=-2$, $f(x)=\frac{1}{x-1}$ which cannot be zero, and when $c=0$ then $f(x)=\frac{1}{x-3}$ which also cannot be zero, so the end-point values of the inequality are excluded, leaving you with the answer.