Let $f(x) = (x^n-1)/(x-1)$. Why does $f(1)=n$? In the back of De Souza (Berkeley Problems in Mathematics, page 305), it says:


  For $x \neq 1$,
  $$
f(x) = (x^n-1)/(x-1) = x^{n-1} + \cdots + 1
$$
  so $f(1) = n$.


The expansion for $x \neq 1$ obviously follows from the definition of a partial geometric series. But since it requires $x \neq 1$, how can it follow that $f(1)=n$?

Edit: $f$ is defined as above as a polynomial. I think this changes the question since if $f$ is given as a polynomial, it must then be continuous. The only way for $f$ to be continuous is to define $f(1)=n$. Someone else can confirm if this is correct reasoning.
I think what you want to say is

$$\lim_{x \to 1} f(x) = n$$

The reason is that, when $x \ne 1$, we may rewrite $f(x)$ as

$$x^{n-1} + x^{n-2} + \cdots +x +1$$

and now, because this form is continuous at $x=1$, we may extend the definition of the function to include $x=1$, which is $1+1+\cdots+1+1 = n$.
Two major way to define a function from A to B, in both its just a part of AxB (Cartesian product), such that , ether:
1-for every x in A there only one y in B that (x,y) is member of the function .
you can say that f is from A to B, and give the expression of f(x) (that should be well defined in B for all x in A)
2-for every x in A there at most one y in B that (x,y) is member of the function .
you can say that f is from A to B, and give the expression of f(x) , then we should find the part of A where this is defined 

So based on your text: I guess that your function has IR (reels) as first set, witch contains 1. And some where that function is mentioned as continuous , then that expression of f(x) where x#1 so you can conclude that f(1)=n