How is $\lim_{x \to a}\left(\frac{x^n - a^n}{x - a}\right) = n\times a^{n-1}$? In my book this is termed as a theorem and the proof given is as follows :-
$$\begin{align}
\lim_{x \to a}\left(\frac{x^n - a^n}{x - a}\right)
&=\lim_{x \to a}\left(\frac{(x - a)*(x^{x-1} + x^{n-2}*a + x^{n-3}*a^2 + x^{n-4}*a^3 + \cdots + x^1*a^{n-2} + a^{n-1})}{x - a}\right) \\ &=(a^{n-1} + a*a^{n-2} + \cdots + a^{n-1}) \\ &=(a^{n-1} + a^{n-1} + \cdots + a^{n-1}) \\ &=(n*a^{n-1}).
\end{align}$$
Everything made sense to me except 
$$x^n - a^n = (x - a)*(x^{x-1} + x^{n-2}*a + x^{n-3}*a^2 + x^{n-4}*a^3 + \cdots + x^1*a^{n-2} + a^{n-1})$$
Somebody please enlighten me on this topic. 
 A: No, this isn't a binomial expansion. This is just long division. To check that it makes sense, we can just expand it out:
\begin{align*}
&(x - a)(x^{n - 1} + ax^{n - 2} + a^2x^{n - 3} + \cdots + a^{n - 2}x + a^{n - 1}) \\
&= x(x^{n - 1} + ax^{n - 2} + a^2x^{n - 3} + \cdots + a^{n - 1}) \\
&~~~~~~~~~~~~~~~~~- a(x^{n - 1} + ax^{n - 2} + \cdots + a^{n - 2}x + a^{n - 1}) \\
&= (x^n \color{red}{+ ax^{n - 1} + a^2x^{n - 2} + \cdots  + a^{n - 1}x}) \\
&~~~~~~~+ (\color{red}{-ax^{n - 1} - a^2x^{n - 2} - \cdots - a^{n - 1}x} - a^n) \\
&= x^n - a^n
\end{align*}
A: To adress your question. In the expression
$$
(x - a)\cdot(x^{n-1} + x^{n-2}\cdot a + x^{n-3}\cdot a^2 + x^{n-4}\cdot a^3 + \cdots + x^1\cdot a^{n-2} + a^{n-1})
$$ you may just expand it as
$$
x \cdot \left(x^{n-1} + x^{n-2}\cdot a + x^{n-3}\cdot a^2 + x^{n-4}\cdot a^3 + \cdots + x^1\cdot a^{n-2} + a^{n-1}\right)
$$ giving

$$\left(x^n + x^{n-1}\cdot a + x^{n-2}\cdot a^2 + x^{n-3}\cdot a^3 + \cdots + x^2\cdot a^{n-2} + x\cdot a^{n-1}\right)
$$ 

then substract
$$
a\cdot(x^{n-1} + x^{n-2}\cdot a + x^{n-3}\cdot a^2 + x^{n-4}\cdot a^3 + \cdots + x^1\cdot a^{n-2} + a^{n-1})
$$ that is substract

$$
(x^{n-1}\cdot a + x^{n-2}\cdot a^2 + x^{n-3}\cdot a^3 + x^{n-4}\cdot a^4 + \cdots + x^1\cdot a^{n-1} + a^n)
$$ 

then you can see that all terms cancel except

$$
x^n-a^n.
$$

A: Hint: Use the definition of derivative of a function. The limit can be seen as the derivative of the function $f(x)=x^n$ at $x=a$

 By definition $f'(a)=\lim_{x\to a}\frac{f(x)-f(a)}{x-a}$

