Let $x^2\neq n\pi-1, n\in\mathcal{N}$, Then $$ \int x\sqrt{\frac{2\sin(x^2+1)-\sin2(x^2+1)}{2\sin(x^2+1)+\sin2(x^2+1)}}dx $$
$$ \int x\sqrt{\frac{2\sin(x^2+1)-\sin2(x^2+1)}{2\sin(x^2+1)+\sin2(x^2+1)}}dx=\int x\sqrt{\frac{1-\cos(x^2+1)}{1+\cos(x^2+1)}}dx\\ =\int x\Big|\tan\frac{(x^2+1)}{2}\Big|dx\\ \text{Set }t=\frac{(x^2+1)}{2}\implies dt=xdx\\ I=\pm\int \tan tdt=\pm\log|\sec(x^2+1)|+C $$
But my reference gives the solution $\log|\sec(x^2+1)|+C$, anyone confirm $\pm$ sign is relevant here ?
Do I not consider the domain and range of the functions in such problems ?
Although positive sign appears before the simple odd integrand function $$ \int 3 x\sqrt{1+x^2} dx $$ and its integral $ (1+x^2)^\frac32, $ the presence of $\sqrt{ }$ includes and implies the negative sign , so that we can use $\pm$ sign in front of the integral as well as the integrand.
The same is the case for integrands of general polynomial,trigonometric functions of such given integrands in general irrespective of function domain and range.