Integrals: functions and by parts

Partial fractions and integration

A rational function with denominator (x−a)(x−b)(x-a)(x-b) splits into Ax−a+Bx−b\frac{A}{x-a}+\frac{B}{x-b}, and each term integrates to a log⁡\log.

1(x−a)(x−b)=1a−b(1x−a−1x−b)(a≠b)\begin{gathered} \frac{1}{(x-a)(x-b)} \\[4pt] =\frac{1}{a-b}\left(\frac{1}{x-a}-\frac{1}{x-b}\right)\quad(a\neq b) \end{gathered}

Multiply both sides of 1(x−4)(x+4)=Ax−4+Bx+4\frac{1}{(x-4)(x+4)}=\frac{A}{x-4}+\frac{B}{x+4} by (x−4)(x+4)(x-4)(x+4) to get 1=A(x+4)+B(x−4)1=A(x+4)+B(x-4). Setting x=4x=4 gives A=18A=\frac{1}{8}, and setting x=−4x=-4 gives B=−18B=-\frac{1}{8}.

After splitting, integrate term by term.

∫(1x−3−1x+2)dx=log⁡∣x−3∣−log⁡∣x+2∣+C\begin{gathered} \int\left(\frac{1}{x-3}-\frac{1}{x+2}\right)dx \\[4pt] =\log|x-3|-\log|x+2|+C \end{gathered}

This uses ∫1x−a dx=log⁡∣x−a∣+C\int\frac{1}{x-a}\,dx=\log|x-a|+C, so keep the absolute value bars.

Examples

  1. 01Integrate:∫(1x−3−1x+2)dx\displaystyle \int \left(\frac{1}{x-3} - \frac{1}{x+2}\right)dxAnswerHide
    Answerlog⁡e∣x−3∣−log⁡e∣x+2∣+C\displaystyle \log_e|x-3| - \log_e|x+2|+C

    Steps

    1. Both pieces have the shape 1x\frac{1}{x}, so both become log⁡\log, and the subtraction stays a subtraction
    2. ∫(1x−3−1x+2)dx\displaystyle \int \left(\frac{1}{x-3}-\frac{1}{x+2}\right)dx=log⁡e∣x−3∣−log⁡e∣x+2∣+C\displaystyle = \log_e|x-3|-\log_e|x+2|+C
    3. Do not turn the difference into a sum; that is a different function
  2. 02What is A?1(x−4)(x+4)=Ax−4+Bx+4\displaystyle \frac{1}{(x-4)(x+4)} = \frac{A}{x-4} + \frac{B}{x+4}AnswerHide
    Answer18\displaystyle \frac{1}{8}

    Steps

    1. Multiply both sides by x−4x-4: the left becomes 1x+4\frac{1}{x+4}. Now put x=4x=4 in
    2. 14+4\displaystyle \frac{1}{4+4}=18\displaystyle = \frac{1}{8}
    3. BB works the same way, but with x=−4x=-4, so its sign is opposite
  3. 03What goes in □?2(x−4)(x+1)=Ax−4+B□\displaystyle \frac{2}{(x-4)(x+1)} = \frac{A}{x-4} + \frac{B}{\square}AnswerHide
    Answerx+1\displaystyle x+1

    Steps

    1. The denominators you split into are exactly the factors, taken one at a time
    2. The factors of (x−4)(x+1)(x-4)(x+1) are x−4x-4 and x+1x+1; signs and powers stay as they are
  4. 04Integrate:∫(1x−2−1x+4)dx\displaystyle \int \left(\frac{1}{x-2} - \frac{1}{x+4}\right)dxAnswerHide
    Answerlog⁡e∣x−2∣−log⁡e∣x+4∣+C\displaystyle \log_e|x-2| - \log_e|x+4|+C

    Steps

    1. Both pieces have the shape 1x\frac{1}{x}, so both become log⁡\log, and the subtraction stays a subtraction
    2. ∫(1x−2−1x+4)dx\displaystyle \int \left(\frac{1}{x-2}-\frac{1}{x+4}\right)dx=log⁡e∣x−2∣−log⁡e∣x+4∣+C\displaystyle = \log_e|x-2|-\log_e|x+4|+C
    3. Do not turn the difference into a sum; that is a different function
  5. 05Integrate:∫(1x−4−1x+2)dx\displaystyle \int \left(\frac{1}{x-4} - \frac{1}{x+2}\right)dxAnswerHide
    Answerlog⁡e∣x−4∣−log⁡e∣x+2∣+C\displaystyle \log_e|x-4| - \log_e|x+2|+C

    Steps

    1. Both pieces have the shape 1x\frac{1}{x}, so both become log⁡\log, and the subtraction stays a subtraction
    2. ∫(1x−4−1x+2)dx\displaystyle \int \left(\frac{1}{x-4}-\frac{1}{x+2}\right)dx=log⁡e∣x−4∣−log⁡e∣x+2∣+C\displaystyle = \log_e|x-4|-\log_e|x+2|+C
    3. Do not turn the difference into a sum; that is a different function
  6. 06What is A?1(x−1)(x+1)=Ax−1+Bx+1\displaystyle \frac{1}{(x-1)(x+1)} = \frac{A}{x-1} + \frac{B}{x+1}AnswerHide
    Answer12\displaystyle \frac{1}{2}

    Steps

    1. Multiply both sides by x−1x-1: the left becomes 1x+1\frac{1}{x+1}. Now put x=1x=1 in
    2. 11+1\displaystyle \frac{1}{1+1}=12\displaystyle = \frac{1}{2}
    3. BB works the same way, but with x=−1x=-1, so its sign is opposite

FAQ

Q1What is a quick way to find AA and BB?AnswerHide
A
In the equation cleared of denominators, substitute the xx that makes a factor zero. In 1=A(x+4)+B(x−4)1=A(x+4)+B(x-4), setting x=4x=4 removes the BB term and leaves only AA. Comparing coefficients gives the same answer.
Q2What if the numerator's degree is at least the denominator's?AnswerHide
A
Divide first, to get a polynomial plus a fraction whose numerator has lower degree than the denominator. Split into partial fractions after that.

Published 2026-10-14 · Updated 2026-10-14