Ok, this is a relatively simple application of the product rule if we know the derivatives of tan(x) and sec(x) but we'll derive them to give it a bit of challenge.
color(blue)("Optional Derivation Interlude")
Remember that tan(x) = (sin(x))/(cos(x))
d/(dx)(tan(x)) = d/(dx)((sin(x))/(cos(x)))
Going to use the quotient rule here:
d/(dx)((f(x))/(g(x))) = (f'(x)g(x) - f(x)g'(x))/(g(x))^2
d/(dx)(tan(x)) = (cos(x)cos(x) - sin(x)(-sin(x)))/(cos(x))^2 = (cos^2(x) + sin^2(x))/(cos^2(x))
Recall that sin^2x + cos^2x = 1 so:
d/(dx)(tan(x)) = 1/(cos^2(x)) = sec^2(x)
d/(dx)(sec(x)) = d/(dx)(1/(cos(x)))
Quotient rule time again:
(0*cos(x) - 1*(-sin(x)))/(cos^2(x)) = (sin(x))/(cos^2(x)) = (sin(x))/(cos(x))(1)/(cos(x))
therefore d/(dx)(sec(x)) = tan(x)sec(x)
color(blue)("Derivation End")
Product rule given by:
d/(dx)(f(x)g(x)) = f'(x)g(x) + f(x)g'(x)
d/(dx)(tan(x)sec(x)) = d/(dx)(tan(x))sec(x) + tan(x)d/(dx)(sec(x))
=sec^2(x)sec(x) + tan(x)tan(x)sec(x)
=sec^3(x) + tan^2(x)sec(x) = sec(x)(sec^2(x)+tan^2(x))