I calculated the following on paper for the value of $\int \sec^4 x\,dx$.
$$\int \sec^4 x\,dx=\int \sec^2 x \sec^2 x\,dx=\int (\tan^2 x + 1)(\sec^2 x)\,dx.$$ Let $u = \tan x$, $du = \sec^2 x\,dx$ so \begin{align}\int \sec^4 x\,dx&=\int u^2 + 1\,du\\&=\frac{1}{3} u^3 + u + C\\&=\frac{1}{3} \tan^3 x + \tan x + C\\&=\frac{1}{3} (\tan x)(\tan^2 x + 1) + C\\&=\frac{1}{3} \tan x \sec^2 x + C\end{align}
Wolfram Alpha, however, gives $\int \sec^4(x)\,dx = \frac13(\cos(2 x) + 2) \tan(x) \sec^2(x) + C$. This is notably not equal to my solution.
According to the "step-by-step solution" from the Wolfram Alpha app, the reduction formula was used to produce $$\frac{1}{3}\tan x \sec^2 x + \frac{2}{3} \int \sec^2 x \,dx$$ then $$\frac{2}{3} \tan x + \frac{1}{3} \tan x \sec^2 x + C$$
Why does the reduction formula produce this added term compared to naive $u$-substitution?
This is because you made a slight error in $$\frac13\tan^3x+\tan x+C=\frac13\tan x(\tan^2x+3)+C\ne\frac13\tan x(\tan^2x+1)+C.$$ Then you get \begin{align}\frac13\tan x(\tan^2x+3)+C&=\frac13\tan x(\tan^2 x+1)+\frac23\tan x+C\\&=\frac13\tan x\sec^2x+\frac23\tan x\cos^2x\sec^2x+C\\&=\frac13\tan x\sec^2x+\frac23\tan x\cdot\frac{1+\cos2x}2\sec^2x+C\\&=\frac13\tan x\sec^2x(2+\cos2x)\end{align} as given in W|A.