Minus sign in logarithm of integral's solution I want to solve the following integral:
$
\int \frac{dp}{a(1-p)u-bp}
$
where $a$, $b$ and $u$ are some constants.
After integration I get:
$
p = -\frac{\log(-apu+au-bp)}{au+b} + C.
$
According to WolframAlpha it is equivalent to (citing precisely: "Which is equivalent for restricted $p$, $a$, $b$ and $u$ values to"):
$
p = -\frac{log(a(p-1)u+bp)}{au+b} + C,
$
or transforming it a bit, it is equivalent to:
$
p = -\frac{\log(apu-au+bp)}{au+b} + C.
$
So for some reasons a minus is "removed" from the logarithm. Could you please explain to me why?
 A: Hint: compute $D(\log(-x))$ and compare with $D(\log(x))$.
A: Both $\log x$ and $\log(-x)$ are antiderivatives of $1/x$.  The difference (at least when we restrict our attention to real numbers) is that $\log x$ is only defined when $x$ is positive, and $\log(-x)$ is only defined when $x$ is negative.  So your solution is correct for values of $p$, $a$, $b$, and $u$ such that $-apu+au-bp$ is positive, while WolframAlpha's solution is correct when it is negative.  You can get a single antiderivative of $1/x$ that works for all nonzero (real) values of $x$ by combining the two cases as $\log|x|$.
The story is somewhat clarified by considering complex numbers.  It turns out that $\log x$ can be defined when $x$ is a negative real, and its value is $\log (-x)+i\pi$ (remembering that $-x$ is now a positive real).  Since $i\pi$ is just a constant, this means that the expressions $\log x+C$ and $\log(-x)+C$ are actually equivalent, because you can absorb the $i\pi$ into the $C$ term.  So in this sense WolframAlpha's answer isn't actually any different from yours.
(Actually, when you consider complex numbers, a new complication arises, which is that $\log x$ is only defined up to integer multiples of $2\pi i$, similar to how $\arcsin x$ is only defined up to integer multiples of $2\pi$, but that's a longer story.)
A: \begin{align}
I &= \int \frac{dp}{a(1-p)u - b p}  = \frac{1}{au} \, \int \frac{dp}{1 - \left( 1 + \frac{b}{au}\right) p } \\
&= \frac{1}{au+b} \, \int \frac{dx}{1-x} \hspace{10mm} \text{where} \quad  x = \left(1+\frac{b}{au}\right) \, p \\
&= - \frac{1}{au + b} \, \int \frac{dx}{x-1} \\
&= - \frac{1}{au+b} \, \ln(x-1) \\
&= - \frac{\ln(au\, (1-p) + bp) - \ln(au)}{au+b}.
\end{align}  
