AP Calculus AB and BC

Integral of sin^2 x

The integral of sin squared x is x/2 minus sin(2x)/4, plus C. The power rule does not apply to sin^2 x, so rewrite the integrand with the power-reduction identity sin^2 x = (1 - cos(2x))/2 and integrate the two simple pieces separately.

sin2xdx=x2sin(2x)4+C\int \sin^2 x\,dx = \frac{x}{2} - \frac{\sin(2x)}{4} + C

The answer

sin2xdx=x2sin(2x)4+C\int \sin^2 x\,dx = \frac{x}{2} - \frac{\sin(2x)}{4} + C

The integrand sin2x\sin^2 x is defined for every real xx, and so is the antiderivative, so there is no domain restriction and no absolute value to carry.

Why the power rule does not work here

The power rule for integration raises the exponent on the variable of integration. In sin2x\sin^2 x the squared object is sinx\sin x, not xx, so writing sin3x3\frac{\sin^3 x}{3} is wrong. Differentiating that guess gives sin2xcosx\sin^2 x \cos x by the chain rule, which carries an extra factor of cosx\cos x that was never in the problem.

The tell

When a trig function is raised to an even power with no leftover factor to absorb into dudu, plain substitution stalls. That is the signal to change the integrand with an identity before integrating.

Step 1: apply the power-reduction identity

Start from the double-angle form of cosine that isolates sin2x\sin^2 x.

cos(2x)=12sin2xsin2x=1cos(2x)2\cos(2x) = 1 - 2\sin^2 x \quad \Longrightarrow \quad \sin^2 x = \frac{1 - \cos(2x)}{2}

The right side has no powers of a trig function at all. It is a constant minus a cosine, and both of those integrate directly.

Step 2: integrate term by term

sin2xdx=1cos(2x)2dx=121dx12cos(2x)dx\int \sin^2 x\,dx = \int \frac{1 - \cos(2x)}{2}\,dx = \frac{1}{2}\int 1\,dx - \frac{1}{2}\int \cos(2x)\,dx

The first integral is x2\frac{x}{2}. The second needs the substitution u=2xu = 2x, so du=2dxdu = 2\,dx and the integral picks up a factor of 12\frac{1}{2}.

12cos(2x)dx=12sin(2x)2=sin(2x)4\frac{1}{2}\int \cos(2x)\,dx = \frac{1}{2} \cdot \frac{\sin(2x)}{2} = \frac{\sin(2x)}{4}

Subtracting the second result from the first and attaching the constant of integration gives the answer.

sin2xdx=x2sin(2x)4+C\int \sin^2 x\,dx = \frac{x}{2} - \frac{\sin(2x)}{4} + C

Check by differentiating

Every antiderivative claim is verifiable in one line. Differentiate the result and the identity should run backwards.

ddx[x2sin(2x)4]=122cos(2x)4=1cos(2x)2=sin2x\frac{d}{dx}\left[\frac{x}{2} - \frac{\sin(2x)}{4}\right] = \frac{1}{2} - \frac{2\cos(2x)}{4} = \frac{1 - \cos(2x)}{2} = \sin^2 x

Watch the chain rule on the check

Differentiating sin(2x)\sin(2x) produces 2cos(2x)2\cos(2x), not cos(2x)\cos(2x). Dropping that factor of 2 is the single most common error when students verify this result, and it makes a correct answer look wrong.

Equivalent forms you will see

Applying sin(2x)=2sinxcosx\sin(2x) = 2\sin x \cos x to the answer produces a form that looks different but is the same function, not merely the same up to a constant.

x2sin(2x)4=x2sinxcosx2=xsinxcosx2\frac{x}{2} - \frac{\sin(2x)}{4} = \frac{x}{2} - \frac{\sin x \cos x}{2} = \frac{x - \sin x \cos x}{2}
  • x2sin(2x)4+C\frac{x}{2} - \frac{\sin(2x)}{4} + C, the standard textbook form
  • x2sinxcosx2+C\frac{x}{2} - \frac{\sin x \cos x}{2} + C, common when the problem later needs sinx\sin x and cosx\cos x separately
  • 12(xsinxcosx)+C\frac{1}{2}\left(x - \sin x \cos x\right) + C, the same thing factored

If a grader's key uses one form and your work uses another, convert with the double-angle identity rather than assuming one of them is wrong.

A definite integral example

Once the antiderivative is in hand, definite integrals follow from the Fundamental Theorem of Calculus. Over a half period the sine terms vanish at both endpoints.

0πsin2xdx=[x2sin(2x)4]0π=(π20)(00)=π2\int_0^{\pi} \sin^2 x\,dx = \left[\frac{x}{2} - \frac{\sin(2x)}{4}\right]_0^{\pi} = \left(\frac{\pi}{2} - 0\right) - (0 - 0) = \frac{\pi}{2}

Because sin(2x)\sin(2x) is zero at every integer multiple of π22\frac{\pi}{2} \cdot 2, the answer over any whole number of half periods reduces to half the width of the interval.

Where this sits in the AP course

The AP Calculus Course and Exam Description places antidifferentiation in Unit 6, Integration and Accumulation of Change, weighted 15 to 20 percent on both the AB and BC exams. The two topics this problem exercises are 6.9, Integrating Using Substitution, and 6.14, Selecting Techniques for Antidifferentiation.

The CED does not list trigonometric power reduction as a separate topic, so the exam-relevant skill is the one in 6.14: recognizing that the integrand has to be rewritten before any technique applies. That decision, not the algebra that follows, is what the free-response rubric rewards.

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 sin^2 x?

It is x/2 minus sin(2x)/4, plus C. Rewrite sin^2 x as (1 - cos(2x))/2 using the power-reduction identity, then integrate the constant and the cosine separately.

Why can I not integrate sin^2 x with the power rule?

The power rule applies when the variable of integration is the thing being raised to a power. Here the squared object is sin x. Guessing sin^3(x)/3 fails the derivative check, because differentiating it gives sin^2(x) cos(x), which has an extra factor of cos x.

Is x/2 - sin(x)cos(x)/2 + C also a correct answer?

Yes, and it is not merely correct up to a constant, it is the identical function. Since sin(2x) = 2 sin x cos x, sin(2x)/4 equals sin(x)cos(x)/2, so the two expressions agree at every x.

What is the integral of cos^2 x?

It is x/2 plus sin(2x)/4, plus C. The method is the same, using cos^2 x = (1 + cos(2x))/2. Only the sign of the sin(2x) term changes.

What is the average value of sin^2 x over a full period?

It is exactly 1/2. Integrating from 0 to 2 pi gives pi, and dividing by the interval width 2 pi gives 1/2. This is why the average of a squared sine wave is half its peak value.

Do I need u-substitution for this integral?

Only for the second piece. After the identity turns the integrand into (1 - cos(2x))/2, the constant integrates directly and cos(2x) needs u = 2x, which contributes the factor of 1/2 that produces sin(2x)/4.