practicecalculus
Trigonometric integrals

Integral of csc x: Formula, Derivation and Examples

The integral of csc x is -ln|csc x + cot x| + C, also written ln|csc x - cot x| or ln|tan(x/2)|. See the derivation, why the forms agree and examples.

Trigonometric integrals Updated 2 min read

At a glance

\int \csc x\,dx = -\ln\lvert\csc x + \cot x\rvert + C
Antiderivative
-\ln\lvert\csc x + \cot x\rvert + C
Equivalent form
\ln\lvert\csc x - \cot x\rvert + C
Half-angle form
\ln\left\lvert\tan\dfrac{x}{2}\right\rvert + C
Method
Multiply by \dfrac{\csc x + \cot x}{\csc x + \cot x}
From π/3 to π/2
\dfrac{1}{2}\ln 3 \approx 0.549
On this page
  1. Graph of csc x and the area under it
  2. Derivation, step by step
  3. Why the three forms are equal
  4. Check by differentiating
  5. Definite integrals
  6. Substitution variants
  7. Common mistakes

The integral of \csc x is -\ln\lvert\csc x + \cot x\rvert + C. It is the cosecant twin of the integral of sec x, and it is derived with the same trick.

\int \csc x\,dx = -\ln\lvert\csc x + \cot x\rvert + C = \ln\lvert\csc x - \cot x\rvert + C

Graph of csc x and the area under it

Area under y = csc x from π/3 to π/2, with the antiderivative y = ln|tan(x/2)|
The shaded area is \frac{1}{2}\ln 3 \approx 0.549. The dashed antiderivative crosses zero at x = \frac{\pi}{2}, where \tan\frac{\pi}{4} = 1.

Derivation, step by step

  1. Multiply by \frac{\csc x + \cot x}{\csc x + \cot x}: \int\csc x\,dx = \int\frac{\csc^2 x + \csc x\cot x}{\csc x + \cot x}\,dx
  2. Let u = \csc x + \cot x. Using the derivative of csc x and the derivative of cot x: du = (-\csc x\cot x - \csc^2 x)\,dx = -(\csc^2 x + \csc x\cot x)\,dx
  3. So the numerator is -du, and the integral is \int\frac{-du}{u} = -\ln\lvert u\rvert + C.
  4. Substitute back: -\ln\lvert\csc x + \cot x\rvert + C.

Why the three forms are equal

First, (\csc x + \cot x)(\csc x - \cot x) = \csc^2 x - \cot^2 x = 1. So

-\ln\lvert\csc x + \cot x\rvert = \ln\frac{1}{\lvert\csc x + \cot x\rvert} = \ln\lvert\csc x - \cot x\rvert

Second, \csc x - \cot x = \frac{1 - \cos x}{\sin x}, and the half-angle identity says \frac{1 - \cos x}{\sin x} = \tan\frac{x}{2}. That gives \ln\left\lvert\tan\frac{x}{2}\right\rvert.

Check by differentiating

Use the form \ln\lvert\csc x - \cot x\rvert:

\frac{d}{dx}\ln\lvert\csc x - \cot x\rvert = \frac{-\csc x\cot x + \csc^2 x}{\csc x - \cot x} = \frac{\csc x(\csc x - \cot x)}{\csc x - \cot x} = \csc x \checkmark

Definite integrals

At x = \frac{\pi}{2}: \csc - \cot = 1 - 0 = 1, so the antiderivative is \ln 1 = 0. At x = \frac{\pi}{3}: \csc - \cot = \frac{2}{\sqrt{3}} - \frac{1}{\sqrt{3}} = \frac{1}{\sqrt{3}}. So

\int_{\pi/3}^{\pi/2}\csc x\,dx = 0 - \ln\frac{1}{\sqrt{3}} = \frac{1}{2}\ln 3 \approx 0.549

The integral from 0 to anything diverges, because \csc x has a vertical asymptote at x = 0 and \ln\tan\frac{x}{2} \to -\infty.

Substitution variants

\int\csc(ax + b)\,dx = \frac{1}{a}\ln\lvert\csc(ax + b) - \cot(ax + b)\rvert + C

Example 1. \int\csc(3x)\,dx = \frac{1}{3}\ln\lvert\csc 3x - \cot 3x\rvert + C.

Example 2. \int\frac{dx}{2\sin x\cos x} = \int\frac{dx}{\sin 2x} = \int\csc(2x)\,dx = \frac{1}{2}\ln\lvert\tan x\rvert + C, using the half-angle form with \frac{2x}{2} = x.

Example 3. \int\frac{\cos x}{\sin x}\,dx looks similar, but it is the integral of cot x, which equals \ln\lvert\sin x\rvert + C.

Common mistakes

  1. Answering -\csc x\cot x. That is the derivative of \csc x.
  2. Losing the minus sign in front of \ln\lvert\csc x + \cot x\rvert. Its derivative would then be -\csc x.
  3. Mixing the forms. -\ln\lvert\csc x - \cot x\rvert is wrong: the minus sign goes with the plus inside, and vice versa.
  4. Answering -\cot x. That is the integral of \csc^2 x, not \csc x.

Practise with trig integral problems.

Practice it now

Powers of sine and cosine

Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.

Practice this lesson

Frequently asked questions

What is the integral of csc x?

The integral of \csc x is -\ln\lvert\csc x + \cot x\rvert + C, which equals \ln\lvert\csc x - \cot x\rvert + C.

Why do -ln|csc x + cot x| and ln|csc x - cot x| agree?

(\csc x + \cot x)(\csc x - \cot x) = \csc^2 x - \cot^2 x = 1, so \csc x - \cot x = \frac{1}{\csc x + \cot x}. Taking logs turns the reciprocal into a minus sign.

What is the integral of 1/sin x?

Since \frac{1}{\sin x} = \csc x, it is \ln\left\lvert\tan\frac{x}{2}\right\rvert + C, or any of the equivalent forms.

What is the integral of csc(3x)?

It is \frac{1}{3}\ln\lvert\csc 3x - \cot 3x\rvert + C.

Written by the PracticeCalculus team

We build interactive calculus lessons and write every page to be clear and correct. Spotted something off? Tell us and we will fix it.