# 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?

• Any two answers must differ by a constant. Note you could always check your proposed answer by differentiating it and seeing if it gives the integrand back. – David Mitra Jul 13 '14 at 13:32
• You can have answers which look different but which are identical. This can be the case with trigonometric or hyperbolic functions. But, as David Mitra commented, it is always a good practice to check you result differentiating it. – Claude Leibovici Jul 13 '14 at 13:35
• Here's an example for Claude Leibovici's comment: $$\int \frac{1}{\sqrt{1+x^2}}\, dx={\rm arcsinh}\left(x\right) = \log{(x+\sqrt{1+x^2})}$$ – gar Jul 13 '14 at 14:24
• In case of function over disconnected domain, your answer will be differ by a bunch of constant, each constant for each connected subset of the domain. – Gina Jul 19 '14 at 7:36

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.
• What does the last sentence refer to? When I differentiate $\frac{\ln(x)}3+C$ and $\frac{\ln(3x)}3+c$, I get the same thing. – Milo Brandt Jan 14 '16 at 20:49
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.