AP Calculus AB and BC

Integral of csc x: Answer, Derivation, Mistakes

The integral of csc x is -ln|csc x + cot x| + C. You get it by multiplying the integrand by (csc x + cot x)/(csc x + cot x), which makes the numerator the derivative of the denominator, so the substitution u = csc x + cot x turns the problem into -du/u. It holds on any interval free of the points where sin x = 0.

cscxdx=lncscx+cotx+C\int \csc x\,dx = -\ln\left|\csc x + \cot x\right| + C

Why the integral of csc x is -ln|csc x + cot x|

Unlike csc2xdx\int \csc^2 x\,dx, this one is not a derivative rule read backwards. Nothing in your table differentiates to cscx\csc x, so the move is to rewrite the integrand until substitution (Topic 6.9, Integrating Using Substitution) applies. Multiply by a form of 11 chosen so the numerator becomes the derivative of the denominator.

cscxdx=cscxcscx+cotxcscx+cotxdx=csc2x+cscxcotxcscx+cotxdx\int \csc x\,dx = \int \csc x \cdot \frac{\csc x + \cot x}{\csc x + \cot x}\,dx = \int \frac{\csc^2 x + \csc x \cot x}{\csc x + \cot x}\,dx

Now let u=cscx+cotxu = \csc x + \cot x. From Topic 2.10 (Finding the Derivatives of Tangent, Cotangent, Secant, and/or Cosecant Functions), ddx[cscx]=cscxcotx\frac{d}{dx}\left[\csc x\right] = -\csc x \cot x and ddx[cotx]=csc2x\frac{d}{dx}\left[\cot x\right] = -\csc^2 x, so du=(cscxcotx+csc2x)dxdu = -\left(\csc x \cot x + \csc^2 x\right)dx. The numerator above is exactly du-du.

duu=lnu+C=lncscx+cotx+C\int \frac{-du}{u} = -\ln\left|u\right| + C = -\ln\left|\csc x + \cot x\right| + C

Check it by differentiating, which is how you should check every antiderivative. With u=cscx+cotxu = \csc x + \cot x, the chain rule gives ddx[lnu]=uu=cscxcotx+csc2xcscx+cotx=cscx(cotx+cscx)cscx+cotx=cscx\frac{d}{dx}\left[-\ln\left|u\right|\right] = -\frac{u'}{u} = \frac{\csc x \cot x + \csc^2 x}{\csc x + \cot x} = \frac{\csc x\left(\cot x + \csc x\right)}{\csc x + \cot x} = \csc x.

The minus sign is the whole difference from sec x

Compare secxdx=lnsecx+tanx+C\int \sec x\,dx = \ln\left|\sec x + \tan x\right| + C. The same trick produces both, but the cosecant derivatives each carry a minus sign, so the cosecant answer picks up the leading minus. Cofunction results in calculus almost always differ from their partners by exactly one sign.

Equivalent forms you may see

Three answers that look different are the same function, so a textbook, a solver, and your teacher can all be right at once. Since csc2xcot2x=1\csc^2 x - \cot^2 x = 1, the product (cscx+cotx)(cscxcotx)\left(\csc x + \cot x\right)\left(\csc x - \cot x\right) equals 11, which makes the two factors reciprocals and flips the sign of the logarithm.

lncscx+cotx+C=lncscxcotx+C=lntanx2+C-\ln\left|\csc x + \cot x\right| + C = \ln\left|\csc x - \cot x\right| + C = \ln\left|\tan\frac{x}{2}\right| + C

The half-angle version follows from cscxcotx=1cosxsinx=tanx2\csc x - \cot x = \frac{1 - \cos x}{\sin x} = \tan\frac{x}{2}. All three differentiate to cscx\csc x, and all three agree numerically on (0,π)\left(0, \pi\right), so use whichever your class writes. If a grader expects one form, convert with the identity rather than reworking the integral.

Where this integral shows up on the AP exam

Topic 6.8 (Finding Antiderivatives and Indefinite Integrals: Basic Rules and Notation) is where the memorized list lives, and cscxdx\int \csc x\,dx sits at the edge of it: the basic cosecant facts you are expected to recall instantly are csc2xdx=cotx+C\int \csc^2 x\,dx = -\cot x + C and cscxcotxdx=cscx+C\int \csc x \cot x\,dx = -\csc x + C. Unit 6 carries a weighting of 15 to 20 percent on both AB and BC.

Inside a composite, substitution puts the constant out front. With u=5xu = 5x and du=5dxdu = 5\,dx:

csc(5x)dx=15lncsc(5x)+cot(5x)+C\int \csc(5x)\,dx = -\frac{1}{5}\ln\left|\csc(5x) + \cot(5x)\right| + C

On a definite integral, both endpoints have to lie between consecutive zeros of sinx\sin x, since cscx\csc x blows up wherever sinx=0\sin x = 0. Both endpoints below sit inside (0,π)\left(0, \pi\right), so the Fundamental Theorem of Calculus applies.

π/6π/2cscxdx=[lncscx+cotx]π/6π/2=0+ln(2+3)1.317\int_{\pi/6}^{\pi/2} \csc x\,dx = \left[-\ln\left|\csc x + \cot x\right|\right]_{\pi/6}^{\pi/2} = 0 + \ln\left(2 + \sqrt{3}\right) \approx 1.317

It also arrives in Unit 7 through separable differential equations. Separating dydx=ysinx\frac{dy}{dx} = \frac{y}{\sin x} gives dyy=cscxdx\int \frac{dy}{y} = \int \csc x\,dx, so the solution carries this logarithm on both sides.

Common mistakes with the integral of csc x

  • Dropping the leading minus sign. Writing lncscx+cotx+C\ln\left|\csc x + \cot x\right| + C differentiates to cscx-\csc x, which is off by a factor of 1-1 on every problem that uses it.
  • Answering cotx-\cot x. That is csc2xdx\int \csc^2 x\,dx. The square is what makes that one immediate and this one require the rewrite.
  • Answering cscx-\csc x. That is cscxcotxdx\int \csc x \cot x\,dx, a different integrand.
  • Guessing lncscx\ln\left|\csc x\right| because the answer contains a logarithm. Only uudx\int \frac{u'}{u}\,dx produces lnu\ln\left|u\right|, and cscx\csc x is not the derivative of cscx\csc x over itself. Differentiating lncscx\ln\left|\csc x\right| gives cotx-\cot x, not cscx\csc x.
  • Multiplying by cscxcotxcscxcotx\frac{\csc x - \cot x}{\csc x - \cot x} and then mishandling the sign. That version works too and gives lncscxcotx+C\ln\left|\csc x - \cot x\right| + C, but the numerator then matches +du+du, so there is no leading minus.
  • Integrating across an asymptote. π/2π/2cscxdx\int_{-\pi/2}^{\pi/2} \csc x\,dx is not 00 by symmetry: the integrand is unbounded at x=0x = 0 inside the interval, so the Fundamental Theorem does not apply and the integral diverges.
  • Confusing it with cotxdx=lnsinx+C\int \cot x\,dx = \ln\left|\sin x\right| + C, which really is a uu\frac{u'}{u} integral and needs no trick.

Quick practice with csc integrands

  1. csc(5x)dx=15lncsc(5x)+cot(5x)+C\int \csc(5x)\,dx = -\frac{1}{5}\ln\left|\csc(5x) + \cot(5x)\right| + C, with u=5xu = 5x.
  2. xcsc(x2)dx=12lncsc(x2)+cot(x2)+C\int x\csc\left(x^2\right)dx = -\frac{1}{2}\ln\left|\csc\left(x^2\right) + \cot\left(x^2\right)\right| + C, with u=x2u = x^2 and du=2xdxdu = 2x\,dx.
  3. π/4π/2cscxdx=ln(1+2)0.881\int_{\pi/4}^{\pi/2} \csc x\,dx = \ln\left(1 + \sqrt{2}\right) \approx 0.881.
  4. π/3π/2cscxdx=12ln30.549\int_{\pi/3}^{\pi/2} \csc x\,dx = \frac{1}{2}\ln 3 \approx 0.549.
  5. csc2xdx=cotx+C\int \csc^2 x\,dx = -\cot x + C and cscxcotxdx=cscx+C\int \csc x \cot x\,dx = -\csc x + C, the two you should never have to derive.
  6. cotxdx=lnsinx+C\int \cot x\,dx = \ln\left|\sin x\right| + C, with u=sinxu = \sin x.

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

Is lncscx+cotx+C-\ln\left|\csc x + \cot x\right| + C the same as lncscxcotx+C\ln\left|\csc x - \cot x\right| + C?

Yes. Because csc2xcot2x=1\csc^2 x - \cot^2 x = 1, the quantities cscx+cotx\csc x + \cot x and cscxcotx\csc x - \cot x are reciprocals, and lnu=ln1u-\ln\left|u\right| = \ln\left|\frac{1}{u}\right|. Both differentiate to cscx\csc x, so both are correct antiderivatives.

Why do you multiply by cscx+cotxcscx+cotx\frac{\csc x + \cot x}{\csc x + \cot x}?

Because it manufactures a uu\frac{u'}{u} pattern. The numerator becomes csc2x+cscxcotx\csc^2 x + \csc x \cot x, which is exactly ddx[cscx+cotx]-\frac{d}{dx}\left[\csc x + \cot x\right], so u=cscx+cotxu = \csc x + \cot x turns the integral into duu\int \frac{-du}{u}. Nothing else about the integrand suggests substitution, which is why this one is memorized as a trick rather than discovered.

What is the difference between cscxdx\int \csc x\,dx and csc2xdx\int \csc^2 x\,dx?

They are unrelated in difficulty. csc2xdx=cotx+C\int \csc^2 x\,dx = -\cot x + C is a derivative rule reversed and takes no work. cscxdx=lncscx+cotx+C\int \csc x\,dx = -\ln\left|\csc x + \cot x\right| + C needs the multiply-by-one rewrite. Read the exponent before you start.

Where is lncscx+cotx-\ln\left|\csc x + \cot x\right| valid?

On any open interval where sinx0\sin x \neq 0, such as (0,π)\left(0, \pi\right). At every multiple of π\pi the integrand has a vertical asymptote, so one antiderivative cannot bridge two intervals and a definite integral whose limits straddle a multiple of π\pi diverges.