<s>[INST] integrate sin(x). OK. I have a doubt with this: I know $-\cos(x) + k =\int \sin x\,dx$ but doing
$\sin(x)=2\sin\frac{x}{2}\cos\frac{x}{2}$ I get $\int \sin x\,dx = \int 2\sin\frac{x}{2}\cos\frac{x}{2}\,dx $ if $ u = \sin \frac{x}{2}$ then $du = \cos \frac{x}{2} \frac{dx}{2}$ then $$\int \sin x\,dx = \int 2\sin \frac{x}{2}\cos \frac{x}{2}\, dx =4\int \sin \frac{x}{2} \cos\frac{x}{2}\frac{dx}{2}=4\int u\,du= 4\frac{u^2}{2}= 2u^2 = 2\sin^2\frac{x}{2}$$ then if $\theta = \frac{x}{2} \rightarrow \cos 2\theta =-2\sin^2(\theta)+k \rightarrow \frac{\cos(2\theta)}{2}=\cos^2 \theta -1+\frac{k}{2} $ if $k=0$, then $$\frac{\cos 2\theta}{2}=\cos^2 \theta-1.$$ Now, why isn't it a trigonometric identity? or Is it? Because I think that I found one.
 [/INST] You mistakenly equate indefinite integrals, which is wrong. Keep in mind that indefinite integrals are defined up to a constant, and that "fixing" this constant the way you do makes no sense mathematically (an indefinite integral should be thought of a set of functions, not as a precise function).
</s>