practicecalculus
Trigonometric integrals

Integral of sin 2x: Formula, Derivation and Examples

The integral of sin 2x is -cos(2x)/2 + C. See the u-substitution, why sin² x + C and -cos² x + C are also correct, and worked definite integral examples.

Trigonometric integrals Updated 2 min read

At a glance

\int \sin 2x\,dx = -\frac{1}{2}\cos 2x + C
Antiderivative
-\dfrac{1}{2}\cos 2x + C
Also correct
\sin^2 x + C or -\cos^2 x + C
Method
u = 2x, du = 2\,dx
From 0 to π/2
1
General form
\int\sin(kx)\,dx = -\dfrac{1}{k}\cos(kx) + C
On this page
  1. Graph of sin 2x and its antiderivative
  2. Derivation with u-substitution
  3. Check by differentiating
  4. Three correct answers
  5. Definite integrals
  6. Worked examples
  7. Common mistakes

The integral of \sin 2x is -\dfrac{1}{2}\cos 2x + C. It is the integral of sin x with one extra step to handle the 2 inside.

\int \sin 2x\,dx = -\frac{1}{2}\cos 2x + C

Graph of sin 2x and its antiderivative

Area under y = sin 2x from 0 to π/2, with the antiderivative y = -cos(2x)/2
The shaded arch has area 1, half of the area under one arch of \sin x, because it is squeezed to half the width. The dashed antiderivative rises from -\frac{1}{2} to \frac{1}{2}.

Derivation with u-substitution

  1. Let u = 2x. Then du = 2\,dx, so dx = \frac{1}{2}du.
  2. Substitute: \displaystyle\int\sin 2x\,dx = \frac{1}{2}\int\sin u\,du.
  3. Integrate: \frac{1}{2}(-\cos u) + C.
  4. Put u = 2x back: -\frac{1}{2}\cos 2x + C.

The same steps give the general rule \int\sin(kx)\,dx = -\frac{1}{k}\cos(kx) + C. See the u-substitution rule.

Check by differentiating

\frac{d}{dx}\left(-\frac{1}{2}\cos 2x\right) = -\frac{1}{2}\cdot(-\sin 2x)\cdot 2 = \sin 2x \checkmark

The chain rule factor 2 cancels the \frac{1}{2}. The forward direction is on the derivative of sin 2x page.

Three correct answers

Using the double-angle identity \sin 2x = 2\sin x\cos x:

  • With u = \sin x, du = \cos x\,dx: \int 2u\,du = \sin^2 x + C.
  • With u = \cos x, du = -\sin x\,dx: \int -2u\,du = -\cos^2 x + C.

These look different from -\frac{1}{2}\cos 2x, but they are not. Since \cos 2x = 1 - 2\sin^2 x = 2\cos^2 x - 1:

-\frac{1}{2}\cos 2x = \sin^2 x - \frac{1}{2} = -\cos^2 x + \frac{1}{2}

So the three answers differ only by constants. That is allowed: the +C absorbs the difference. This also explains why the derivative of sin² x is \sin 2x.

Definite integrals

\int_0^{\pi/2}\sin 2x\,dx = -\frac{1}{2}\cos\pi + \frac{1}{2}\cos 0 = \frac{1}{2} + \frac{1}{2} = 1
\int_0^{\pi/4}\sin 2x\,dx = -\frac{1}{2}\cos\frac{\pi}{2} + \frac{1}{2} = \frac{1}{2}
\int_0^{\pi}\sin 2x\,dx = 0

For a definite integral, all three forms of the antiderivative give the same number, because the constant cancels when you subtract.

Worked examples

Example 1. \int(\sin 2x + \cos 2x)\,dx = -\frac{1}{2}\cos 2x + \frac{1}{2}\sin 2x + C.

Example 2. \int 6\sin 3x\,dx = 6\cdot\left(-\frac{1}{3}\cos 3x\right) + C = -2\cos 3x + C.

Example 3: sin 2x cos x. Rewrite as 2\sin x\cos^2 x and let u = \cos x:

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

Check: \frac{d}{dx}\left(-\frac{2}{3}\cos^3 x\right) = 2\cos^2 x\sin x = \sin 2x\cos x.

Example 4: sin 2x cos 2x. Use \sin 2x\cos 2x = \frac{1}{2}\sin 4x, so the integral is -\frac{1}{8}\cos 4x + C.

Common mistakes

  1. Answering -\cos 2x + C. You forgot the \frac{1}{2}. Its derivative is 2\sin 2x.
  2. Answering -2\cos 2x + C. That multiplies by 2, which is what differentiating would do.
  3. Thinking \sin^2 x is wrong because it differs from the book. Differentiate it: you get \sin 2x, so it is right.
  4. Writing 2\sin x for \sin 2x. \sin 2x = 2\sin x\cos x, not 2\sin x.

Practise on u-substitution problems.

Practice it now

U-substitution

Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.

Practice this lesson

Frequently asked questions

What is the integral of sin 2x?

The integral of \sin 2x is -\frac{1}{2}\cos 2x + C.

Why do I get sin² x when I integrate sin 2x?

If you write \sin 2x = 2\sin x\cos x and use u = \sin x, you get \sin^2 x + C. This is also correct, because \sin^2 x = \frac{1}{2} - \frac{1}{2}\cos 2x, which differs from -\frac{1}{2}\cos 2x only by the constant \frac{1}{2}.

What is the integral of sin 2x from 0 to π/2?

It is \left[-\frac{1}{2}\cos 2x\right]_0^{\pi/2} = \frac{1}{2} + \frac{1}{2} = 1.

What is the integral of 2 sin x cos x?

It is the same integral, since 2\sin x\cos x = \sin 2x. Any of -\frac{1}{2}\cos 2x, \sin^2 x or -\cos^2 x, plus C.

Written by the PracticeCalculus team

We build interactive calculus lessons and write every page to be clear and correct. Spotted something off? Tell us and we will fix it.