1. Oct 30, 2005

### samh

Hey guys, I'm having trouble solving this definite integral. I'm doing work with polar equations and I was led to this:

which I simplified to

And, using the trig identity cos(x)^2 = (1 + cos(2x))/2, I got this

Which then simplifies down to 0. But that is the wrong answer. I know for a fact that the answer is 8. Even Mathematica says the answer is 8. I'm pretty sure my problem lies in the step where I removed the square root, but I don't see what exactly I did wrong. Why is it wrong, and what can I do to evaluate this integral correctly? Thankyou to anyone who helps.

Last edited: Oct 30, 2005
2. Oct 30, 2005

### Tide

Rewrite the original integral as 4 times the integral from 0 to pi/2 which you can justify from the properties of sine and cosine - that should avoid confusion.

3. Oct 30, 2005

### samh

But the integral from 0 to pi/2 is 2*sqrt(2). 4 times that equals 8*sqrt(2). edit: nevermind, I see what you were saying.

Is there a way to do this problem without changing the bounds? I mean since the cosine function is negative from pi/2 to 3pi/2 isn't there a way to rewrite the integral as two or more integrals or something? My teacher did this on the board but I cannot remember what he did, he talked too fast.

Edit: but a big part of what I'm really trying to figure out is why that last step is wrong. It seems like it works just perfectly. I know it has something to do with cosine being negative but why does that affect it? Doesn't the fact that it's being squared make a difference?

Last edited: Oct 30, 2005
4. Oct 30, 2005

### benorin

$\sqrt{(1+\cos(x))^2+(-\sin(x))^2}=\sqrt{1+2\cos(x)+\cos^2(x)+\sin^2(x)}=\sqrt{2+2\cos(x)}$
no square on the cosine.

5. Oct 30, 2005

### samh

Hmm I don't really understand the point you're making... Argh I'm stupid. Okay I'm going to switch the topic to a new problem that focuses more directly on the problem I'm having. This will help me explain to you guys the trouble I'm having.

Consider this integral:

Now, if I change sqrt(cos(x)^2) to just cos(x) and continue from there, I end up with 0. But the correct answer is 2. I know it is 2 because Mathematica told me so (heh).

Why does that method fail me? I know it has something to do with the fact that sqrt(x^2)=|x|, but I just can't make the connection. I know I can just change the bounds to 0 to pi/2 and then just multiply the result by 2 but I want to understand why the method I showed does not work. I can't intuitively see why this is giving me a wrong answer. My brain is totally failing me. I keep thinking the squaring of the cosine makes the negative go away but something is obviously happening behind the scenes I am not understanding...

6. Oct 30, 2005

### mathmike

because d/dx[x^n] = n*x^(n-1)

so cos[x]^2 = ????

7. Oct 31, 2005

### samh

The derivative of cos2(x) is -2cos(x)sin(x) but I don't see what you're trying to tell me...

But anyway thanks for your help guys. I just now finally succeeded in getting myself to really understand the error and why it is happening. I just sat down for a while and studied the graphs of sqrt(cos2(x)) and cos(x) and wrote my thoughts down on a piece of paper a few times and it finally made sense.