Use integration by partial fractions to find

Integral (3x^2-x+2)/(x-1)(x^2+1) dx

To find the integral of the function (3x^2 - x + 2)/((x - 1)(x^2 + 1)), we can use the method of partial fractions.

First, we factor the denominator into irreducible quadratic and linear factors:
(x - 1)(x^2 + 1) = (x - 1)(x - i)(x + i), where i is the imaginary unit.

Next, we write the fraction as a sum of simpler fractions with denominators equal to the factors of the denominator:
(3x^2 - x + 2)/((x - 1)(x^2 + 1)) = A/(x - 1) + B/(x - i) + C/(x + i)

Now, we need to find the values of A, B, and C by equating the numerators of the fractions:
3x^2 - x + 2 = A(x - i)(x + i) + B(x - 1)(x + i) + C(x - 1)(x - i)

To solve for A, B, and C, we can choose appropriate values of x that eliminate all but one term on the right-hand side of the equation.

Let's start by substituting x = 1 to eliminate the (x - 1) term:
3(1)^2 - (1) + 2 = A(1 - i)(1 + i) + B(1 - 1)(1 + i) + C(1 - 1)(1 - i)

4 = A(1 - i)(1 + i)

Now, we can choose x = i to eliminate the (x - i) term:
3(i)^2 - i + 2 = A(i - i)(i + i) + B(i - 1)(i + i) + C(i - 1)(i - i)

-1 + 2i = -2Bi - 2Ci

Lastly, we substitute x = -i to eliminate the (x + i) term:
3(-i)^2 - (-i) + 2 = A(-i - i)(-i + i) + B(-i - 1)(-i - i) + C(-i - 1)(-i + i)

-1 - 2i = -2Bi + 2Ci

Now we have three equations:

4 = A(1 - i)(1 + i)
-1 + 2i = -2Bi - 2Ci
-1 - 2i = -2Bi + 2Ci

We can solve this system of equations by substituting appropriate values for i and solving for A, B, and C.