Consider,
$$ f(x) = \frac{x^{n+1} - 1}{x-1}$$
If I took derivative using quotient rule,
$$ f'(x) = \frac{ (n+1)x^{n} (x-1) - (x^{n+1} -1) } { (x-1)^2}$$
Now,
$$ \lim_{x \to 1} f'(x) = \frac{n(n+1)}{2}$$
But, suppose I took derivative using product rule,
$$ f'(x) =( ( x^{n+1} -1) (x-1)^{-1})' = (n+1)x^n(x-1)^{-1} -(x-1)^{-2} (x^{n+1} -1)$$
Now, for this function if I take limit by distributing over the sum of functions, then the limit is undefined for one of them,
$$ f'(x) = \lim_{x \to 1}(n+1)x^n(x-1)^{-1} -(x-1)^{-2} (x^{n+1} -1)$$
More particularly, this limit is undefined $$ \lim_{x \to 1} \frac{ x^n}{ (x-1)}$$
So, am I missing something is the derivative of a function different based on how exactly you take the derivative of it? I mean, if both functions are actually equivalent they should have the same limits.
Edit: Why does the limit only become defined when I do algebraic manipulations? I know that when I manipulate the expression, I am indeed changing the function.
Edit: I unaccepted the answer because I saw this stack which says that for limit of a sum to exist, then the sum of limits must exist. and, the top answer says otherwise.