Trig integral $\int ( \cos{x} + \sin{x}\cos{x}) \, dx $

Solution 1:

Your question boils down to this:

If $\int f(x) dx = F(x) + C$ and $\int f(x) dx = G(x) +C$ are both correct, then shouldn't it be true that $F(x)=G(x)$?

The answer is no. $\int f(x)dx=F(x) +C$ means that (on the relevant interval, in this case all of $\mathbb{R}$) every antiderivative of $f(x)$ has the form $F(x)+C$ for some constant $C$. The indefinite integral is really referring to a set of functions, namely all of the functions (on the relevant interval) whose derivatives equal $f(x)$. If $F'(x)=f(x)$, then that set can be written as $\{F(x)+C:C\in \mathbb{R}\}$. But the set of functions of the form $F(x)+C$ for some constant $C$ is precisely the same as the set of functions of the form $F(x)+22+C$ for some constant $C$, for instance. Explicitly, $\{F(x)+C:C\in\mathbb{R}\}=\{F(x)+22+C:C\in\mathbb{R}\}$. That is, if $F(x)$ and $G(x)$ only differ by a constant and $F(x)$ is an antiderivative of $f(x)$, then $\int f(x)dx=G(x)+C$ is also correct.

Solution 2:

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.