# What's wrong in this integral

Where's the mistake in this solution? $$\int \tan^3x\sec^2xdx = \int \frac{\sin^3x}{\cos^5x}dx=\int\frac{\sin x(1-\cos²x)}{\cos^5x}dx=\int\frac{u^2-1}{u^5}du$$$$=\frac{1}{4u^4}-\frac{1}{2u^2}+C=\frac{1}{4\cos^4x}-\frac{1}{2\cos^2x}+C$$ for $\cos x=u \to du=-\sin xdx$.

I also tried doing $$\int \tan^3x\sec^2xdx = \int u^3du=\frac{u^4}{4}+C=\frac{\tan^4x}{4}+C$$ for $tgx=u \to du=\sec^2xdx$