# Why do I see $\sqrt{\sin^2\theta}=\sin\theta$ in integration solutions?

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.

• I would say $\sqrt{sin^2 \theta}=|sin \theta|$ – joefu Oct 25 '15 at 17:42
• This is obviously always true, but that's not what I wanted to know :) See the answers. – I want to make games Oct 25 '15 at 17:44

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)$.

• Oh, so in that case it's just because there's an interval on which cos gets all the necessary values and sin is only nonnegative? I think I get it! Do I understand this correctly? – I want to make games Oct 25 '15 at 17:39
• It's perfecly correct. Had you chosen the interval $[\pi,2\pi]$, you'd have had to to write $-\sin\theta$. – Bernard Oct 25 '15 at 17:48

$\sqrt{a^2}=|a|\ge0$ for real $a$

Actual substitution $\theta=\arccos(x-3)$

The principal value of $\theta$ lies in $[0,\pi]$

$\implies\sin\theta\ge0$

But you are free to choose other ranges of $\theta$ like $[\pi,2\pi]$ where $\sin\theta\le0$

If you substitute back the value of $\theta,$ you will reach at the same result.