<s>[INST] Calculating the integral $\int \frac{14x+1}{2-7x-4x^2} \, dx$ We have the following integral
$$
\int \frac{14x+1}{2-7x-4x^2} \, dx
$$
By factoring the denominator we get
$$
-\int \frac{14x+1}{4x^2+7x-2} \, dx = -\int \frac{14x+1}{(4x-1)(x+2)} \, dx
$$
And breaking into partial fractions
$$
-\int \frac{2}{4x-1} + \frac{3}{x+2} \, dx = -\int \frac{2}{4x-1} \, dx - \int \frac{3}{x+2} \, dx = - 2\int \frac{1}{4x-1} \, dx - 3 \int \frac{1}{x+2} \, dx
$$
Then by substituting (and resubstituting) we get
$$
- 2\int \frac{1}{4u} \, du - 3 \int \frac{1}{v} \, dv = -\frac{2}{4} \ln(u)-3 \ln (v)=-\frac{1}{2}\ln(4x-1)-3\ln (x+2)
$$
However, the expected result is
$$
-\frac{1}{2}\ln(1-4x)-3\ln (x+2)
$$
Have I made a mistake somewhere? If so, where?
 [/INST] Both results are correct because it's an indefinite integral.
The difference between the 2 results is just an imaginary constant (constant of integration): $$\frac{i \pi }{2}$$
</s>