# Can an indefinite integral have multiple answers? (Besides the ' + C')

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?

-
In the last formula replace your $C$ with ${1\over {4\pi}}+K$, which is just another constant. Now use the trig identity mentioned below. You see that you get the other answer. – Maesumi Mar 4 '13 at 22:26

In your case, the difference between the two is a constant:

$$\sin^2 x + \cos^2 x = 1$$

so

$$\tan^2 x + 1 = \sec^2 x$$

In general, that will be true as well - integration can only be different up to a constant: consider $g = \int f = h$ and note that $g-h = \int f - \int f = \int 0 = const$.

-
That doesn't answer my question in case it wasn't an indefinite integral. – ChairOTP Mar 4 '13 at 22:23
@ChairOTP: In case it was a definite integral, the extra $1$ in the $\sec^2$ answer for the upper limit would be canceled by the extra $1$ in the $\sec^2$ answer for the lower limit. – robjohn Mar 4 '13 at 22:26
@ChairOTP Fro definite integrals, you would get a constant adjustment factor, i.e. answers would be either $\sec^2 x$ or $\tan^2 x +1$, and in definite integrals, the constant would matter -- same answer would result either way. – gt6989b Mar 4 '13 at 22:26
Thank you so much :) – ChairOTP Mar 4 '13 at 22:28
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.