[Math] see $\sqrt{\sin^2\theta}=\sin\theta$ in integration solutions

indefinite-integralsintegrationtrigonometry

I am trying to integrate:

$$\int x \sqrt{-x^2+6x-8} \ dx $$

After a substitution $x-3=\cos \ \theta$, I got that the integral written above is equal to:

$$\int (\cos \ \theta +3)\sqrt{\sin^2 \ \theta}(-\sin \ \theta \ d\theta)$$

I see often in problem solutions on the internet, that you write $\sin \ \theta$ instead of the square root above. After that step, integration is something I know how to do.

My question is stated in the question topic. Why can we say that the square root is equivalent to $\sin$? Can't the $\sin$ be negative?

Could you provide me with an explanation? Cheers.

Best Answer

This is because to be able to go back to the original variable, you have to use a bijective change of variable. Setting $x-3=\cos\theta$ does not define a bijection. It does if you restrict $\theta$ to the interval $[0,\pi]$, for instance, i.e. if you set $\theta=\arccos(x-3)$.