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.

∫sin⁡xcos⁡x dx=sin⁡2x2+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 ddxsin⁡x=cos⁡x\frac{d}{dx}\sin x = \cos x, let u=sin⁡xu = \sin x and the cos⁡x dx\cos x\,dx becomes dudu.

u=sin⁡x,du=cos⁡x dxu = \sin x, \quad du = \cos x\,dx

The integral collapses to the antiderivative of uu.

∫sin⁡xcos⁡x dx=∫u du=u22+C=sin⁡2x2+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 sin⁡2x2\frac{\sin^2 x}{2} with the chain rule: 12⋅2sin⁡x⋅cos⁡x=sin⁡xcos⁡x\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=cos⁡xu = \cos x instead gives a second form.

∫sin⁡xcos⁡x dx=−cos⁡2x2+C\int \sin x\cos x\,dx = -\frac{\cos^2 x}{2} + C

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

∫sin⁡xcos⁡x dx=∫12sin⁡2x dx=−cos⁡2x4+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 cos⁡2x=1−2sin⁡2x\cos 2x = 1 - 2\sin^2 x, you get −cos⁡2x4=sin⁡2x2−14-\frac{\cos 2x}{4} = \frac{\sin^2 x}{2} - \frac{1}{4}, and sin⁡2x2\frac{\sin^2 x}{2} and −cos⁡2x2-\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 ∫sin⁡xcos⁡x dx=(−cos⁡x)(sin⁡x)\int \sin x\cos x\,dx = (-\cos x)(\sin x). There is no product rule for integrals.
  • Calling two correct forms contradictory. sin⁡2x2\frac{\sin^2 x}{2} and −cos⁡2x4-\frac{\cos 2x}{4} differ by a constant, so both are right; do not go hunting for an error.
  • Sign slip on the u=cos⁡xu = \cos x route. Then du=−sin⁡x dxdu = -\sin x\,dx, and the minus must be carried, giving −cos⁡2x2+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 sin⁡2x2+C\frac{\sin^2 x}{2} + C. Let u=sin⁡xu = \sin x so du=cos⁡x dxdu = \cos x\,dx; the integral becomes ∫u du=u22+C=sin⁡2x2+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 sin⁡xcos⁡x=12sin⁡2x\sin x\cos x = \frac{1}{2}\sin 2x, so integrating gives −cos⁡2x4+C-\frac{\cos 2x}{4} + C. This equals sin⁡2x2+C\frac{\sin^2 x}{2} + C up to a constant, since −cos⁡2x4=sin⁡2x2−14-\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=−sin⁡x dxdu = -\sin x\,dx, and carrying the minus gives ∫sin⁡xcos⁡x dx=−cos⁡2x2+C\int \sin x\cos x\,dx = -\frac{\cos^2 x}{2} + C. It differs from sin⁡2x2+C\frac{\sin^2 x}{2} + C by the constant 12\frac{1}{2}.