Calculus: Integrals IV

Partial Fractions


Integration by partial fractions is a technique for integrating rational functions. A rational function is made up of one polynomial divided by another polynomial. The trick is to split this complicated rational function into a sum of simpler rational functions, each of which can be easily integrated. This method is fairly time-consuming and involves a number of long-winded algebraic steps, so buckle in.

It's best to walk through an example. Let's evaluate the following integral:

$$\int \dfrac{x^3}{x^2-1} \, dx$$

The first step is to make sure the numerator is of a smaller degree than the denominator. If it is not, use polynomial long division to reduce the function to a remainder and a quotient.

$$\require{enclose} \begin{array}{rl} x + 0 \\[-3pt] x^2 + 0x + 1 \enclose{longdiv}{x^3 + 0x^2 + 0x + 0}\kern-.2ex \\[-3pt] \underline{x^3+0x^2+1x+0} \\[-3pt] x + 0 \\[-3pt] \end{array} $$

The rational function can then be rewritten as the sum of the quotient over the denominator and the remainder. The remainder can be integrated as a simple polynomial, and the new rational function remains the focus of the rest of the method:

$$\int \dfrac{x^3}{x^2-1} \, dx = \int x \, dx + \int \dfrac{x}{x^2-1} \, dx $$

The second step is to split the rational function up into a sum of simpler rational functions. This first entails factoring the denominator. Quadratic functions should be easy enough to factor, but higher degree functions may require that you go on an algebraic factoring safari. Welcome to the jungle.

$$\int \dfrac{x}{x^2-1} \, dx =  \int \dfrac{x}{(x+1)(x-1)} \, dx$$

Once the denominator is factored, rewrite the rational function as the sum of a number of smaller rational functions, each of which has one of the factors as its denominator and an undetermined numerator:

$$\dfrac{x}{(x+1)(x-1)} = \dfrac{A}{x+1} + \dfrac{B}{x-1}$$

The unknown numerator must be one degree less than the denominator. For example, if the denominator has a term that cannot be simplified without resorting to rational numbers, such as $x^2+1$, then the unknown numerator must be $Ax+B$. Factoring everything using complex numbers will produce the same result, but may be more time-consuming. Once this is done, multiply each term accordingly such that they once again share the same common denominator:

$$\dfrac{A}{x+1} + \dfrac{B}{x-1} = \dfrac{A(x-1)}{(x+1)(x-1)} + \dfrac{B(x+1)}{(x-1)(x+1)}$$

The third step is to solve the newly formed system of equations by the numerators. Namely, we need to solve $A(x-1) + B(x+1) = x$. The easiest way to solve these equations is to set $x$ equal to the value of the roots, which here are $1$ and $-1$. This always cancels out one of the terms and makes solving things easier. Alternatively, you can let $x$ equal some other values and then enjoy your needlessly complicated life. You're doing an integral by partial fractions, after all, so why not go nuts? Anyway, algebra reveals that $A=\frac{1}{2}$ and $B=\frac{1}{2}$, so we can rewrite the terms as follows:

$$\dfrac{x}{(x+1)(x-1)} = \dfrac{1}{2(x+1)} + \dfrac{1}{2(x-1)}$$

Not forgetting the fact that we're actually trying to solve an integral, we add back in our missing context:

$$\int \dfrac{x^3}{x^2+1} \, dx = \int x + \dfrac{1}{2(x+1)} + \dfrac{1}{2(x-1)} \, dx$$

From here, you can solve the integral using the basic methods to get the proper answer.

To summarize:

  1. Make sure the numerator is of a smaller degree than the denominator, using long division if necessary.
  2. Factor the denominator and split apart the rational function into a sum of simpler rational functions with undetermined numerators.
  3. Solve the system of equations in order to find the values of each of the variables in the numerators.
  4. Solve the simple integrals using methods you already know.

 


Problems

  1. Evaluate: $\displaystyle\int \dfrac{7x+11}{x^2+3x+2} \, dx$

    Step 1: Factor the integral:

    $\displaystyle\int \dfrac{7x+11}{x^2+3x+2} \, dx = \displaystyle\int \dfrac{7x+11}{(x+1)(x+2)} \, dx \\ \displaystyle\int \dfrac{7x+11}{x^2+3x+2} \, dx = \displaystyle\int \dfrac{A}{x+1} + \dfrac{B}{x+2} \, dx \\ \displaystyle\int \dfrac{7x+11}{x^2+3x+2} \, dx = \displaystyle\int \dfrac{A(x+2)}{(x+1)(x+2)} + \dfrac{B(x+1)}{(x+1)(x+2)} \, dx \\ \displaystyle\int \dfrac{7x+11}{x^2+3x+2} \, dx = \displaystyle\int \dfrac{A(x+2) + B(x+1)}{(x+1)(x+2)} \\ $

    Step 2: Set up the numerator equation:

    $ A(x+2) + B(x+1) = 7x+11 \\ $

    Step 3: Solve for unknowns:

    Let $x = -2$, then

    $A(-2+2) + B(-2+1) = 7(-2)+11 \\ A(0) + B(-1) = -3 \\ -B = -3 \\ B = 3 \\ $

    Let $x = -1$, then

    $A(-1+2) + B(-1+1) = 7(-1)+11 \\ A(1) + B(0) = 4 \\ A = 4 \\ $

    Step 4: Integrate the factored integral:

    $\displaystyle\int \dfrac{7x+11}{x^2+3x+2} \, dx = \displaystyle\int \dfrac{4}{x+1} + \dfrac{3}{x+2} \, dx \\ \displaystyle\int \dfrac{7x+11}{x^2+3x+2} \, dx = 4 \displaystyle\int \dfrac{1}{x+1}dx + 3\int \dfrac{1}{x+2} \, dx \\ \displaystyle\int \dfrac{7x+11}{x^2+3x+2} \, dx = 4 \ln|x+1| + 3\ln|x+2| + C\\ $

    Show Answer
  2. Evaluate: $\displaystyle\int \dfrac{9x-3}{x^2-4}dx$

    Step 1: Factor the integral:

    $\displaystyle\int \dfrac{9x-3}{x^2-4}dx = \int \dfrac{9x-3}{(x-2)(x+2)} \, dx \\ \displaystyle\int \dfrac{9x-3}{x^2-4}dx = \displaystyle\int \dfrac{A}{x-2} + \dfrac{B}{x+2} \, dx \\ \displaystyle\int \dfrac{9x-3}{x^2-4}dx = \displaystyle\int \dfrac{A(x+2)}{(x-2)(x+2)} + \dfrac{B(x-2)}{(x+2)(x-2)} \, dx \\ \displaystyle\int \dfrac{9x-3}{x^2-4}dx = \displaystyle\int \dfrac{A(x+2) + B(x-2)}{(x-2)(x+2)} \, dx \\ $

    Step 2: Set up the numerator equation:

    $ A(x+2) + B(x-2) = 9x-3 \\ $

    Step 3: Solve for unknowns:

    Let $x = -2$, then

    $A(-2+2) + B(-2-2) = 9(-2)-3 \\ A(0) + B(-4) = -21 \\ -4B = -21 \\ B = \dfrac{21}{4} \\ $

    Let $x = 2$, then

    $A(2+2) + B(2-2) = 9(2)-3 \\ A(4) + B(0) = 15 \\ 4A = 15 \\ A = \dfrac{15}{4} \\ $

    Step 4: Integrate the factored integral:

    $\displaystyle\int \dfrac{9x-3}{x^2-4x+4} \, dx = \displaystyle\int \dfrac{15}{4(x-2)} + \dfrac{21}{4(x+2)} \, dx \\ \displaystyle\int \dfrac{9x-3}{x^2-4x+4} \, dx = \dfrac{15}{4} \displaystyle\int \dfrac{1}{x-2} \, dx + \dfrac{21}{4}\displaystyle\int \dfrac{1}{x+2} \, dx \\ \displaystyle\int \dfrac{9x-3}{x^2-4x+4} \, dx = \dfrac{15}{4} \displaystyle\ln|x-2| + \dfrac{21}{4}\ln|x+2| + c \\ $
    Show Answer
  3. Evaluate: $\displaystyle\int \dfrac{x^2-4}{x^3+6x^2+11x+6} \, dx$

    Step 1: Factor the integral:

    $\displaystyle\int \dfrac{x^2-4}{x^3+6x^2+11x+6} \, dx = \displaystyle\int \dfrac{(x-2)(x+2)}{(x+1)(x+2)(x+3)} \, dx \\ \displaystyle\int \dfrac{x^2-4}{x^3+6x^2+11x+6} \, dx = \displaystyle\int \dfrac{x-2}{(x+1)(x+3)} \, dx \\ \displaystyle\int \dfrac{x^2-4}{x^3+6x^2+11x+6} \, dx = \displaystyle\int \dfrac{A}{x+1} + \dfrac{B}{x+3} \, dx \\ \displaystyle\int \dfrac{x^2-4}{x^3+6x^2+11x+6} \, dx = \displaystyle\int \dfrac{A(x+3)}{(x+1)(x+3)} + \dfrac{B(x+1)}{(x+3)(x+1)} \, dx \\ \displaystyle\int \dfrac{x^2-4}{x^3+6x^2+11x+6} \, dx = \displaystyle\int \dfrac{A(x+3) + B(x+1)}{(x+1)(x+3)} \, dx \\ $

    Step 2: Set up the numerator equation:

    $A(x+3) + B(x+1) = x-2 \\$

    Step 3: Solve for unknowns:

    Let $x = -3$, then

    $A(-3+3) + B(-3+1) = -3-2 \\ A(0) + B(-2) = -5 \\ -2B = -5 \\ B = \dfrac{5}{2} \\ $

    Let $x = -1$, then

    $A(-1+3) + B(-1+1) = -1-2 \\ A(2) + B(0) = -3 \\ 2A = -3 \\ A = -\dfrac{3}{2} \\ $

    Step 4: Integrate the factored integral:

    $\displaystyle\int \dfrac{x^2-4}{x^3+6x^2+11x+6} \, dx = \displaystyle\int \dfrac{-3}{2(x+1)} + \dfrac{5}{2(x+3)} \, dx \\ \displaystyle\int \dfrac{x^2-4}{x^3+6x^2+11x+6} \, dx = \dfrac{-3}{2} \int \dfrac{1}{x+1}dx + \dfrac{5}{2}\int \dfrac{1}{x+3} \, dx \\ \displaystyle\int \dfrac{x^2-4}{x^3+6x^2+11x+6} \, dx = \dfrac{-3}{2} \ln|x+1| + \dfrac{5}{2}\ln|x+3| + c \\ $
    Show Answer
  4. Evaluate: $\displaystyle\int \dfrac{x^2-9x+20}{x^3-2x^2-5x+6}dx$

    Step 1: Factor the integral:

    $\displaystyle\int \dfrac{x^2-9x+20}{x^3-2x^2-5x+6} \, dx = \int \dfrac{x^2-9x+20}{(x-3)(x-1)(x+2)} \, dx \\ \displaystyle\int \dfrac{x^2-9x+20}{x^3-2x^2-5x+6} \, dx = \int \dfrac{A}{x-3} + \dfrac{B}{x-1} + \dfrac{C}{x+2} \, dx \\ \displaystyle\int \dfrac{x^2-9x+20}{x^3-2x^2-5x+6} \, dx = \int \dfrac{A(x-1)(x+2)}{(x-3)(x-1)(x+2)} + \dfrac{B(x-3)(x+2)}{(x-1)(x-3)(x+2)} + \dfrac{C(x-3)(x-1)}{(x+2)(x-3)(x-1)} \, dx \\ $

    Step 2: Set up the numerator equation:

    $A(x-1)(x+2) + B(x-3)(x+2) + C(x-3)(x-1) = x-2 \\$

    Step 3: Solve for unknowns:

    Let $x = 1$, then

    $A(1-1)(1+2) + B(1-3)(1+2) + C(1-3)(1-1) = 1^2-9(1)+20 \\ A(0)(3) + B(-2)(3) + C(-2)(0) = 12 \\ -6B = 12 \\ B = -2 \\ $

    Let $x = -2$, then

    $A(-2-1)(-2+2) + B(-2-3)(-2+2) + C(-2-3)(-2-1) = (-2)^2 - 9(-2) + 20 \\ A(-3)(0) + B(-5)(0) + C(-5)(-3) = 42 \\ 15C = 42 \\ C = \dfrac{14}{5} \\ $

    Let $x = 3$, then

    $A(3-1)(3+2) + B(3-3)(3+2) + C(3-3)(3-1) = 3^2 - 9(3) + 20 \\ A(2)(5) + B(0)(5) + C(0)(2) = 2 \\ 10A = 2 \\ A = \dfrac{1}{5} \\ $

    Step 4: Integrate the factored integral:

    $\displaystyle\int \dfrac{x^2-9x+20}{x^3-2x^2-5x+6} \, dx = \displaystyle\int \dfrac{1}{5(x-3)} + \dfrac{2}{x-1} + \dfrac{14}{5(x+2)} \, dx \\ \displaystyle\int \dfrac{x^2-9x+20}{x^3-2x^2-5x+6} \, dx = \dfrac{1}{5} \int \dfrac{1}{x-3} \, dx - 2\int\dfrac{1}{x-1} \, dx + \dfrac{14}{5}\int \dfrac{1}{x+2} \, dx \\ \displaystyle\int \dfrac{x^2-9x+20}{x^3-2x^2-5x+6} \, dx = \dfrac{1}{5} \ln|x-3| - 2\ln|x-1| + \dfrac{14}{5}\ln|x+2| + c\\ $

    Show Answer
  5. Evaluate: $\displaystyle\int \dfrac{x^2+1}{(x-2)(x+2)(x+4)} \, dx$

    Step 1: Factor the integral:

    $\displaystyle\int \dfrac{x^2+1}{(x-2)(x+2)(x+4)} \, dx = \int \dfrac{A}{x-2} + \dfrac{B}{x+2} + \dfrac{C}{x+4} \, dx \\ \displaystyle\int \dfrac{x^2+1}{(x-2)(x+2)(x+4)} \, dx = \int \dfrac{A(x+2)(x+4)}{(x-2)(x+2)(x+4)} + \dfrac{B(x-2)(x+2)}{(x-2)(x-3)(x+4)} + \dfrac{C(x-2)(x+2)}{(x+4)(x-2)(x+2)} \, dx \\ $

    Step 2: Set up the numerator equation:

    $A(x+2)(x+4) + B(x-2)(x+4) + C(x-2)(x+2) = x^2+1 \\$

    Step 3: Solve for unknowns:

    Let $x = 2$, then

    $A(2+2)(2+4) + B(2-2)(2+4) + C(2-2)(2+2) = (2)^2+1 \\ A(4)(6) + B(0)(6) + C(0)(4) = 5 \\ 24A = 5 \\ A = \dfrac{5}{24} \\ $

    Let $x = -2$, then

    $A(-2+2)(-2+4) + B(-2-2)(-2+4) + C(-2-2)(-2+2) = (-2)^2+1 \\ A(0)(2) + B(-4)(2) + C(-4)(0) = 5 \\ -8B = 5 \\ B = -\dfrac{5}{8} \\ $

    Let $x = -4$, then

    $A(-4+2)(-4+4) + B(-4-2)(-4+4) + C(-4-2)(-4+2) = (-4)^2+1 \\ A(-2)(0) + B(-6)(0) + C(-6)(-2) = 17 \\ 12C = 17 \\ C = \dfrac{17}{12} \\ $

    Step 4: Integrate the factored integral:

    $ \displaystyle\int \dfrac{x^2+1}{(x-2)(x+2)(x+4)} \, dx = \int \dfrac{5}{24(x-2)} - \dfrac{5}{8(x+2)} + \dfrac{17}{12(x+4)} \, dx \\ \displaystyle\int \dfrac{x^2+1}{(x-2)(x+2)(x+4)} \, dx = \dfrac{5}{24} \int \dfrac{1}{x-2} \, dx - \dfrac{5}{8}\int\dfrac{1}{x+2} \, dx + \dfrac{17}{12}\int \dfrac{1}{x+4} \, dx \\ \displaystyle\int \dfrac{x^2+1}{(x-2)(x+2)(x+4)} \, dx = \dfrac{5}{24} \ln|x-2| -\dfrac{5}{8}\ln|x+2| + \dfrac{17}{12}\ln|x+4| + c\\ $

    Show Answer
  6. Evaluate $\displaystyle\int\dfrac{x^3+4x^2+5x+2}{x^2+2x-3}\, dx$

    Step 1: Do long division to separate the integral:

    $\require{enclose} \begin{array}{rl} x +2 \\[-3pt] x^2+2x-3 \enclose{longdiv}{x^3+4x^2+5x+2}\kern-.2ex \\[-3pt] \underline{x^3+2x^2-3x+0} \\[-3pt] 2x^2+8x+2 \\[-3pt] \underline{2x^2+4x-6} \\[-3pt] 4x+8 \\[-3pt] \end{array} $

    The integral is now:

    $\displaystyle\int\dfrac{4x+8}{x^2+2x-3} + x + 2 \, dx \\$

    Step 2: Factor the integral:

    $\displaystyle\int\dfrac{x^3+4x^2+5x+2}{x^2+2x-3} \, dx = \int\dfrac{4x+8}{(x-1)(x+3)} + x + 2 \, dx \\ \displaystyle\int\dfrac{x^3+4x^2+5x+2}{x^2+2x-3} \, dx = \int\dfrac{A}{x-1} + \dfrac{B}{x+3} + x + 2 \, dx \\ \displaystyle\int\dfrac{x^3+4x^2+5x+2}{x^2+2x-3} \, dx = \dfrac{A(x+3)}{(x-1)(x+3)} + \dfrac{B(x-1)}{(x+3)(x-1)} + x + 2 \, dx \\ $

    Step 3: Set up the numerator equation:

    $ A(x+3) + B(x-1) = 4x + 8 \\ $

    Step 4: Solve for unknowns:

    Let $x=-3$, then

    $A(-3+3) + B(-3-1) = 4(-3) + 8 \\ -4B = -4 \\ B = 1 \\ $

    Let $x = 1$, then

    $A(1+3) + B(1-1) = 4(1) + 8 \\ 4A = 12 \\ A = 3 \\ $

    Step 4: Integrate the factored integral:

    $\displaystyle\int\dfrac{x^3+4x^2+5x+2}{x^2+2x-3} \, dx = \int\dfrac{A}{x-1} + \dfrac{B}{x+3} + x + 2 dx \\ \displaystyle\int\dfrac{x^3+4x^2+5x+2}{x^2+2x-3} \, dx = \int\dfrac{3}{x-1} + \dfrac{1}{x+3} + x + 2 dx \\ \displaystyle\int\dfrac{x^3+4x^2+5x+2}{x^2+2x-3} \, dx = 3\ln|x-1| + \ln|x+3| + \dfrac{1}{2}x^2 + 2x + c \\ $

    Show Answer
  7. Evaluate: $\displaystyle\int\dfrac{x^3-x^2-x+1}{x^2+4x+4} \, dx$

    Step 1: Do long division to separate the integral:

    $ \require{enclose} \begin{array}{rl} x -5 \\[-3pt] x^2+4x+4 \enclose{longdiv}{x^3-\phantom{0}x^2-\phantom{00}x+\phantom{0}1}\kern-.2ex \\[-3pt] \underline{x^3+4x^2+\phantom{0}4x+\phantom{0}0} \\[-3pt] -5x^2-\phantom{0}5x+\phantom{0}1 \\[-3pt] \underline{-5x^2-20x-20} \\[-3pt] 15x+21 \\[-3pt] \end{array} $

    The integral is now:

    $\displaystyle\int\dfrac{15x+21}{x^2+4x+4} + x - 5 \, dx \\$

    Step 2: Factor the integral:

    $\displaystyle\int\dfrac{x^3-x^2-x+1}{x^2+4x+4} \, dx = \displaystyle\int\dfrac{15x+21}{(x+2)(x+2)} + x - 5 \, dx \\ \displaystyle\int\dfrac{x^3-x^2-x+1}{x^2+4x+4} \, dx = \displaystyle\int\dfrac{A}{x+2} + \dfrac{B}{(x+2)^2} + x - 5 \, dx \\ \displaystyle\int\dfrac{x^3-x^2-x+1}{x^2+4x+4} \, dx = \displaystyle\int\dfrac{A(x+2)}{(x+2)(x+2)} + \dfrac{B}{(x+2)^2} + x - 5 \, dx \\ $

    Step 3: Set up the numerator equation:

    $A(x+2) + B = 15x + 21 \\ $

    Step 4: Solve for the unknowns:

    Let $x=-2$, then

    $ A(-2+2) + B = 15(-2) +21 \\ B = -30 + 21 \\ B = -9 \\ $

    Let $x=0$, then

    $A(0+2) -9 = 15(0) +21 \\ 2A - 9 = 21 \\ 2A = 30 \\ A = 15 \\ $

    Step 4 Integrate the factored integral:

    $\displaystyle\int\dfrac{x^3-x^2-x+1}{x^2+4x+4} \, dx = \displaystyle\int\dfrac{A}{x+2} + \dfrac{B}{(x+2)^2} + x - 5 \, dx \\ \displaystyle\int\dfrac{x^3-x^2-x+1}{x^2+4x+4} \, dx = \int\dfrac{15}{x+2} - \dfrac{9}{(x+2)^2} + x - 5 \, dx \\ \displaystyle\int\dfrac{x^3-x^2-x+1}{x^2+4x+4} \, dx = 15\ln|x+2| +\dfrac{9}{x+2} + \dfrac{1}{2}x^2 - 5x + c \\ $
    Show Answer
  8. Evaluate: $\displaystyle\int \dfrac{x+2}{x^3+x}dx$

    Hint: $\displaystyle\int\dfrac{1}{x^2+1}dx=\tan^{-1}(x) + c$

    Step 1: Factor the integral:

    $\displaystyle\int \dfrac{x+2}{x^3+x} \, dx = \displaystyle\int \dfrac{x+2}{x(x^2+1)} \, dx \\ \displaystyle\int \dfrac{x+2}{x^3+x} \, dx = \int \dfrac{A}{x} + \dfrac{Bx+C}{x^2+1} \, dx \\ \displaystyle\int \dfrac{x+2}{x^3+x} \, dx = \int \dfrac{A(x^2+1)}{x(x^2+1)} + \dfrac{(Bx+C)x}{(x^2+1)x} \, dx \\ $

    Step 2: Set up the numerator equation:

    $A(x^2+1) + (Bx+C)x = x+2 \\$

    Step 3: Solve for unknowns:

    Let $x = 0$, then

    $A(0^2+1) + (B0+C)0 = 0+2 \\ A = 2 \\ $

    Let $x = i$, then

    $A(i^2+1) + (Bi+C)i = i+2 \\ A(0) + -B+Ci = i+2 \\ B = -2 \\ C = 1 $

    Step 4: Integrate the factored integral:

    $\displaystyle\int \dfrac{x+2}{x^3+x} \, dx = \displaystyle\int \dfrac{2}{x} \, dx + \dfrac{-2x+1}{(x^2+1)} \, dx \\ \displaystyle\int \dfrac{x+2}{x^3+x} \, dx = 2\displaystyle\int \dfrac{1}{x} \, dx - \displaystyle\int\dfrac{2x}{x^2+1} \, dx + \displaystyle\int\dfrac{1}{x^2+1} \, dx \\ \displaystyle\int \dfrac{x+2}{x^3+x} \, dx = 2\ln|x| - \ln\left|x^2+1\right| + \tan^{-1}(x) + c \\ $

    Show Answer
  9. Evaluate: $\displaystyle\int \dfrac{x^2-1}{x^3-2x^2+2x-4}dx$

    Hint: $\displaystyle\int\dfrac{1}{x^2+\alpha}dx = \dfrac{1}{\sqrt{\alpha}}\tan^{-1}\left(\dfrac{x}{\sqrt{\alpha}}\right) + c$

    Step 1: Factor the integral:

    $\displaystyle\int \dfrac{x^2-1}{x^3-2x^2+2x-4} \, dx = \displaystyle\int \dfrac{x^2-1}{(x-2)(x^2+2)} \, dx\\ \displaystyle\int \dfrac{x^2-1}{x^3-2x^2+2x-4} \, dx = \displaystyle\int \dfrac{A}{x-2} + \dfrac{Bx+C}{x^2+2} \, dx \\ \displaystyle\int \dfrac{x^2-1}{x^3-2x^2+2x-4} \, dx = \displaystyle\int \dfrac{A(x^2+2)}{(x-2)(x^2+2)} + \dfrac{(Bx+C)(x-2)}{(x^2+2)(x-2)} \, dx \\ $

    Step 2: Set up the numerator equation:

    $A(x^2+2) + (Bx+C)(x-2) = x^2-1 \\$

    Step 3: Solve for unknowns:

    Let $x = \sqrt{2}i$, then

    $A((\sqrt{2}i)^2+2) + (B(\sqrt{2}i)+C)((\sqrt{2}i)-2) = (\sqrt{2}i)^2-1 \\ -2B + \sqrt{2}iC -2\sqrt{2}iB -2C = -3 \\ $

    We can solve for the real and imaginary components separately:

    $ \textbf{Real:} -2B -2C = -3 \\ \textbf{Imaginary:} -2\sqrt{2}iB + \sqrt{2}iC = 0 \\ $

    Notice that this is a system of equations, and we can solve it neatly using Gaussian elimination:

    $ \begin{bmatrix} -2 & -2 \\ -2\sqrt{2}i & \sqrt{2}i \\ \end{bmatrix} \begin{bmatrix} B \\ C \\ \end{bmatrix} = \begin{bmatrix} -3 \\ 0 \\ \end{bmatrix} \\ \begin{bmatrix} 1 & 1 \\ -2 & 1 \\ \end{bmatrix} \begin{bmatrix} B \\ C \\ \end{bmatrix} = \begin{bmatrix} \dfrac{3}{2} \\ 0 \\ \end{bmatrix} \\ \begin{bmatrix} 1 & 1 \\ 0 & 3 \\ \end{bmatrix} \begin{bmatrix} B \\ C \\ \end{bmatrix} = \begin{bmatrix} \dfrac{3}{2} \\ 3 \\ \end{bmatrix} \\ \begin{bmatrix} 1 & 1 \\ 0 & 1 \\ \end{bmatrix} \begin{bmatrix} B \\ C \\ \end{bmatrix} = \begin{bmatrix} \dfrac{3}{2} \\ 1 \\ \end{bmatrix} \\ \begin{bmatrix} 1 & 0 \\ 0 & 1 \\ \end{bmatrix} \begin{bmatrix} B \\ C \\ \end{bmatrix} = \begin{bmatrix} \dfrac{1}{2} \\ 1 \\ \end{bmatrix} \\ B = \dfrac{1}{2} \\ C = 1 $

    Let $x = 2$, then

    $A(2^2+2) + (B2+C)(2-2) = 2^2-1 \\ 6A = 3 \\ A = \dfrac{1}{2} \\ $

    Step 4: Integrate the factored integral:

    $\displaystyle\int \dfrac{x^2-1}{x^3-2x^2+2x-4} \, dx = \displaystyle\int \dfrac{1}{2(x-2)} + \dfrac{\frac{1}{2}x+1}{x^2+2} \, dx \\ \displaystyle\int \dfrac{x^2-1}{x^3-2x^2+2x-4} \, dx = \dfrac{1}{2}\displaystyle\int \dfrac{1}{(x-2)} \, dx + \dfrac{1}{2} \displaystyle\int\dfrac{x}{x^2+2} \, dx +\displaystyle\int\dfrac{1}{x^2+2} \, dx\\ \displaystyle\int \dfrac{x^2-1}{x^3-2x^2+2x-4} \, dx = \dfrac{1}{2}\ln|x-2| + \dfrac{1}{4}\ln\left|x^2+2\right| + \dfrac{1}{\sqrt{2}}\tan^{-1}\left(\dfrac{x}{\sqrt{2}}\right)+ c \\ $

    Show Answer
  10. Evaluate: $\displaystyle\int\dfrac{1}{x^4+16}dx$

    Step 1: Rewrite the denominator:

    $\displaystyle\int\dfrac{1}{x^4+16 + (8x^2-8x^2)} \, dx = \displaystyle\int\dfrac{1}{(x^4 + 8x^2 + 16) - 8x^2} \, dx \\ \displaystyle\int\dfrac{1}{x^4+16 + (8x^2-8x^2)} \, dx = \displaystyle\int\dfrac{1}{(x^2+4)^2 - (\sqrt{8}x)^2} \, dx \\ $

    Step 2: Factor the denominator:

    $ \displaystyle\int\dfrac{1}{x^4+16 + (8x^2-8x^2)} \, dx = \displaystyle\int\dfrac{1}{((x^2+4)+\sqrt{8}x)((x^2+4)-\sqrt{8}x)} \, dx \\ \displaystyle\int\dfrac{1}{x^4+16 + (8x^2-8x^2)} \, dx = \displaystyle\int\dfrac{1}{(x^2+\sqrt{8}x+4)(x^2-\sqrt{8}x+4)} \, dx \\ \displaystyle\int\dfrac{1}{x^4+16 + (8x^2-8x^2)} \, dx = \displaystyle\int\dfrac{1}{(x^2+2\sqrt{2}x+4)(x^2-2\sqrt{2}x+4)} \, dx \\ \displaystyle\int\dfrac{1}{x^4+16 + (8x^2-8x^2)} \, dx = \displaystyle\int\dfrac{1}{(x^2+2\sqrt{2}x+2-2+4)(x^2-2\sqrt{2}x+2-2+4)} \, dx \\ \displaystyle\int\dfrac{1}{x^4+16 + (8x^2-8x^2)} \, dx = \displaystyle\int\dfrac{1}{((x+\sqrt{2})^2+2)((x-\sqrt{2})^2+2)} \, dx \\ \displaystyle\int\dfrac{1}{x^4+16 + (8x^2-8x^2)} \, dx = \displaystyle\int\dfrac{Ax+B}{(x+\sqrt{2})^2+2}+\dfrac{Cx+D}{(x-\sqrt{2})^2+2} \, dx \\ \displaystyle\int\dfrac{1}{x^4+16 + (8x^2-8x^2)} \, dx = \displaystyle\int\dfrac{(Ax+B)((x-\sqrt{2})^2+2)}{((x+\sqrt{2})^2+2)((x-\sqrt{2})^2+2)}+\dfrac{(Cx+D)((x+\sqrt{2})^2+2)}{((x-\sqrt{2})^2+2)((x+\sqrt{2})^2+2)} \, dx \\ $

    Step 3: Set up the numerator equation:

    $(Ax+B)((x-\sqrt{2})^2+2) + (Cx+D)((x+\sqrt{2})^2+2) = 1$

    Step 4: Solve for unknowns:

    Let $x=\sqrt{2}+\sqrt{2}i$, then

    $(A(\sqrt{2}+\sqrt{2}i)+B)(((\sqrt{2}+\sqrt{2}i)-\sqrt{2})^2+2) + \\ (C(\sqrt{2}+\sqrt{2}i)+D)(((\sqrt{2}+\sqrt{2}i)+\sqrt{2})^2+2) = 1 \\ (A(\sqrt{2}+\sqrt{2}i)+B)((\sqrt{2}i)^2+2) + (C(\sqrt{2}+\sqrt{2}i)+D)((2\sqrt{2}+\sqrt{2}i)^2+2) = 1 \\ (A(\sqrt{2}+\sqrt{2}i)+B)(-2+2) + (C(\sqrt{2}+\sqrt{2}i)+D)(8+8i-2+2) = 1 \\ (\sqrt{2}+\sqrt{2}i)(8+8i)C + (8+8i)D = 1 \\ 16\sqrt{2}iC + 8D+8iD = 1 \\ $

    We can solve for the real and imaginary components separately:

    $ \textbf{Real:} 8D = 1 \\ \textbf{Imaginary:} 16\sqrt{2}iC + 8iD = 0 \\ $

    Clearly, $D=\dfrac{1}{8}$. We can then solve for $C$:

    $16\sqrt{2}iC + 8i\dfrac{1}{8} = 0 \\ 16\sqrt{2}C + 1 = 0 \\ C = \dfrac{-1}{16\sqrt{2}} $

    Let $x=-\sqrt{2}+\sqrt{2}i$, then

    $(A(-\sqrt{2}+\sqrt{2}i)+B)(((-\sqrt{2}+\sqrt{2}i)-\sqrt{2})^2+2) + \\ (C(-\sqrt{2}+\sqrt{2}i)+D)(((-\sqrt{2}+\sqrt{2}i)+\sqrt{2})^2+2) = 1 \\ (A(-\sqrt{2}+\sqrt{2}i)+B)((-2\sqrt{2}+\sqrt{2}i)^2+2) + (C(-\sqrt{2}+\sqrt{2}i)+D)((\sqrt{2}i)^2+2) = 1 \\ (A(-\sqrt{2}+\sqrt{2}i)+B)(8-8i-2+2) + (C(-\sqrt{2}+\sqrt{2}i)+D)(-2+2) = 1 \\ (-\sqrt{2}+\sqrt{2}i)(8-8i)A + (8-8i)B = 1 \\ 16\sqrt{2}iA + 8B - 8iB = 1 $

    We can solve for the real and imaginary components separately:

    $ \textbf{Real:} 8B = 1 \\ \textbf{Imaginary:} 16\sqrt{2}iA - 8iB = 0 \\ $

    Clearly, $B=\dfrac{1}{8}$. We can then solve for $A$:

    $16\sqrt{2}iA - 8i\dfrac{1}{8} = 0 \\ 16\sqrt{2}A - 1 = 0 \\ A = \dfrac{1}{16\sqrt{2}} \\ $

    Step 4: Integrate factored integral:

    $\displaystyle\int\dfrac{1}{x^2+16} \, dx = \displaystyle\int \dfrac{\frac{1}{16\sqrt{2}}x+\frac{1}{8}}{(x+\sqrt{2})^2+2} + \dfrac{\frac{-1}{16\sqrt{2}}x+\frac{1}{8}}{(x-\sqrt{2})^2+2} \, dx \\ = \displaystyle\int\dfrac{1}{16\sqrt{2}}\dfrac{x}{(x+\sqrt{2})^2+2} + \dfrac{1}{8}\dfrac{1}{(x+\sqrt{2})^2+2} \, dx + \\ \displaystyle\int\dfrac{-1}{16\sqrt{2}}\dfrac{x}{(x-\sqrt{2})^2+2} + \dfrac{1}{8}\dfrac{1}{(x-\sqrt{2})^2+2} \, dx \\ $

    We should integrate each of these integrals individually to at least try to keep the page clean:

    Step 4.1: First part of integral:

    $\displaystyle\int\dfrac{1}{16\sqrt{2}}\dfrac{x}{(x+\sqrt{2})^2+2} +\dfrac{1}{8}\dfrac{1}{(x+\sqrt{2})^2+2} \, dx \\$

    Let $u = x+\sqrt{2}$ and $du = dx$:

    $\displaystyle\int\dfrac{1}{16\sqrt{2}}\dfrac{u-\sqrt{2}}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2} \, du = \dfrac{1}{16\sqrt{2}}\int\dfrac{u}{u^2+2}du - \dfrac{1}{16\sqrt{2}}\int\dfrac{\sqrt{2}}{u^2+2}du + \dfrac{1}{8}\int\dfrac{1}{u^2+2}du \\ \displaystyle\int\dfrac{1}{16\sqrt{2}}\dfrac{u-\sqrt{2}}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2} \, du = \dfrac{1}{16\sqrt{2}}\int\dfrac{u}{u^2+2}du - \dfrac{1}{16}\int\dfrac{1}{u^2+2}du + \dfrac{1}{8}\int\dfrac{1}{u^2+2}du \\ \displaystyle\int\dfrac{1}{16\sqrt{2}}\dfrac{u-\sqrt{2}}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2} \, du = \dfrac{1}{16\sqrt{2}}\int\dfrac{u}{u^2+2}du + \dfrac{1}{16}\int\dfrac{1}{u^2+2}du \\ \displaystyle\int\dfrac{1}{16\sqrt{2}}\dfrac{u-\sqrt{2}}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2} \, du = \dfrac{1}{16\sqrt{2}}\left(\dfrac{1}{2}\ln(u^2+2) + C\right) + \dfrac{1}{16}\left(\dfrac{1}{\sqrt{2}}\tan^{-1}\left(\dfrac{u}{\sqrt{2}}\right) + c\right) \\ \displaystyle\int\dfrac{1}{16\sqrt{2}}\dfrac{u-\sqrt{2}}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2} \, du = \dfrac{1}{32\sqrt{2}}\ln(u^2+2) + \dfrac{1}{16\sqrt{2}}\tan^{-1}\left(\dfrac{u}{\sqrt{2}}\right) + c \\ \displaystyle\int\dfrac{1}{16\sqrt{2}}\dfrac{u-\sqrt{2}}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2} \, du = \dfrac{1}{32\sqrt{2}}\ln((x+\sqrt{2})^2+2) + \dfrac{1}{16\sqrt{2}}\tan^{-1}\left(\dfrac{x+\sqrt{2}}{\sqrt{2}}\right) + c \\ \displaystyle\int\dfrac{1}{16\sqrt{2}}\dfrac{u-\sqrt{2}}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2} \, du = \dfrac{1}{32\sqrt{2}}\ln((x+\sqrt{2})^2+2) + \dfrac{1}{16\sqrt{2}}\tan^{-1}\left(\dfrac{x}{\sqrt{2}}+1\right) + c $

    Step 4.2: Second part of integral:

    $\displaystyle\int\dfrac{-1}{16\sqrt{2}}\dfrac{x}{(x-\sqrt{2})^2+2} + \dfrac{1}{8}\dfrac{1}{(x-\sqrt{2})^2+2} \, dx \\$

    Let $u = x-\sqrt{2}$ and $du=dx$:

    $\displaystyle\int\dfrac{-1}{16\sqrt{2}}\dfrac{u+\sqrt{2}}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2} \, du = \displaystyle\int\dfrac{-1}{16\sqrt{2}}\dfrac{u}{u^2+2} -\dfrac{1}{16\sqrt{2}}\dfrac{\sqrt{2}}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2} \, du \\ \displaystyle\int\dfrac{-1}{16\sqrt{2}}\dfrac{u+\sqrt{2}}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2} \, du = \int\dfrac{-1}{16\sqrt{2}}\dfrac{u}{u^2+2} - \dfrac{1}{16}\dfrac{1}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2}du \\ \displaystyle\int\dfrac{-1}{16\sqrt{2}}\dfrac{u+\sqrt{2}}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2} \, du = \int\dfrac{-1}{16\sqrt{2}}\dfrac{u}{u^2+2} + \dfrac{1}{16}\dfrac{1}{u^2+2} du \\ \displaystyle\int\dfrac{-1}{16\sqrt{2}}\dfrac{u+\sqrt{2}}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2} \, du = \dfrac{-1}{16\sqrt{2}}\int\dfrac{u}{u^2+2}du + \dfrac{1}{16}\int\dfrac{1}{u^2+2} du \\ \displaystyle\int\dfrac{-1}{16\sqrt{2}}\dfrac{u+\sqrt{2}}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2} \, du = \dfrac{-1}{16\sqrt{2}}\left(\dfrac{1}{2}\ln(u^2+2)+c\right) + \dfrac{1}{16}\left(\dfrac{1}{\sqrt{2}}\tan^{-1}\left(\dfrac{u}{\sqrt{2}}\right)+c\right) \\ \displaystyle\int\dfrac{-1}{16\sqrt{2}}\dfrac{u+\sqrt{2}}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2} \, du = \dfrac{-1}{32\sqrt{2}}\ln(u^2+2) + \dfrac{1}{16\sqrt{2}}\tan^{-1}\left(\dfrac{u}{\sqrt{2}}\right) + c \\ \displaystyle\int\dfrac{-1}{16\sqrt{2}}\dfrac{u+\sqrt{2}}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2} \, du = \dfrac{-1}{32\sqrt{2}}\ln((x-\sqrt{2})^2+2) + \dfrac{1}{16\sqrt{2}}\tan^{-1}\left(\dfrac{x-\sqrt{2}}{\sqrt{2}}\right) + c \\ \displaystyle\int\dfrac{-1}{16\sqrt{2}}\dfrac{u+\sqrt{2}}{u^2+2} + \dfrac{1}{8}\dfrac{1}{u^2+2} \, du = \dfrac{-1}{32\sqrt{2}}\ln((x-\sqrt{2})^2+2) + \dfrac{1}{16\sqrt{2}}\tan^{-1}\left(\dfrac{x}{\sqrt{2}}-1\right) + c $

    Step 4.3: Combine the two back together:

    $\displaystyle\int\dfrac{1}{x^4+16} \, dx = \displaystyle\int\dfrac{1}{16\sqrt{2}}\dfrac{x}{(x+\sqrt{2})^2+2} + \dfrac{1}{8}\dfrac{1}{(x+\sqrt{2})^2+2}dx + \\ \displaystyle\int\dfrac{-1}{16\sqrt{2}}\dfrac{x}{(x-\sqrt{2})^2+2} + \dfrac{1}{8}\dfrac{1}{(x-\sqrt{2})^2+2} \, dx \\ \displaystyle\int\dfrac{1}{x^4+16} \, dx = \left( \dfrac{1}{32\sqrt{2}}\ln((x+\sqrt{2})^2+2) + \dfrac{1}{16\sqrt{2}}\tan^{-1}\left(\dfrac{x}{\sqrt{2}}+1\right) + c \right) + \\ \left( \dfrac{-1}{32\sqrt{2}}\ln((x-\sqrt{2})^2+2) + \dfrac{1}{16\sqrt{2}}\tan^{-1}\left(\dfrac{x}{\sqrt{2}}-1\right) + c \right) \\ \displaystyle\int\dfrac{1}{x^4+16} \, dx = \dfrac{1}{32\sqrt{2}}\left(\ln((x+\sqrt{2})^2+2) - \ln((x-\sqrt{2})^2+2) +2\tan^{-1}\left(\dfrac{x}{\sqrt{2}}+1\right) + 2\tan^{-1}\left(\dfrac{x}{\sqrt{2}}-1\right)\right) + c $
    Show Answer