Integral Partial Fractions and Wolfram Alpha

330 Views Asked by At

I am working on a problem involving partial fraction decomposition. I think I have the answer right, but Wolfram Alpha's answer is slightly different. I am curious why there is a difference from a technical standpoint.

The integral is:

$$\int\frac{2x + 3}{x^2 - x - 2}dx$$

For the partial fraction decomposition, I get:

$$\frac{\frac{7}{3}}{x - 2} + \frac{-\frac{1}{3}}{x + 1}$$

This is in agreement with Wolfram Alpha. However, when I integrate this, I get:

$$\frac{7}{3}\ln(x - 2) - \frac{1}{3}\ln(x + 1)$$

This is very similar to Wolfram Alpha's answer, except that they get:

$$\frac{7}{3}\ln(2 - x) - \frac{1}{3}\ln(x + 1)$$

While I had $\ln(x - 2)$ Wolfram Alpha transformed that to $\ln(2 - x)$ . Any ideas why?

Also, to test it out, I subtracted the two equations, and Wolfram Alpha showed that the real part was 0, but the imaginary part shifted, so I imagine that there is some technical rule involving imaginary numbers I failed to account for. Any ideas?

1

There are 1 best solutions below

0
On BEST ANSWER

Perhaps the following picture will shed some light:

enter image description here

The blue curve is the integrand $$\color{blue}{f(x) = \frac{2x+3}{x^2-x-2}}.$$ The orange curve is the antiderivative $$\color{orange}{\frac{7}{3} \log (2-x) - \frac{1}{3}\log (x+1)}.$$ The red curve is $$\color{red}{\frac{7}{3} \log (2-x) - \frac{1}{3}\log(-x-1)}.$$ The green curve is $$\color{green}{\frac{7}{3} \log (x-2) - \frac{1}{3} \log(x+1)}.$$ Note that each of the three antiderivatives shown are defined only on a contiguous interval over which the integrand does not have a discontinuity. All three such curves can be captured by writing the single expression $$\frac{7}{3} \log |x-2| - \frac{1}{3} \log |x+1| + C,$$ but it is important to understand that in general, each segment can be shifted by an arbitrary constant of integration and these do not need to be the same: so you could, for example, define $$F(x) = \frac{7}{3} \log |x-2| - \frac{1}{3} \log |x+1| + \begin{cases} C_1, & x < -1 \\ C_2, & -1 < x < 2 \\ C_3, & 2 < x, \end{cases}$$ and this would be an antiderivative of $f$ for all values for which $f$ is defined.


Incidentally, there are two logarithmic arguments and each one can take on one of two signs. So why have I written only three? What is the fourth option and why is it not plotted?