I had a test where I was asked this question. I integrated the function by taking $\tan x=u$ and then $\sec^2x \, dx=du$. I took $\sec(x) =\sqrt{1+u^2}$ and then using the basic formulas calculated the correct answer but my teacher didn't give me marks for my solution. Please explain me why. He gave me a zero.I can't post pictures otherwise I would have shown you
I got the answer $(\tan x\sec x-\log(\tan x+\sec x)/2$
Here the picture of my solution https://drive.google.com/file/d/1E9e1JoX_8C28h7k8uW6bBpoYZFy1LuCM/view?usp=drivesdk
\begin{align} \int\sec^3x\,dx &= \int\dfrac{1}{\cos^3x}\,dx \\ &= \int\dfrac{\cos x}{(1-\sin^2x)^2}\,dx \hspace{0.5cm};\hspace{0.5cm} \sin x=u\\ &= \int\dfrac{1}{(1-u^2)^2}\,dx \\ &= \dfrac{u}{2(1-u^2)}+\dfrac{1}{4}\ln\dfrac{1+u}{1-u}+C\\ &= \dfrac{u}{2(1-u^2)}+\dfrac{1}{4}\ln\dfrac{1+u}{1-u}+C\\ &= \dfrac{\sin x}{2\cos^2x}+\dfrac{1}{4}\ln\dfrac{1+\sin x}{1-\sin x}+C \end{align}