tan3x is the same as sin3x/cos3x. sinx is the first dirivitive (excuse spellings) of cosx. i.e y=cosx, dy/dx=sinx.
Let cos3x=t
dt/dx=3sin3x so dt=3sin3x dx
1/3dt=sin3x
therefore the integral of sin3x/cos3x dx is: 1/3 X 1/t dt or 1/3 X t^-1 dt
1/3 X t-1 integrates to 1/3 X -lnt
the minus at the front of the ln can be moved to give 1/3lnt^-1 which is lncos^-1 x or ln(1/cos3x)
1/cos3x is sec3x hence ln|sec3x|
Correct me if im wrong but i believe than it is ln|sec3x| and not ln|secx|