# Anomalous integral

1. Apr 15, 2012

### catellanos

1. The problem statement, all variables and given/known data
I need to calculate $$\int_0^{2\pi} \sqrt{1-\sin{x}}\, dx$$ when I compute the indefinite integral I get $$2\sqrt{\sin{x}+1}+C$$ but when I evaluate it into the integration limits it turns out to be 0 wich doesn't make sence since the original function is clearly positive...I already tested this result in wolfram alpha and my calculation of the definite integral is perfect but when I tested the definite integral wolfram computed its value to be $$4\sqrt{2}$$. I can't find out what's wrong with my procedure. Please help!

2. Relevant equations

3. The attempt at a solution

Last edited: Apr 15, 2012
2. Apr 15, 2012

### Hernaner28

The indefinite integral you computed is not right I guess. Wolfram Alpha shows that but when I do it in Derive I get another thing which verifies the result 4sqrt2...

This is what I get (no idea what floor is, guess it's the function?)

$$\frac{{2\cos x}}{{\sqrt {1 - \sin x} }} - 4\sqrt 2 \cdot FLOOR\left( {\frac{1}{4} - \frac{x}{{2\pi }}} \right)$$

Last edited: Apr 15, 2012
3. Apr 15, 2012

### SrEstroncio

@Hernaner28
Floor's not even a continuous function, much less differentiable that cant possibly be a primitive for $\sqrt{1-\sin{x}}$.

4. Apr 15, 2012

### Dick

When you computed the antiderivative you replaced $\sqrt{\cos^2 x}$ with $\cos x$. That's only correct if cos(x) is positive. cos(x) isn't positive on [0,2pi]. I'd suggest you split the integral up.

5. Apr 16, 2012

### catellanos

Thank you very much guys, your contributions were very valuable; particularly thank you Dick, with your observation I solved my trouble