# Integration problem ?

1. Oct 23, 2007

### ngkamsengpeter

1. The problem statement, all variables and given/known data
$$\int^{0}_{-\pi}\sqrt{1-cos^{2} x}$$

2. Relevant equations

3. The attempt at a solution
I substitute into (sin x)^2 and get an answer of -2 but the answer should be 2 . how to i do this question.
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. Oct 23, 2007

### cristo

Staff Emeritus
How do you get an answer of -2? Perhaps you should show your work.

3. Oct 23, 2007

### ngkamsengpeter

just substitute (sin x)^2 and become sqr((sin x)^2) and then become sin x and substitute the limit from -pi to 0 get -2

4. Oct 23, 2007

### cristo

Staff Emeritus
You need to integrate sin(x) before you plug in the limits.

5. Oct 23, 2007

### ngkamsengpeter

I have integrate it into -cos x and plugin the limit , i got -2 .But the answer is 2 . How ?

6. Oct 23, 2007

### cristo

Staff Emeritus
So you have $$\left[-\cos(x)\right]^0_{-\pi}=cos(0)-cos(-\pi)$$. Can you evaluate that?

7. Oct 23, 2007

### jpr0

maybe you should be interpreting $\sqrt{\sin^2(x)}$ as $|\sin(x)|$

8. Oct 23, 2007

### sutupidmath

Last edited: Oct 23, 2007
9. Oct 24, 2007

### ngkamsengpeter

Then , how to integrate $|\sin(x)|$

10. Oct 24, 2007

### HallsofIvy

Staff Emeritus
For x between $-\pi$ and 0, sin(x)< 0. In that range, |sin(x)| is just -sin(x). Integrating that will obviously give you the negative of your previous answer.

11. Oct 24, 2007

### transgalactic

but ((sin x)^2 )^0.5 gives us two answers

sinx and -sinx

???

12. Oct 24, 2007

### sutupidmath

yeah, generally it does, but look here we are only integrating in [-pi.0], and obviously sinx, where x is from [-pi,0] is always negative, so

I sin(x) I = -sinx, whenever x is from the interval [-pi. 0]
now as halls said, integrating this you will get the desired answer.

13. Oct 25, 2007

### ngkamsengpeter

But i use mathematica to integrate , it shows -Cot x ((Sin x)^2)^(1/2)
How to integrate to get this form ?

14. Oct 25, 2007

### HallsofIvy

Staff Emeritus
Why would you want to? This is a definite integral. The result is a number. The integrand reduces to |sin(x)| which, for $-\pi\le x\le 0$ is -sin(x). That's easy to integrate.

I've never used mathematica and what you give makes me glad I haven't! It's clearly using some general algorithm and then not recognizing that, since $(sin^2(x))^(1/2)$ is |sin(x)|, $-cot(x)(sin^2(x))^(1/2)= -(cos(x)/sin(x))(-sin(x))= cos(x)$.