Hi everyone. I'm trying to derive this equation, but I keep getting the wrong answer. I would appreciate any help : )

f(x)=

$\displaystyle sec^3(pi/2-x)$

So I apply the chain rule:

f'(x)=

$\displaystyle 3*(sec^2(pi/2-x)) * (sec^2(pi/2-x))' * (pi/2-x)'$

f'(x)=

$\displaystyle -6*(sec^2(pi/2-x) *(tan(pi/2-x)) * (sec^2(pi/2-x)) $

However, the math program I use gives me a different answer. Does anyone see where I went wrong?