TITLE: Can an indefinite integral have multiple answers? (Besides the ' + C')
QUESTION [7 upvotes]: So I came across with this integral today in my midterm:
$$ \int \frac {\tan(\pi x)\sec^2(\pi x)}2 $$
And I got two correct answers:
$$\frac {\sec^2(\pi x)}{4\pi} +C$$
And
$$\frac {\tan^2(\pi x)}{4\pi} + C$$
The first one, I get it by substituting $u=\sec (\pi x)$ and the second one, by substituting $u=\tan (\pi x) $
I already differentiated both answers and got to the same integral, but my question is, if both answers are correct and if it were a definite integral, which answer should I use? Wouldn't they give different results?

REPLY [4 votes]: They wouldn't give different answers in a definite integral. Suppose that we want to find $\displaystyle\int_a^b f(x)\,dx$. Let $F(x)$ be one antiderivative of $f(x)$, and let $G(x)$ be another.  They differ by a constant, so $G(x)=F(x)+C$ for some constant $C$.
If you use $F(x)$ to evaluate the integral from $a$ to $b$, you get $F(b)-F(a)$.
If you use $G(x)$, you get $G(b)-G(a)$, that is, $(F(b)+C)-(F(a)+C)$. Simplify. The $C$'s cancel.