AP Calculus AB and BC

Integral of sin x cos x: Answer and Proof

The integral of sin x cos x with respect to x is (sin^2 x)/2 + C. Substituting u = sin x turns it into the integral of u, giving (sin^2 x)/2. An equal answer is -cos(2x)/4 + C, which differs only by a constant. Differentiating (sin^2 x)/2 returns sin x cos x.

sinxcosxdx=sin2x2+C\int \sin x\cos x\,dx = \frac{\sin^2 x}{2} + C

How to integrate sin x cos x by substitution

One factor is the derivative of the other, which is exactly what uu-substitution needs. Since ddxsinx=cosx\frac{d}{dx}\sin x = \cos x, let u=sinxu = \sin x and the cosxdx\cos x\,dx becomes dudu.

u=sinx,du=cosxdxu = \sin x, \quad du = \cos x\,dx

The integral collapses to the antiderivative of uu.

sinxcosxdx=udu=u22+C=sin2x2+C\int \sin x\cos x\,dx = \int u\,du = \frac{u^2}{2} + C = \frac{\sin^2 x}{2} + C

Check it by differentiating

Differentiate sin2x2\frac{\sin^2 x}{2} with the chain rule: 122sinxcosx=sinxcosx\frac{1}{2}\cdot 2\sin x\cdot \cos x = \sin x\cos x, the integrand.

Why three different answers are all correct

This integrand has more than one natural antiderivative, and they look nothing alike until you remember that antiderivatives are only defined up to a constant. Choosing u=cosxu = \cos x instead gives a second form.

sinxcosxdx=cos2x2+C\int \sin x\cos x\,dx = -\frac{\cos^2 x}{2} + C

A double-angle identity gives a third. Since sinxcosx=12sin2x\sin x\cos x = \frac{1}{2}\sin 2x, integrating directly gives:

sinxcosxdx=12sin2xdx=cos2x4+C\int \sin x\cos x\,dx = \int \frac{1}{2}\sin 2x\,dx = -\frac{\cos 2x}{4} + C

All three differ only by constants. Using cos2x=12sin2x\cos 2x = 1 - 2\sin^2 x, you get cos2x4=sin2x214-\frac{\cos 2x}{4} = \frac{\sin^2 x}{2} - \frac{1}{4}, and sin2x2\frac{\sin^2 x}{2} and cos2x2-\frac{\cos^2 x}{2} differ by 12\frac{1}{2}. On a graded response, any of the three earns full credit.

Common mistakes with the integral of sin x cos x

  • Reaching for parts. Integration by parts works but is a detour; one factor is the derivative of the other, so substitution is immediate.
  • Multiplying antiderivatives, as if sinxcosxdx=(cosx)(sinx)\int \sin x\cos x\,dx = (-\cos x)(\sin x). There is no product rule for integrals.
  • Calling two correct forms contradictory. sin2x2\frac{\sin^2 x}{2} and cos2x4-\frac{\cos 2x}{4} differ by a constant, so both are right; do not go hunting for an error.
  • Sign slip on the u=cosxu = \cos x route. Then du=sinxdxdu = -\sin x\,dx, and the minus must be carried, giving cos2x2+C-\frac{\cos^2 x}{2} + C.

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 x cos x?

It is sin2x2+C\frac{\sin^2 x}{2} + C. Let u=sinxu = \sin x so du=cosxdxdu = \cos x\,dx; the integral becomes udu=u22+C=sin2x2+C\int u\,du = \frac{u^2}{2} + C = \frac{\sin^2 x}{2} + C.

Why do I sometimes see -cos(2x)/4 as the answer?

Because sinxcosx=12sin2x\sin x\cos x = \frac{1}{2}\sin 2x, so integrating gives cos2x4+C-\frac{\cos 2x}{4} + C. This equals sin2x2+C\frac{\sin^2 x}{2} + C up to a constant, since cos2x4=sin2x214-\frac{\cos 2x}{4} = \frac{\sin^2 x}{2} - \frac{1}{4}. Both are correct.

Can I use u = cos x instead of u = sin x?

Yes. Then du=sinxdxdu = -\sin x\,dx, and carrying the minus gives sinxcosxdx=cos2x2+C\int \sin x\cos x\,dx = -\frac{\cos^2 x}{2} + C. It differs from sin2x2+C\frac{\sin^2 x}{2} + C by the constant 12\frac{1}{2}.