You've just integrated $\tan^n x$ as if it were $x^n$.
You should write $\tan^2 x \, \sec^4 x = (1+\tan^2 x)\tan^2 x \, \sec^2 x = \tan^2 x \, \sec^2 x + \tan^4 x \,\sec^2 x$ and then use $u = \tan x$ to integrate.