Am I allowed to do this?

for the integral of

∫ sec^4 (3x)/ tan^3 (3x) dx

I change it to

∫ sec^4 (3x) tan^-3 (3x)

From here I use the rule for trigonometry functions.

2 answers

Or do I use the rule of ∫ sec^n x dx divided by the rule of ∫ tan^n x dx?
If I go with my first assumption I get this:

∫ sec^4 (3x) tan^-3 (3x) = ∫ sec^3 (3x) tan^-4 (3x) sec(3x)tan(3x) dx

= ∫ sec^3 (3x) (sec^-4 3x - 1)sec(3x)tan(3x) dx

u = sec(3x) dx
du = 3sec(3x)tan(3x) dx > 1/3du

= 1/3 ∫ u^3 (u^-4 - 1) du

= 1/3 ∫ (u^-7 - u^3) du

= 1/3 (u^-6/-6 - u^4/4) + C

= -18/sec^6(3x) - sec^4 (3x)/12 + C

Would this be the right method and answer? Thank you