I was trying to find the antiderivative of a function $$\int \tan^3(x)\,dx$$ However, due to substitution differences, my book has a answer of $$\frac12\tan^2(x)+\ln(\cos x)+C$$ while I got an answer $$\frac12\sec^2(x)+\ln(\cos x)+C$$
The problem is what to substitute in $\int \tan x \sec^2 x dx$. The book puts $\tan x = z$, while I put $\sec x = z$. I don't know if both are correct. If they are, can all functions have multiple antiderivatives?
They are both correct and the fact that there are two of them is not a problem, since their difference is constant ($1+\tan^2\theta=\sec^2\theta$).