.... = lim[h→0] [tan(x+h) - tan(x)] / h........
= 1/cos(lim_(h->0) (h+x))^2
The limit of h+x as h approaches 0 is x:
= sec^2(x)
Since you want to differentiate using first principles, differentiate using the definition of the derivative.
If f(x) = tan(x), then:
f'(x) = lim (h-->0) [tan(x + h) - tan(x)]/h.
Since tan(A + B) = [tan(A) + tan(B)]/[1 - tan(A)tan(B)], we see that:
f'(x) = lim (h-->0) [tan(x + h) - tan(x)]/h
= lim (h-->0) {[tan(x) + tan(h)]/[1 - tan(x)tan(h)] - tan(x)}/h
= lim (h-->0) {tan(x) + tan(h) - tan(x)[1 - tan(x)tan(h)]}/{h[1 - tan(x)tan(h)]}
(Note that I multiplied the numerator and denominator by 1 - tan(x)tan(h).)
= lim (h-->0) [tan(x) + tan(h) - tan(x) + tan^2(x)tan(h)]/{h[1 - tan(x)tan(h)]}
= lim (h-->0) [tan(h) + tan^2(x)tan(h)]/{h[1 - tan(x)tan(h)]}
= lim (h-->0) {tan(h)[1 + tan^2(x)]}/{h[1 - tan(x)tan(h)]}, by factoring out tan(h)
= lim (h-->0) [tan(h)sec^2(x)]/{h[1 - tan(x)tan(h)]}, since sec^2(x) = 1 + tan^2(x)
= lim (h-->0) tan(h)/h * lim (h-->0) sec^2(x)/[1 - tan(x)tan(h)]
= (1)[sec^2(x)/(1 - 0)], since lim (h-->0) tan(h)/h = 1
= sec^2(x).
I hope this helps!