# Why the integral of $\sin x\cos x$ has two results [duplicate]

when I integrate $\sin x \cos x$ using $u$ substitution I'm getting $\frac{1}{2}\sin^2 x$ and $-\frac{1}{2}\cos^2 x$, I cannot identify the relationship here

• $\int f(x)dx=F(x) + \color{red}{C}$. The two answers are different by a constant. – Quang Hoang Mar 1 '16 at 3:10
• I assume the sign is being affected by the possible values of C, is it right? – Christian Andrews Mar 1 '16 at 3:13
• $\frac 1 2 - \frac 1 2\cos^2 x = \frac 1 2\sin^2 x$. – Friedrich Philipp Mar 1 '16 at 3:15
• @ChristianAndrews $\sin^2x+\cos^2x=1$ implies $\sin^2x=-\cos^2x+1$, so the switch in sign is not in error (try graphing it if you are unconvinced) – Peter Woolfitt Mar 1 '16 at 3:15
• God, now I get it, thanks guys @PeterWoolfitt Friedrich Quang – Christian Andrews Mar 1 '16 at 3:21