I have trouble calculating calculating this integral: $ \int \cos(x) \sqrt{1+\sin^2(x)} dx$.
I tried to use subsitution $t=\sqrt{1+\sin^2(x)}$ and got $\int \frac{(2-t^2)\sqrt{t^2-1}}{t} dt$ but I'm not sure it's correct and I don't know how to proceed from there.