$$\int \:\frac{\left(\sin x+\tan x\right)}{3\cos^2x}dx$$
I know I have to split the equation into
$$\frac{1}{3}\int \:\left(\:\frac{\sin x}{\cos x}\right)\left(\frac{1}{\cos x}\right)dx+\frac{1}{3}\int \:\left(\:\tan x\right)\left(\frac{1}{\cos^2x}\right)dx$$
I know that for the first part, it is $$\frac{1}{3}\int \tan x\sec xdx$$ which is $$\sec x$$.
However, for the second part, wouldn't it be $$\frac{1}{3}\int \tan x \sec^2xdx$$
If I used $$u=\tan x$$ then $$du=\sec^2xdx$$ so wouldn't the answer be $$\frac{1}{6}\tan^2x$$
However, the book is saying that the second part is supposed to be $$\frac{1}{6}\sec^2x$$ because I was supposed to convert the second part into $$\frac{1}{3}\int \frac{\sin x}{\cos^3x}dx$$ and let $$u=\cos x$$
What I am doing wrong? Why can't it be $$\tan \sec^2x$$ instead of $$\sin x/\cos^3x$$?