# How do you find the domain and range of  f(x) = (x+7) / (x-5)?

Aug 14, 2016

I got a domain and range of:

$\left(- \infty , 5\right) \cup \left(5 , \infty\right)$, or $x \ne 5$

$\left(- \infty , 1\right) \cup \left(1 , \infty\right)$, or $y \ne 1$

The function is undefined for $x$ values when the denominator, $x - 5$, is $0$; it's undefined to divide by $0$. Therefore, when $x = 5$, $f \left(x\right)$ is undefined.

$f \left(5\right) = \frac{5 + 7}{5 - 5} = \textcolor{g r e e n}{\frac{12}{0}}$

Since the domain is based on the allowed values of $x$, the domain is:

$\textcolor{b l u e}{\left(- \infty , 5\right) \cup \left(5 , \infty\right)}$

Based on the domain, we would find the range by solving for $x$ in terms of $f \left(x\right)$, which we will write as $y = f \left(x\right)$.

$y = \frac{x + 7}{x - 5}$

$y \left(x - 5\right) = x + 7$

$x y - 5 y = x + 7$

$x - x y = - 5 y - 7$

$x \left(1 - y\right) = - 5 y - 7$

$x = \frac{- 5 y - 7}{1 - y}$

$\textcolor{g r e e n}{x = \frac{5 y + 7}{y - 1}}$

This means when $y = 1$, the function is undefined as well. So, the range is:

$\textcolor{b l u e}{\left(- \infty , 1\right) \cup \left(1 , \infty\right)}$

You can see that this is the case in the graph itself:

graph{(x + 7)/(x - 5) [-73.3, 74.9, -37.07, 36.97]}

What you should notice is the horizontal asymptote at $y = 1$, and the vertical asymptote at $x = 5$.

Because the function is trying to reach an undefined value at those points ($x \ne 5$, $y \ne 1$), you get these "walls" that cannot be crossed, only ascended or descended from either side.