A question regarding the constant of integration Consider the indefinite integral $\int\sin(2x) dx$. There appear to be three seemingly different answers once this integral is evaluated. These are $\frac{-1}{2} \cos(2x) + C$, $\sin^2(x) + C$ and $-\cos^2(x) + C$. This is because all three functions differ only by a constant and thus differentiating them yields $\sin(2x)$. Is it therefore simply a matter of convention which one we decide to choose? 
In a somewhat more artificial sense, one could say $\int\ 2x dx = (x+n)(x-n) + C$ for any $n \in  \mathbb{R}$. Why this is invalid makes more sense because we expand it and add $-n^2$ to $C$ which will give the accepted answer of $x^2 + C$ (the new $C$ is different, of course). Is this simply done for convenience? Can this rule be generalized/formalized in some way such that more tricky functions, in which the extra constant isn't quite as conspicuous as it is with basic polynomials, can be tackled?
 A: The principle behind the "$+C$" notation is that the value of an
antiderivative is really a class of functions.
Any two members of that class of functions differ by a constant.
Hence if $F(x)$ is a member of that class, then you can write any
other member of the class in the form $F(x) + C,$ where $C$ is
the appropriate constant.
In principle, any member of the class is on equal standing with any
other member, so I would say there is (in principle) no reason why you
must write $\int 2x\;dx = x^2 + C$ rather than (for example)
$\int 2x\;dx = (x^2 - 4) + C$.
In the case of an explicit constant term (such as $-4$), however,
it seems unnecessary to carry such a term through calculations
when there is already an arbitrary constant term $C$ in the formula.
So it seems unlikely that one would want to do so.
In the example of the multiple representations of $\int\sin(2x) \;dx$
which you gave, the same principle applies, but in this case,
where $\sin^2 x = -\cos^2 x + 1$, one would hardly want to
write $\int\sin(2x) \;dx = (-\cos^2 x + 1) + C$
just to make the answer "the same" as $\int\sin(2x) \;dx = \sin^2 x + C$;
one would more likely write $\int\sin(2x) \;dx = -\cos^2 x + C$,
since $-\cos^2 x$ is just as much a member of the
desired class of functions as $\sin^2 x$ is.
So congratulations on presenting a good example of what the
$\int f(x)\;dx = F(x) + C$ notation really means.
A: I think you are right in your second paragraph; the choice is simply for convenience. Based on your choice of form for the antiderivative you will get a different $C$, but once you specify a particular antiderivative (say by specifying that it pass through the point $(1,2)$ for instance), the actual result will be uniquely determined no matter which choice of equivalent algebraic form you have picked.
Also, by your reasoning in the second paragraph I would say that $\int 2x \,dx = (x+n)(x-n) + C$ is equally as valid as writing $x^2+C'$, provided one distinguishes $C$ and $C'$. As you say, they end up being the same thing, and as I mentioned above, the difference between how you write your antiderivative is virtually nil once you have selected an antiderivative.
A: It's correct, but a bit misleading, because your answer, $(x + n)(x - n) + C$ has two constants in it, but the two constants are not independent of one another. It looks like you have a sequence of functions parameterized by two variables ($n$ and $C$), but really it is only parametrized by one. 
For instance, say we define $f(x) = \int 2xdx$ and specify $f(0) = 1$. Then $(x - n^2 + C)|_{x=0} = 1$, so $-n^2 + C = 1$. Thus we can see here that the value of $C$ depends on the value of $n$ by $C = 1 + n^2$ (or visa versa). 
If you want to define an anti-derivative in a such a way that the constant is fixed, there are two standard ways. One is to specify a value at a point (like $f(0) = 1$ as above). No single point will create a "nice" result for every function (for example, for $f(x) = \int \sin(x) dx = -\cos(x) + C$ if $f(0) = 1$ then $C = 0$ and $f(x) = -\cos(x)$, but for $f(x) = \int \cos(x) dx = \sin(x) + C$ if $f(0) = 1$ then $C = 1$ and $f(x) = \sin(x) + 1$).
The other is to define use a definite integral, where one of the limits is a variable, like $$\int_0^x \sin(t) dt$$ (it's good practice to use a different variable inside the integral to avoid being confused). 
These two ways are really just the same thing. For example, the above integral is $-\cos(x) - -cos(0) = -\cos(x) + 1$. But if we compute $f(x) = \int\sin(x)dx = -\cos(x) + C$ with $f(0) = 0$ then $0 = -\cos(0) + C = -1 + C$, so $C = 1$, giving the same answer, $-\cos(x) + 1$ (and that always holds because if $f(x) = \int_0^xF(t) dt$ then $f(0) = \int_0^0F(t)dt = 0$). 
