# Integrating cot(x) by partswhat's wrong?

1. Aug 29, 2012

### abel_ghita

1. The problem statement, all variables and given/known data

I=∫cot(x)dx

2. Relevant equations

wht's wrong in this approach (integrating by parts)

3. The attempt at a solution

I=∫cot(x)dx=∫$\frac{cos(x)}{sin(x)}$dx=∫$\frac{-(sin(x))'}{sin(x)}$=$\frac{-sin(x)}{sin(x)}$-∫-sin(x)($\frac{1}{sin^2(x)}$)'dx=-1+∫sin(x)$\frac{-cos(x)}{(sin(x))^2}$=-1-∫$\frac{cos(x)}{sin(x)}$
⇔I+C=-1-I⇔I=-$\frac{1}{2}$ → I=C1??

Last edited: Aug 29, 2012
2. Aug 29, 2012

### voko

You have made a number of sign-related mistakes. You should have obtained I = 1 + I. This seems puzzling, but if you recall that any indefinite integral is defined up to an arbitrary constant, this is normal.

What this really means is that this technique cannot be used with this integral.

3. Aug 29, 2012

### abel_ghita

You better check again..I don't think I've done any sign-related mistake..tell me where!..and I don't think there's any problem regarding that's an indefinite integral..I'll add the constant, you're right..but any integral shoul depend on a variable, right??
well I know ∫cot(x) = -ln|sin(x)| ..yet wht's wrong with my approach??

4. Aug 29, 2012

### Whovian

Yes you did. Try this again.

5. Aug 29, 2012

### abel_ghita

**** ..srry mate..hope I can delete the post :shy:

6. Aug 29, 2012

### HallsofIvy

Staff Emeritus
For one obvious point, cos(x) is NOT -(sin(x))'.

7. Aug 29, 2012

### abel_ghita

yes, you're all right! sorry!

though..waht if we make it a definite integral..let's say between pi/6 and pi/3 (so we have no problem with the existance of cot in any point)..so we end up again with I=1+I..
wht does it mean?

8. Aug 29, 2012

### SammyS

Staff Emeritus
This integration can be done using substitution.

The secant & cosecant functions can be integrated using integration by parts.

9. Aug 29, 2012

### voko

When you do a definite integral, you get $$I = [1]_a^b + I = 1 - 1 + I = I$$

10. Aug 29, 2012

### abel_ghita

uh.. yes.. thanks a lot!!
it seems today i got some lack of attention..
Thanks again!!