Given the fact that the function:
$$f(x) = \dfrac{2x-4}{x-2} = \dfrac{2(x-2)}{x-2} = f(x) = 2$$
Shouldn't $f(x)$ be equal to $2$ in every case, even when $x=2$?
Given the fact that the function:
$$f(x) = \dfrac{2x-4}{x-2} = \dfrac{2(x-2)}{x-2} = f(x) = 2$$
Shouldn't $f(x)$ be equal to $2$ in every case, even when $x=2$?
When you start with a function like $f(x) = \dfrac{2x-4}{x-2}$, you should take note of any restrictions to the domain; in this case, $x \neq 2$.
Now, whatever manipulation you do from this point on has an implicit condition that $x \neq 2$:
$$ \begin{align} f(x) &= \dfrac{2x-4}{x-2}, \quad x \neq 2\\ &= \dfrac{2(x-2)}{x-2}, \quad x \neq 2\\ &= 2, \quad x \neq 2\\ \end{align} $$
Obviously this is not how we normally write, but the point is that the condition exists from the beginning and doesn't change, even if you cancel some factors along the way.
When you are doing the simplification: $\frac{2(x-2)}{(x-2)}$ = 2, you are making the claim that $\frac{(x-2)}{(x-2)}$ =1.
This is true for almost any value of x, for example: x= 5 $\frac{(5-2)}{(5-2)}$ = $\frac{3}{3}$ = 1
However, in the case $\frac{(2-2)}{(2-2)}$ = $\frac{0}{0}$, which is undefined.
So, that step you do is value for all values of x except x=2.
Actually, the way stated your $f(x)$ is undefined at $x=2$ because of the zero in the denominator.
There is a continuous extension of $f(x)$, say $c(x)$, which would indeed satisfy $c(2)=2$.
The function is $f(x)=\begin{cases} 2,\ x\neq 2 \\ \text{undefined}, \ x= 2 \end{cases}$
The function is discontinous. The empty circle shows, that the function is undifined at x=2.
The graph is 