why is the differential of secx tanx when secx=/cosx=tanx/sinx

im also confused as to why when you've got d(sec^(2)x)/dx)

you can't do sec^(2)x=cos^(-2)x

therefore dy/dx = 2cosxsinx=sin2x

i think its wrong to say 1/cos^(2)x=cos^(-2)x but im not sure, is this the same as 1/arccosx im so confused,,,,,,,,,,,,,,,,,,,,,

genreally just want to know how to diff secx >>>???? thnx,,,,but expaination as to y im wrong would be much appreciated thnx