TITLE: How to find $\lim_{x \to a}\frac{ a^nf(x)-x^nf(a)}{x-a}$
QUESTION [6 upvotes]: f:$\mathbb {R} \to \mathbb{R}$ which is differentiable at $x=a$ the we are to evaluate the following:-
$$\lim_{x\to a}\frac{a^nf(x)-x^nf(a)}{x-a}$$
My approach:-
$$\frac{a^nf(x)-x^nf(a)}{x-a}=x^na^n\frac{\frac{f(x)}{x^n}-\frac{f(a)}{a^n}}{x-a}$$
Let
$g(x)=\frac{f(x)}{x^n}$
then$$x^na^n\frac{\frac{f(x)}{x^n}-\frac{f(a)}{a^n}}{x-a}=x^na^n\frac{g(x)-g(a)}{x-a}$$
so that $$\lim_{x \to a}x^na^n\frac{g(x)-g(a)}{x-a}=(\lim_{x \to a}x^na^n)g'(a)=a^{2n} \frac{d}{dx}(f(x)/x^n)$$
$$=a^{2n}\left(\frac{x^nf'(x)-nx^{n-1}f(x)}{x^{2n}}\right)_{x=a}=a^nf'(a)-na^{n-1}f(a)$$
Is my attemplt correct?

REPLY [2 votes]: Another possible way  could be Taylor expansion around $x=a$ 
$$x^n=a^n+n a^{n-1} (x-a)+O\left((x-a)^2\right)$$
$$f(x)=f(a)+(x-a) f'(a)+O\left((x-a)^2\right)$$ Then $$a^n f(x)-x^nf(a)=(x-a) \left(a^n f'(a)-n  a^{n-1}f(a)\right)+O\left((x-a)^2\right)$$