AP Calculus AB and BC
Integral of cot x: Answer, u-Substitution, Mistakes
The integral of cot x is ln|sin x| + C. Since cot x = cos x / sin x, the substitution u = sin x gives du = cos x dx and turns the integral into the integral of 1/u du, which is ln|u| + C. The absolute value is required because sin x is negative on some intervals, and the answer must stay defined there too.
How to integrate cot x with a substitution
By definition , so rewriting is the whole first step. Once it is written that way, the numerator is exactly the derivative of the denominator, and that pattern is the signal for a substitution.
Let . Then , which is the numerator and the differential together, so nothing is left over.
Substituting collapses the integrand to the basic reciprocal form, whose antiderivative is the natural log of the absolute value.
Back-substitute to finish.
Check it by differentiating
The chain rule form with gives , which is the original integrand. Differentiating your answer is the fastest self-check on any substitution problem.
Why the absolute value is not optional
The antiderivative of is , not , because accepts only positive inputs. Here , and is negative on intervals such as . Writing would make the answer undefined on exactly the intervals where is perfectly well behaved.
The domain lines up neatly: is undefined precisely where , that is at for integer , and is undefined at the same points. So the formula is valid on each open interval between consecutive multiples of , and an antiderivative is only ever claimed on one such interval at a time.
A definite integral is fine as long as the interval stays inside one branch. For instance, on the sine never vanishes.
Do not integrate across a singularity
An integral such as is fine, but crosses , where the integrand blows up. Plugging the endpoints into there produces a number, and that number is meaningless. Check that everywhere on the interval before applying the Fundamental Theorem.
Where the integral of cot x shows up on the AP exam
This is a Unit 6 result (Integration and Accumulation of Change), which carries a weighting of 15 to 20 percent on both AB and BC. Specifically it is Topic 6.9, Integrating Using Substitution, and it is one of the standard examples of a substitution that turns a quotient into a logarithm.
The reusable idea is broader than this one integral. Any time the numerator is the derivative of the denominator, the same move applies and the answer is a log.
The companion result is , which comes from and picks up a minus sign because . Cotangent has no minus sign because the derivative of sine is a clean . Keeping those two straight is worth more points than memorizing either one alone.
- Free response: a -substitution step buried inside an accumulation or area problem, where or a quotient appears after simplification.
- Multiple choice: recognizing without being handed the word cotangent.
- BC only: the same log pattern reappears in partial fractions (Topic 6.12), where every piece integrates to a term.
Equivalent forms of the answer
Log identities let the same antiderivative be written several ways, and all of them are correct. If a solution key looks different from yours, check whether it is one of these before assuming you made an error.
The equality holds because , and of a reciprocal is the negative of the log. Some textbooks prefer the cosecant form so that the trig integrals of , , , and all read as logs of reciprocal functions.
Constants can hide differences
Two antiderivatives of the same function can differ by a constant and both be right. If you get , that equals , and the extra is absorbed into the arbitrary constant.
Common mistakes with the integral of cot x
- Dropping the absolute value. is undefined wherever , so it is not a valid antiderivative of on those intervals. Write .
- Copying the tangent sign. has a minus; does not. Track where the minus comes from, namely the derivative of the inside function.
- Confusing the integral with the derivative. , which has nothing to do with . Read the problem before reaching for a memorized formula.
- Reaching for integration by parts. Nothing here needs it; the integrand is already a quotient, and a substitution finishes in one line.
- Forgetting on an indefinite integral. AP readers deduct for it, and it is the cheapest point on the exam to lose.
- Evaluating a definite integral straight through . The integrand is undefined there, so the Fundamental Theorem does not apply and the resulting number is not the integral.
Every answer on this page is machine checked
An automated test differentiates the antiderivative above and confirms it returns the integrand. A wrong sign or a missing factor fails the build, so it cannot reach you.
Frequently asked questions
What is the integral of cot x?
. It comes from rewriting as and substituting , so that and the integral becomes .
Why does the integral of cot x need absolute value bars?
Because is defined only for positive inputs, while is negative on intervals such as . The antiderivative of is , so the bars keep the answer defined on every interval where itself is defined.
What is the difference between the integrals of tan x and cot x?
and . Tangent picks up a minus sign because , while cotangent does not, because .
Can I write the answer as negative ln of the absolute value of csc x?
Yes. Since , the identity gives . Both forms are correct and equally acceptable on the AP exam.
Is the integral of cot x on the AP Calculus AB exam?
Yes. It is a Unit 6 substitution result (Topic 6.9, Integrating Using Substitution) and appears on both AB and BC. Unit 6 carries a weighting of 15 to 20 percent on each exam.