Solving indefinite integrals gives multiple answers. Are all those answers correct? While solving problems on indefinite integrals many a times I get answers which are different from those given in my text book's answer keys page. I then verify my solution steps to ensure that even my answer is correct.
Now my question is, Can it have different answers? If yes how can I ensure that all those different answers are correct?
 A: Indeed this will be the case when answers differ by a constant. An example where this is not so obvious is the integral of something like $1/(3x)$. By taking a third out of the integral you would get the result of $$\frac{\ln(x)}{3}+C,$$ but by multiplying the top by $3$, and multiplying the integral by $1/3$ you would get $$\frac{\ln(3x)}{3}+c.$$ These look starkly different however you may notice that $$ln(3x) = ln(x) + ln(3).$$ So the two answers do indeed differ by a constant. Of particular interest is the fact that if you differentiate both answers they will be the same.
A: Two factors may be in play: first, note that indefinite integrals always include an arbitrary constant, which means that different approaches may result in shifting the rest by a constant. For example, your book might say that the solution is $\sin(x) + c$, while your answer is $\sin(x) + 1 + c$; there's no difference, because the $c$ "eats" the $1$. It can be more cleverly disguised; as noted in Orange Peel's answer, $\ln(3x)$ and $\ln(x)$ differ only by a constant, $\ln(3)$, so if you get $\ln(3x)+c$ and your text says $\ln(x)+c$ you're still right.
The second factor is just plain old simplification. Especially when it comes to trigonometric expressions and logarithms, it's not always obvious when two expressions are the same; for example, $\sec^2(x)\cos(x) = \cos(x) + \tan(x)\sin(x)$. In doing an integral, using one approach might give you one expression, and another approach might give you another; both are right, but it's not immediately obvious that they're the same. This can be further complicated by the first factor; $\sec^2(x) = \tan^2(x) + 1$, so $\sec^2(x) + c$ and $\tan^2(x) + c$ are equivalent as solutions to an indefinite integral.
On the other hand, there are no cases in which an integral actually has two different solutions; they can only "look" different. For example, $x + c$ and $x^2 + c$ cannot both be solutions to the same integral, because $x$ and $x^2$ don't differ by a constant.
