Derivative of y=sec(tanx)?

I don't get how it is secxsecx*secxtanx*tanxtanx. Where does an extra tanx come from? Derivative of sec(tanx) is just secxtanx*tanx (and then multiply the inside as well so)* sec^2(X) as derivative of tanx. I have 2 tanx, where did the third one come from?!

1 answer

the derivative of sec(u) is sec(u) tan(u)

But, if u is a function of x, then we have to apply the chain rule. Since u=tanx, then du/dx = sec^2(x)

So, the final damage is

sec(tanx) tan(tanx) sec^2(x)