I'll state the multiple choice question from my textbook below:
If $f(x) = \frac {x^n - a^n}{x - a}$ for some constant '$a$', then $f'(a)$ is
(A) $1$
(B) $0$
(C) does not exist
(D) $\frac 12$
Here's what I tried:
By using quotient rule we get:
$f'(x) = \frac {(n-1)x^n - nax^{n-1} + a^n}{(x-a)^2}$
Clearly,
$f'(a) = \frac 00$
And the correct choice according to my book is (C). Does getting $\frac 00$ for a particular value of the variable (in this case, for $x=a$) mean that the derivative of the function doesn't exist at that point?
Not satisfied by the answer I factorised the numerator of $f(x)$ and cancelled the factor $(x-a)$ as below:
$f(x) = \frac {(x-a)(x^{n-1} + x^{n-2}a + x^{n-3}a^2 +..........+ xa^{n-2} + a^{n-1})}{x-a}$
$\implies f(x) = x^{n-1} + x^{n-2}a + x^{n-3}a^2 +..........+ xa^{n-2} + a^{n-1}$
Differentiating with respect to $x$ we get,
$f'(x) = (n-1)x^{n-2} + (n-2)x^{n-3}a + (n-3)x^{n-4}a^2 +..........+ a^{n-2}$
$\implies f'(a) = \Big[(n-1) + (n-2) + (n-3) + .......... + 1\Big]a^{n-2}$
$\implies f'(a) = \frac {n(n-1)}2 a^{n-2}$
Now this is a completely different answer.
So what have I done wrong? Is there some problem with cancelling the factor $(x-a)$? Does it have something to with the continuity and differentiabilty of $f(x)$ at $a$? What if the function was $f(x) = \begin{cases} \frac {x^n - a^n}{x - a}, & \text{if $x \ne a$} \\ na^{n-1}, & \text{if $x = a$} \end{cases}$? How do I find the derivative at $x = a$ in this case?