To solve the integration of a rational function, such as the one given in the question, you can follow these steps:
1. Factor both the numerator and denominator of the rational function. In this case, the numerator can be factored as (x-2)(x+1) and the denominator can be factored as (x^2+2)^2.
2. Rewrite the rational function as a sum of partial fractions. In this case, the rational function can be rewritten as A/(x-2) + B/(x+1) + C/(x^2+2) + D/(x^2+2)^2, where A, B, C, and D are constants to be determined.
3. Determine the values of A, B, C, and D by equating the coefficients of the rational function with the partial fractions. In this case, you will end up with a system of equations that can be solved to find the values of the constants.
4. Once you have determined the values of A, B, C, and D, you can rewrite the rational function as A/(x-2) + B/(x+1) + C/(x^2+2) + D/(x^2+2)^2.
5. Now, you can integrate each partial fraction separately using the basic integration rules. For example, the integral of A/(x-2) can be found by using the substitution method, while the integral of C/(x^2+2) can be found by using the inverse tangent substitution.
6. Finally, you can combine the integrals of each partial fraction to find the overall integral of the rational function.
The general rule for solving the integration of a rational function is to factor the numerator and denominator, rewrite the rational function as a sum of partial fractions, determine the values of the constants, and then integrate each partial fraction separately before combining them to find the overall integral.