Calculus · real student question

Evaluate the integral of (x + 3)/(x² − 5x + 6) with respect to x.

Question

Evaluate

x+3x25x+6dx\int \frac{x + 3}{x^2 - 5x + 6}\,dx

Step-by-step solution

  1. Factor the denominator to choose the right technique.

    x25x+6=(x2)(x3)x^2 - 5x + 6 = (x - 2)(x - 3)

    Two distinct linear factors means the integrand splits into two simple fractions with constant numerators — no repeated-root or irreducible-quadratic complications. The degree of the numerator (11) is already below the degree of the denominator (22), so no preliminary long division is needed.

  2. Set up the partial-fraction decomposition.

    x+3(x2)(x3)=Ax2+Bx3\frac{x + 3}{(x-2)(x-3)} = \frac{A}{x-2} + \frac{B}{x-3}

    Multiplying through by (x2)(x3)(x-2)(x-3) clears the denominators:

    x+3=A(x3)+B(x2)x + 3 = A(x - 3) + B(x - 2)

  3. Find A and B by substituting the roots. The fastest route is to plug in the values that kill one bracket at a time. Setting x=3x = 3:

    6=B(32)  B=66 = B(3 - 2) \ \Longrightarrow \ B = 6

    Setting x=2x = 2:

    5=A(23)  A=55 = A(2 - 3) \ \Longrightarrow \ A = -5

    (Matching coefficients gives the same system A+B=1A + B = 1, 3A2B=3-3A - 2B = 3.)

  4. Verify the decomposition before integrating. With A=5A = -5 and B=6B = 6:

    5x2+6x3=5(x3)+6(x2)(x2)(x3)=x+3(x2)(x3) \frac{-5}{x-2} + \frac{6}{x-3} = \frac{-5(x-3) + 6(x-2)}{(x-2)(x-3)} = \frac{x + 3}{(x-2)(x-3)} \ \checkmark

    Checking here costs one line and catches sign errors before they propagate into the integral.

  5. Integrate each term. Each piece is of the form kxadx=klnxa\int \frac{k}{x - a}\,dx = k\ln|x - a|:

    (5x2+6x3)dx=5lnx2+6lnx3+C\int \left(\frac{-5}{x-2} + \frac{6}{x-3}\right) dx = -5\ln|x - 2| + 6\ln|x - 3| + C

    The absolute values matter: the antiderivative is valid on each of the three intervals x<2x < 2, 2<x<32 < x < 3, x>3x > 3 separately.

  6. Differentiate back as a final check.

    ddx(5lnx2+6lnx3)=5x2+6x3=x+3x25x+6 \frac{d}{dx}\left(-5\ln|x-2| + 6\ln|x-3|\right) = \frac{-5}{x-2} + \frac{6}{x-3} = \frac{x+3}{x^2 - 5x + 6} \ \checkmark

    A numeric spot check at x=5x = 5 gives 86=1.33\frac{8}{6} = 1.3\overline{3} from both forms. The answer can also be written as ln(x3)6(x2)5+C\ln\left|\frac{(x-3)^6}{(x-2)^5}\right| + C.

Answer

5lnx2+6lnx3+C-5\ln|x - 2| + 6\ln|x - 3| + C

Need to solve a different problem like this? Open the solver →