Differentiation from first principles of specific form. I've been posed a question in which I'm to differentiate with respect to $x$ a function of the form $(x+a)^k$. I've successfully completed (matches the book's answer) the question by using the chain rule, however I cannot achieve the same result using the definition of the derivative.
I would like a worked example of differentiation from first principles of a function of the form $(x+a)^k$. 
 A: For concreteness, let's first take $k=3$.
We use the factorization $x^3-y^3=(x-y)(x^2+xy+y^2)$.
Here we have $(x+a+h)^3-(x+a)^3=h((x+a+h)^2+(x+a+h)(x+a)+(x+a)^2)$. 
The difference quotient is then
$$\frac{(x+a+h)^3-(x+a)^3}{h}=((x+a+h)^2+(x+a+h)(x+a)+(x+a)^2).$$
As $h$ goes to zero, this becomes $3(x+a)^2$, as desired.
How does this generalize? We have similar factorizations for all $k$:
$$x^k-y^k=(x-y)(x^k+x^{k-1}y+\cdots xy^{k-1}+ y^k)$$
where there are $k$ terms in the second parenthesis. This factorization is easy to check, because the terms all telescope and cancel.
So what I did for $k=3$ can be repeated for general $k$, and when $h$ goes to zero you get $k$ terms of $(x+a)^{k-1}$ added together, which is exactly the same derivative you get using the chain rule.
A: $$
\frac{d}{dx} (x+a)^k = \lim_{h\to 0} \frac{1}{h}\left((x+h+a)^k - (x+a)^k\right) ~~.
$$
The fundamental idea is, use the binomial theorem.
$$
(x+h+a)^k = \sum_{j=0}^k {k \choose j} (x+a)^{k-j} h^j ~~,
$$
so we notice that in the difference in the above limit, subtracting $(x+a)^k$ removes the $0^\text{th}$ term of the summation. Hence, 
$$
\lim_{h\to 0} \frac{1}{h}\left((x+h+a)^k - (x+a)^k\right) = \lim_{h\to 0} \frac{1}{h}\sum_{j=1}^k {k \choose j} (x+a)^{k-j} h^j 
$$ $$
= \lim_{h\to 0}\sum_{j=1}^k {k \choose j} (x+a)^{k-j} h^{j-1} = \lim_{h\to 0} \sum_{j=0}^{k-1} {k \choose j+1} (x+a)^{k-j-1} h^j ~~.
$$ 
The summation expression can be thought of as a polynomial in $h$, so the only term which survives taking the limit will be when $j=0$. Hence, 
$$
\lim_{h\to 0} \sum_{j=0}^{k-1} {k \choose j+1} (x+a)^{k-j-1} h^j = {k \choose 1} (x+a)^{k-1} = k(x+a)^{k-1} ~~.
$$
This is the simplest clean way I know of to solve this by the definition of derivative.
A: We want to show that for any positive integer $n$,
$$\lim_{h\to 0}\frac{(x+a+h)^n -(x+a)^n}{h}=n(x+a)^{n-1}.$$
To save typing, write $w$ instead of $x+a$. So we want to show that 
$$\lim_{h\to0}\frac{(w+h)^n-w^n}{h}=nw^{n-1}.$$
We prove the result by induction on $n$. The base step $n=1$ is easy.  We prove the induction step, that if the result holds for $n=k$, it holds for $n=k+1$.
Note that $(w+h)^{k+1}=(w+h)^k (w+h)=w(w+h)^k +h(w+h)^k$. It follows that
$$(w+h)^{k+1}-w^{k+1}=w((w+h)^k -w^k) +h(w+h)^k.$$
Divide by $h$. We get 
$$\frac{(w+h)^{k+1}-w^{k+1}}{h}=w\frac{(w+h)^k -w^k}{h} +(w+h)^k.\tag{$1$}$$
By the induction hypothesis,
$$\lim_{h\to 0}w\frac{(w+h)^k -w^k}{h}=w(kw^{k-1})=kw^k.$$
And it is clear that
$$\lim_{h\to 0}(w+h)^k=w^k.$$
So the right-hand side of $(1)$ has limit $(k+1)w^k$ has $h\to 0$. This completes 
the induction step. 
