TITLE: Trig integral $\int ( \cos{x} + \sin{x}\cos{x}) \, dx $
QUESTION [7 upvotes]: Assume we have:
$$ \int (\cos{x} + \sin{x}\cos{x}) \, dx$$
Two ways to do it:
Use $$\sin{x}\cos{x} = \frac{ \sin{2x} }{2} $$
Then
$$ \int \left(\cos{x} + \frac{\sin{2x}}{2} \right) \, dx = \sin{x} - \frac{ \cos{2x} }{ 4 } + C. $$
The other way, just see that $ u = \sin(x), du = \cos(x)dx $,
$$ \int ( \cos{x} + \sin{x}\cos{x}) \, dx = \sin{x} + \frac{\sin^2{x}}{2} + C. $$
Now the part I don't see fully is, why aren't these results completely equal?
Taking the 2nd result,
\begin{align}
\sin{x} + \frac{\sin^2{x}}{2} &= \sin{x} + \frac{1}{2} \, \left( \frac{1 - \cos{2x}}{2} \right) \\
&= \sin{x} + \frac{1}{4} - \frac{\cos{2x}}{4}.
\end{align}
So you have to absorb $\frac{1}{4}$ into $C$ for them to be equal.
Shouldn't they be equal straight away?

REPLY [3 votes]: If you write 
$ \int{ \cos{x} + \frac{\sin{2x}}{2} dx }=\sin{x} - \frac{ cos{2x} }{ 4 } + C_1 $
and
$ \int{ \cos{x} + \sin{x}\cos{x} dx }= \sin{x} + \frac{\sin^2{x}}{2} + C_2 $, 
then you can see what's going on with the constants in your two cases($C_1$ and $C_2$). Being careful with choosing the notation is good for understanding.