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

I=∫cot(x)dx

## Homework Equations

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

## 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:

## Answers and Replies

Related Calculus and Beyond Homework Help News on Phys.org
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.

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.
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??

You better check again..I don't think I've done any sign-related mistake..
Yes you did. Try this again.

Yes you did. Try this again.
**** ..srry mate..hope I can delete the post :shy:

HallsofIvy
Homework Helper
For one obvious point, cos(x) is NOT -(sin(x))'.

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?

SammyS
Staff Emeritus
Homework Helper
Gold Member

I=∫cot(x)dx

## Homework Equations

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

## 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??
This integration can be done using substitution.

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

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

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