

Let f(x) = tan x
Now, df(x)/dx = limh->0 [{f(x + h) - f(x)}/h]
= limh->0 [{tan (x + h) - tan x}/h]
= limh->0 [{sin (x + h)/cos (x + h) - sin x/cos x}/h]
= limh->0 [{sin (x + h) * cos x - cos (x + h) * sin x}/{cos x * cos(x + h) * h}]
= limh->0 [{sin (x + h - x)/{cos x * cos(x + h) * h}] {using the formula sin (A + B)}
= limh->0 [{sin h/{cos x * cos(x + h) * h}]
= limh->0 (sin h)/h * limh->0 {cos x * cos(x + h) ]
= 1/(cos x * cos x) {since limh->0 (sin h)/h = 1}
= 1/cos2 x
= sec2 x
So, d(tan x)/dx = sec2 x
