I don't understand how the derivative of tanx/x equals sec^2x/x. I got sec^2x/(-x^2) by the quotient rule. Can someone explain to me step by step please?

ok,

y = tanx/x
dy/dx = (x(sec^2 x) - tanx (1) )/x^2
which could be split up into
sec^2 x/x - tanx/x^2

Did you forget the last term of -tanx/x^2 ?

there really is not much point in further simplifying my first line answer of
(x sec^2 x - tanx )/x^2