The limit of part of a function, given the limit of the whole function

The question is:

Suppose $\lim_{x\rightarrow 1}\frac{f(x)-7}{x-1}=4$, find $\lim_{x\rightarrow 1}f(x)$.

The obvious answer is $7$, by going: \begin{align*} \lim_{x\rightarrow 1}\frac{f(x)-7}{x-1}&=4\\ \Rightarrow\lim_{x\rightarrow 1}[f(x)-7]&=4\times{\lim_{x\rightarrow 1}[x-1]}\\ \Rightarrow\lim_{x\rightarrow 1}[f(x)-7]&=0\\ \Rightarrow\lim_{x\rightarrow 1}f(x)&=7 \end{align*} But this feels wrong. Specifically, the step of taking "${\lim_{x\rightarrow 1}[x-1]}$" over to the right hand side seems illegal. I justify this to myself by saying we can treat it like a number not equal to zero because it is a limit. But I don't believe my justification.

-

Anwser to yout "seems illegal" doubt: as $$\lim_{x\to 1}\frac{f(x)-7}{x-1}\text{ exists}$$ and $$\lim_{x\to 1}(x-1)\text{ exists},$$ $$\lim_{x\to 1}(f(x)-7) = \lim_{x\to 1}\frac{f(x)-7}{x-1}\times\lim_{x\to 1}(x-1) = \cdots\text{ exists.}$$

-
Oh! Of course! Silly me for not writing all my working! Thanks. – user303353 Jan 7 at 11:26

Hint: Its a matter of rewrite $f(x) = (x-1)\cdot \dfrac{f(x)-7}{x-1} + 7\Rightarrow \displaystyle \lim_{x\to 1} f(x) = \displaystyle \lim_{x\to1}(x-1)\cdot \displaystyle \lim_{x\to 1}\dfrac{f(x)-7}{x-1} + \displaystyle \lim_{x \to 1} 7 = ?$

-
So $7$ is correct then? – user303353 Jan 7 at 11:17
Yes. But I am confused because I give the answer as $7$ in my question, so am wondering why you didn't just say "Yes, the answer is $7$. Another way to see this is by..." or "Yes, the answer is $7$. Your way is incorrect because... A better way to get the answer is by...". So I am wondering if I am missing something? – user303353 Jan 7 at 11:23

The subtlety of this question is where the 4 comes from, since $f(1)$ must be 7 for the limit to exist. This quotient is the definition of derivitive so what it's saying is that $f'(1) = 4.$

-