# 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.

Source: https://practicecalculus.com/integrals/sin-2x
Updated: 2026-11-06

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

## At a glance

- **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$

## Key takeaways

- The integral of $\sin 2x$ is $-\frac{1}{2}\cos 2x + C$.
- The factor $\frac{1}{2}$ undoes the $2$ that the chain rule produces when you differentiate $\cos 2x$.
- Since $\sin 2x = 2\sin x\cos x$, you can also get $\sin^2 x + C$ or $-\cos^2 x + C$. All three are correct.
- Different-looking answers to an indefinite integral can all be right if they differ by a constant.

The **integral of $\sin 2x$ is $-\dfrac{1}{2}\cos 2x + C$**. It is the [integral of sin x](/integrals/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

```graph
title: 'Area under y = sin 2x from 0 to π/2, with the antiderivative y = -cos(2x)/2'
caption: '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}$.'
x: [-0.5, 6.5]
y: [-1.5, 1.5]
functions:
  - expr: sin(2x)
    label: y = sin 2x
  - expr: -cos(2x)/2
    label: y = -cos(2x)/2 (antiderivative)
    dashed: true
shade: {expr: sin(2x), from: 0, to: 1.5708}
points:
  - [0, -0.5, '(0, -1/2)']
  - [1.5708, 0.5, '(π/2, 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](/rules/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](/derivatives/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](/derivatives/sin-squared-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-problems/u-substitution).

## 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$.
