Is the integral of $\sin(2x)$ equal to both $\sin^2(x)+C$ and $\frac{1}{2}\cos(2x)+C$? This morning I encountered the integral $\int \sin(2x)$. My initial approach to solving it went something like this:

$\int \sin(2x)\ dx=\int 2\sin(x)\cos(x)\ dx$ (by the $\sin(2x)=2\sin(x)\cos(x)$ identity)

Let $u=\sin(x)$ and it's derivative $\frac{du}{dx}=\cos(x)$ 

Rewrite the integral with respect to $u$ and take out the constant:$\int 2u\ du = 2 \int u\ du$

Solve using the power rule: $2\int u\ du = 2 \cdot \frac{u^2}{2}+C = u^2 + C$

Resubstitute in terms of $x$: $\sin^2(x)+C$

I then tried to verify my results using various integral calculators (namely Wolfram Alpha), but they gave me the result $\frac 12\cos(2x)+C$, which does make sense if you instead of using the trigonometric identity just pick your subsitution to be $u=2x$. Graphing the results however shows this:
 It's quite clear that these results aren't equal to each other, no matter how you adjust the constants.

My question is, what is going on here? How come integrating the same functions using two different approaches yields results that are not the same function?
Lord Shark the Unknown spotted my mistake in the comments. The problem was that I had missed a minus sign when reading from Wolfram Alpha. The actual answer was $$\int \sin(2x)\ dx = -\frac{1}{2} \cos(2x)+C=\sin^2(x)+C$$ This makes the two solutions equal.
$$(\sin^2x)'=2\sin x\cos x=\sin 2x,$$

$$\left(\frac12\cos2x\right)'=-\sin 2x.$$