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=2sin2x+C
How to integrate sin x cos x by substitution
One factor is the derivative of the other, which is exactly what u-substitution needs. Since dxdsinx=cosx, let u=sinx and the cosxdx becomes du.
u=sinx,du=cosxdx
The integral collapses to the antiderivative of u.
∫sinxcosxdx=∫udu=2u2+C=2sin2x+C
Check it by differentiating
Differentiate 2sin2x with the chain rule: 21⋅2sinx⋅cosx=sinxcosx, 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=cosx instead gives a second form.
∫sinxcosxdx=−2cos2x+C
A double-angle identity gives a third. Since sinxcosx=21sin2x, integrating directly gives:
∫sinxcosxdx=∫21sin2xdx=−4cos2x+C
All three differ only by constants. Using cos2x=1−2sin2x, you get −4cos2x=2sin2x−41, and 2sin2x and −2cos2x differ by 21. 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). There is no product rule for integrals.
Calling two correct forms contradictory. 2sin2x and −4cos2x differ by a constant, so both are right; do not go hunting for an error.
Sign slip on the u=cosx route. Then du=−sinxdx, and the minus must be carried, giving −2cos2x+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 2sin2x+C. Let u=sinx so du=cosxdx; the integral becomes ∫udu=2u2+C=2sin2x+C.
Why do I sometimes see -cos(2x)/4 as the answer?
Because sinxcosx=21sin2x, so integrating gives −4cos2x+C. This equals 2sin2x+C up to a constant, since −4cos2x=2sin2x−41. Both are correct.
Can I use u = cos x instead of u = sin x?
Yes. Then du=−sinxdx, and carrying the minus gives ∫sinxcosxdx=−2cos2x+C. It differs from 2sin2x+C by the constant 21.