Evaluate the indefinite integral of

InT(-x^3+9x^2-3x+2)/(x^4-2x^3)

I got ((1-2x)/(2x^2))+3*ln(2-x)-4*ln(x)
but apparently that's not the answer...

The answer is correct, except that you need to take te absolute value of all the arguments of the logarithms, so

ln(x) should be ln|x|

ln(2-x) should be ln|2-x| = ln|x-2|

And there is, of course, an integration constant.

The following method is easier, doesn't involv solving equations, and it is more error proof than the traditional method:

The integrand is:

f(x) = (-x^3+9x^2-3x+2)/(x^4-2x^3)

The numerator can be factored as:

x^4-2x^3 = x^3 (x-2)

f(x) thus has singularities at x = 2 and x = 0. The series expansion of f(x) around these points starts with singular terms. Of the expansion around x = 2, only the first term is singular:

f(x) = (-x^3+9x^2-3x+2)/[x^3 (x-2)] =

1/(x-2) (-x^3+9x^2-3x+2)/x^3

Then we need to expand

(-x^3+9x^2-3x+2)/x^3

in powers of (x - 2 ), but we only need the constant term as higher powers pultiplied by 1/(x-2) are non-singular. But this is simply the value at x = 2, which is 3.

So, the singular part of f(x) near x = 2 is

s(x) = 3/(x-2)

Similarly, f(x) has a singularity at x = 0, and we can compute the singular part of the expansin there, which will be some function r(x). Let's skip this part and see how that would solve the problem. Consider the function

g(x)= f(x) - s(x) - r(x)

Clearly g(x) is a rational function, but it doesn't have any singularities, so it must be a polynomial. Now the degree of the numerator of f(x) is less than the degree of the denominator so for x to infinity, f(x) tends to zero.
s(x) and r(x) also tend to zero for x to infinity.

This means that the limit if x to infinity of g(x) is zero. But the x to infinity limit of a polynomial in x can only be zero if the polynomial is identically zero. So, g(x) = 0, and we have:

f(x) - s(x) - r(x) = 0 ---->

f(x) = s(x) + r(x)

This is then the desired partial fraction expansion, except that we haven't calculated r(x) yet.

We can avoid computing r(x) via the expansion around x = 0 (which is more work than computing s(x), because the expansion starts with 1/x^3, so we need to expand the factor multiplying /x^3 to second order in x to obtain all singular terms) as follows. We can write:

r(x) = f(x) - s(x) =

(-x^3+9x^2-3x+2)/[x^3 (x-2)] - 3/(x-2) =

(-4x^3+9x^2-3x+2)/[x^3 (x-2)]

Te numerator must be divisible by (x-2), because r(x) is not singular there:

-4x^3+9x^2-3x+2 =

-4 x^3 + 8 x^2 - 8 x^2 + 9x^2-3x+2 =

-4 x^3 + 8 x^2 + x^2 - 3 x + 2 =

-4 x^2 (x-2) + (x-1)(x-2) =

(x-2) (-4 x^2 + x-1)

So, we have:

r(x) = (-4 x^2 + x-1)/x^3 =

-1/x^3 + 1/x^2 -4/x

Therefore:

f(x) = s(x) + r(x) =

3/(x-2) -1/x^3 + 1/x^2 -4/x

And integrating yields the same answer.

So, we didn't need to solve any equations, and mistakes in computations don't propagate. E.g. we don't need to check whether s(x) has been correctly computed, because using the s(x) we obtained, we computed
r(x) = f(x) - s(x) and this was of the correct form, and f(x) is then
r(x) + s(x) which we can integrate. Posible mistakes made when computing
s(x) are thus completely irrelevant.

A difficult split up into partial fractions

let (-x^3+9x^2-3x+2)/(x^4-2x^3)
= A/x + B/x^2 + C/x^3 + D/(x-2)

then
Ax^2(x-2) + Bx(x-2) + C(x-2) + Dx^3 = -x^3 + 9x^2 - 3x + 2
This is an identity, so it must be true for any x.
Pick suitable values of x
let x=0 --> -2C=2
C=-1
let x = 2 --> 8D = -8+36-6+2
D = 3

so Ax^2(x-2) + Bx(x-2) -x+2 + 3x^3 = -x^3 + 9x^2 - 3x + 2
let x=1 --> -A - B + 1 + 3 = -1 +9-3+2
A+B = -3
let x = 3 --> 9A + 3B - 3+2+81 = -27+81-9+2
9A + 3B = -33
Solving these last two equations in A and B gives us
A = -4
B = 1

so (-x^3+9x^2-3x+2)/(x^4-2x^3)
= -4/x + 1/x^2 - 1/x^3 + 3/(x-2)

and the integral of that is

-4lnx - 1/x + 1/(2x^2) + 3ln(x-2) + c

To evaluate the indefinite integral of the given rational function, we'll start by factoring the denominator, which is a quartic polynomial, as much as possible:

x^4 - 2x^3 = x^3(x - 2).

Now we can rewrite the integral as:

∫(T(-x^3 + 9x^2 - 3x + 2)/(x^3(x - 2))) dx.

To integrate this expression, we can use partial fractions decomposition. We'll assume that the integrand can be expressed as:

T(-x^3 + 9x^2 - 3x + 2)/(x^3(x - 2)) = A/x + B/x^2 + C/x^3 + D/(x - 2),

where A, B, C, and D are constants to be determined.

To find these constants, we can multiply the entire equation by the denominator (x^3(x - 2)) to obtain:

T(-x^3 + 9x^2 - 3x + 2) = A(x - 2) + Bx(x - 2) + Cx^2(x - 2) + D(x^3).

Expanding and equating the coefficients of like powers of x, we get:

For the term without x:
-1 = -2A.

For the term with x:
9 = -2A - 2B.

For the term with x^2:
-3 = -2B - 2C.

For the term with x^3:
2 = -2C + D.

From these equations, we can solve for A, B, C, and D as follows:

A = 1/2,
B = -13/8,
C = -15/16,
D = 23/16.

Now we can rewrite the integral as:

∫(1/2x) dx - ∫(13/8x^2) dx - ∫(15/16x^3) dx + ∫(23/16)/(x - 2) dx.

Integrating each term separately:

∫(1/2x) dx = (1/2) ln|x| + C1,

∫(13/8x^2) dx = (13/24) x^3 + C2,

∫(15/16x^3) dx = (15/64) x^4 + C3,

∫(23/16)/(x - 2) dx = (23/16) ln|x - 2| + C4.

Combining all the terms, we get:

(1/2) ln|x| - (13/24) x^3 - (15/64) x^4 + (23/16) ln|x - 2| + C,

where C = C1 + C2 + C3 + C4 is the constant of integration.

Therefore, the correct evaluation of the indefinite integral is:

(1/2) ln|x| - (13/24) x^3 - (15/64) x^4 + (23/16) ln|x - 2| + C.