Here ,
#I=intcot^4(3x)dx#
Subst. #color(blue)(3x=u=>3dx=du=>dx=1/3du#
#I=1/3intcot^4udu#
#I=1/3intcot^2u*cot^2udu#
#I=1/3intcot^2u(csc^2u-1)duto[becausecolor(red)(csc^2theta-cot^2theta=1)]#
#I=1/3intcot^2ucsc^2udu-1/3intcot^2udu#
#I=-1/3intcot^2u(-csc^2u)du-1/3intcot^2udu#
#I=-1/3int(cotu)^2d(cotu)-1/3int(csc^2u-1)du#
#I=-1/3(cotu)^3/3-1/3{-cotu-u}+c#
#I=-1/9cot^3u+1/3cotu+1/3u+c#
#I=1/9[3u+3cotu-cot^3u]+c#
Subst. back #color(blue)(u=3x#
#I=1/9[9x+3cot(3x)-cot^3(3x)]+c#