We have: #f(x) = sec(x^(2) + 1) - tan^(2)(x)#
#=> f'(x) = (d) / (dx) (sec(x^(2) + 1)) - (d) / (dx) (tan^(2)(x))#
This function can be differentiated using the "chain rule" and the "sum rule".
Let #u = x^(2) + 1 => u' = 2x# and #v = sec(u) => v' = sec(u) tan(u)#:
#=> f'(x) = 2x cdot sec(u) tan(u) - (d) / (dx) (tan^(2)(x))#
#=> f'(x) = 2x sec(u) tan(u) - (d) / (dx) (tan^(2)(x))#
We can now replace #u# with #x^(2) + 1#:
#=> f'(x) = 2x sec(x^(2) + 1) tan(x^(2) + 1) - (d) / (dx) (tan^(2)(x))#
Now, let #u = tan(x) => u' = sec^(2)(x)# and #v = u^(2) => v' = 2 u#:
#=> f'(x) = 2x sec(x^(2) + 1) tan(x^(2) + 1) - (sec^(2)(x) cdot (2 u))#
#=> f'(x) = 2x sec(x^(2) + 1) tan(x^(2) + 1) - (2 sec^(2)(x) u)#
We can now replace #u# with #tan(x)#:
#=> f'(x) = 2x sec(x^(2) + 1) tan(x^(2) + 1) - (2 sec^(2)(x) (tan(x)))#
#=> f'(x) = 2x sec(x^(2) + 1) tan(x^(2) + 1) - 2 sec^(2)(x) tan(x)#