Breaking a rational function into simpler fractions: long division first, the forms contributed by distinct linear, repeated linear and irreducible quadratic factors, finding the coefficients by substituting roots or comparing them, and integrating the pieces.
Subject: Calculus II · 66 slides · symbolic lesson
Open the interactive version of this deck
Title
Calculus II · Section 3.4
Taking a rational function apart into pieces you can integrate
Objectives
You can already integrate one over a linear expression, and one over x squared plus a constant. This lesson reduces every rational function, a polynomial over a polynomial, to a sum of exactly those.
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 298 — learning objectives 3.4.1 to 3.4.4
So far in this chapter you have met integration by parts and trigonometric substitution, each a way of turning a hard integral into an easier one. Partial fractions is the same kind of move, aimed at one very common family: a polynomial divided by a polynomial.
The surprise of the method is that almost none of it is calculus. The integration at the end uses only the logarithm, the power rule and the inverse tangent, which you have known since Volume 1. The real work is algebra: dividing, factoring, predicting the shape of the answer, and finding a handful of constants.
Because the algebra is where marks are lost, the lesson keeps asking you to check it. Every worked example ends with a genuine check, either by differentiating the answer back, by comparing a definite integral with a numerical estimate, or by testing one value of x.
Warm-up
\[ \frac{1}{x+1} + \frac{2}{x-2} \]
Discussion prompt
Combine these into a single fraction over a common denominator. Then integrate the ORIGINAL two fractions. Which of the two forms was easier to integrate?
Write out the combination before revealing the answer. Adding fractions is a skill from long before calculus, and it is exactly the skill this lesson runs backwards.
Notice the asymmetry. Going forwards, from two simple fractions to one combined fraction, is mechanical: multiply out and collect. Going backwards, from the combined fraction to the pieces, is not obvious at all, because you have to guess what the pieces were.
Now compare the two integrals. The pieces each integrate to a logarithm in one line. The combined fraction, three x over a quadratic, is not in any table you know. So the backwards direction is worth learning: it turns an integral you cannot do into two that you can.
Section
Part 1
Concept
The warm-up showed that one hard integrand is secretly two easy ones.
\[ \int\frac{3x}{x^2-x-2}\,dx = \int\left(\frac{1}{x+1} + \frac{2}{x-2}\right)dx \]
Figure (svg): The graph of 3x over x squared minus x minus 2, with vertical asymptotes at x equals minus 1 and x equals 2, drawn solid; the two simple fractions 1 over x plus 1 and 2 over x minus 2 drawn dashed, each blowing up at only one of the two asymptotes.
partial fraction decomposition — Rewriting a rational function as a sum of simpler fractions whose denominators are the factors of the original denominator.
The whole method is learning to predict the form of those simpler fractions from the factors, then finding their numerators.
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 298 — introduction
Look at the picture. The solid curve is the fraction you want to integrate. The two dashed curves are the pieces, one over x plus 1 and two over x minus 2. At every x, the solid height is exactly the dashed heights added together.
Each dashed piece blows up at only one of the two vertical asymptotes, and the combined curve blows up at both. That is a first hint about how the method works: each factor of the denominator is responsible for one piece, and each piece is responsible for the behaviour near one asymptote.
The definition names the process. You will spend the rest of the lesson answering two questions about it: what shape the pieces must take for a given denominator, and how to find the numbers on top of them.
Concept
Only three kinds of piece ever appear, and each integrates by a substitution from Chapter 1 or 2 of Volume 1.
\[ \int\frac{A}{ax+b}\,dx = \frac{A}{a}\ln|ax+b| + C \]
\[ \int\frac{A}{(ax+b)^k}\,dx = \frac{A}{a}\cdot\frac{(ax+b)^{1-k}}{1-k} + C, \quad k \ge 2 \]
\[ \int\frac{du}{u^2+a^2} = \frac{1}{a}\tan^{-1}\left(\frac{u}{a}\right) + C \]
A single linear factor gives a logarithm, a power of one gives a power, and a quadratic with no real zeros gives an inverse tangent (plus a logarithm, as Part 5 shows).
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 298 — the two integrals the section starts from
Before learning to decompose anything, it helps to see where you are heading. Every decomposition in this lesson ends in pieces of just three kinds, and all three integrate by methods you already have.
A constant over a linear expression is a logarithm, with a factor of one over a from the substitution u equals ax plus b. A constant over a power of a linear expression, with the power at least two, is the power rule after the same substitution. And a constant over a sum of squares is an inverse tangent.
The only piece that needs any extra thought is a linear numerator over an irreducible quadratic, which Part 5 splits into a logarithm and an inverse tangent. Keep this slide in mind as the destination: the goal of all the algebra is to reach these forms.
Intuition
Every polynomial with real coefficients factors into linear factors and quadratic factors that have no real zeros. That is a theorem of algebra; the section takes it on trust, and so will you.
\[ Q(x) = (\text{linear})(\text{linear})\cdots(\text{irreducible quadratic})\cdots \]
Each factor contributes its own small group of terms, so once the denominator is factored, the shape of the answer is fixed. Only the constants remain to be found.
That is why factoring the denominator is the real work, and why a wrong factorization ruins everything after it.
The method works because of a fact from algebra: any polynomial with real coefficients can be written as a product of linear factors and quadratic factors that have no real zeros. You will not prove this, but you rely on it every time you set up a decomposition.
Once the denominator is factored, the shape of the decomposition is completely determined. A single linear factor always contributes one term, a repeated one a term for each power, and a quadratic a term with a linear numerator. There is no creativity involved in choosing the form, only in factoring.
That is why most errors in this topic are made before any constant is found. A missed factor, a quadratic that was not recognised as reducible, or a repeated factor treated as single will send all the later algebra in the wrong direction.
Counterexample
Discussion prompt
Someone claims: every rational function is a sum of constants over linear factors. Give two counterexamples of different kinds, and say which later part of the lesson repairs each one.
Write your two counterexamples before revealing. Breaking the naive claim is a good way to see exactly what the method has to handle.
The first kind of failure is an improper fraction. Every sum of constants over linear factors dies away as x grows, but x squared over x squared minus 1 levels off at one. The one has to come out first, by long division.
The second kind of failure is a denominator with no real zeros, such as x squared plus 1. It has no linear factors to put anything over. The fix is a new kind of term, with a linear numerator over the quadratic itself.
There is a third failure the claim also misses: a squared factor. That one gets its own part, because the repair, a term for every power, is the least obvious of the three.
Section
Part 2
Concept
proper rational function — A quotient of polynomials whose numerator has strictly smaller degree than its denominator. Otherwise it is improper.
Figure (svg): Two panels. Left: the proper fraction 3x over x squared minus x minus 2 for x from 3 to 20, falling toward the x-axis. Right: the improper fraction x squared over x squared minus 1 for x from 1.2 to 20, levelling off at the dashed line y equals 1, never at zero.
Partial fractions only ever produce proper pieces, and every proper piece tends to zero for large x. So only a proper fraction can equal a sum of them. An improper one must first be split by long division.
\[ \frac{P(x)}{Q(x)} = A(x) + \frac{R(x)}{Q(x)}, \quad \deg R < \deg Q \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 298 — the degree condition and long division
The degree check is the first thing to do with any rational function, before factoring or anything else. It takes a glance and it decides whether the rest of the method applies directly.
The picture shows why the check matters. On the left, a proper fraction sinks toward zero as x grows. Every partial fraction behaves like that, so any sum of them does too. On the right, an improper fraction levels off at one. No sum of pieces that all sink to zero can level off at one, so no decomposition of the kind you are learning can represent it.
Long division fixes this. It pulls out a polynomial, the part that does not die away, and leaves a remainder of lower degree than the denominator. The polynomial integrates by the power rule, and only the remainder needs partial fractions.
Worked example
The numerator has degree two, the denominator degree one: improper.
\[ \int\frac{x^2+3x+5}{x+1}\,dx \]
Divide the leading terms
Why: x squared over x is x; subtract x times the divisor.
\[ x^2+3x+5 - x(x+1) = 2x + 5 \]
Divide again
Why: 2x over x is 2; subtract 2 times the divisor.
\[ 2x + 5 - 2(x+1) = 3 \]
Write quotient plus remainder
Why: The remainder 3 has degree zero, below one, so this is the proper form.
\[ \frac{x^2+3x+5}{x+1} = x + 2 + \frac{3}{x+1} \]
Figure (svg): The graph of x squared plus 3x plus 5 over x plus 1, two branches either side of the vertical asymptote x equals minus 1, hugging the dashed slant line y equals x plus 2 far from the asymptote.
Integrate term by term
Why: Power rule, then a logarithm.
\[ \int\left(x + 2 + \frac{3}{x+1}\right)dx = \frac12 x^2 + 2x + 3\ln|x+1| + C \]
Check by differentiating
Why: The derivative must give back the quotient plus remainder, and recombining that gives the integrand.
\[ \frac{d}{dx}\left[\tfrac12 x^2 + 2x + 3\ln|x+1|\right] = x + 2 + \frac{3}{x+1} = \frac{x^2+3x+5}{x+1} \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, pp. 298-299 — Example 3.28
This example is here to rehearse long division, and it happens that the division finishes the job: the denominator is a single linear factor, so the remainder is already a simple fraction.
Follow the division one step at a time. Divide the leading term x squared by x to get x, multiply back, subtract, and you are left with 2x plus 5. Divide again to get 2, subtract, and the remainder is 3. The quotient is x plus 2 and the remainder is three over x plus 1.
The graph shows what the division found. Far from the asymptote the curve hugs the slant line y equals x plus 2, the quotient. The remainder is the vertical gap between the curve and that line, which shrinks as x grows. The check differentiates the answer: the derivative returns the quotient plus the remainder, and recombining that over x plus 1 gives back the numerator you started with.
Worked example
\[ \int\frac{x-3}{x+2}\,dx \]
Compare the degrees
Why: One over one: equal, so improper.
\[ \deg(x-3) = \deg(x+2) = 1 \]
Rewrite the numerator around the denominator
Why: Add and subtract 2 so that the divisor appears.
\[ x - 3 = (x+2) - 5 \]
Split the fraction
Why: Quotient 1, remainder minus 5.
\[ \frac{x-3}{x+2} = 1 - \frac{5}{x+2} \]
Integrate
Why: A constant and a logarithm.
\[ \int\left(1 - \frac{5}{x+2}\right)dx = x - 5\ln|x+2| + C \]
Check by differentiating
Why: Recombine over the common denominator.
\[ \frac{d}{dx}\left[x - 5\ln|x+2|\right] = 1 - \frac{5}{x+2} = \frac{x+2-5}{x+2} = \frac{x-3}{x+2} \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 299 — Checkpoint 3.17
Equal degrees are the case people most often wave through. A linear expression over a linear expression looks simple, but it is improper, and it has to be divided.
For a divisor this small you can skip formal long division and use a trick: rewrite the numerator so that the denominator appears inside it. x minus 3 is the same as x plus 2, minus 5. Splitting the fraction then gives one minus five over x plus 2 at once.
The integral is x minus five times the logarithm of the absolute value of x plus 2. The check differentiates it and puts the result back over a common denominator, which returns x minus 3 over x plus 2. Whenever you use a trick like adding and subtracting a number, a check of this kind is cheap insurance.
Sorting
Sort into buckets
Sort each rational function: can you decompose it straight away, or must you divide first?
Compare degrees for each item before sorting it. For the one whose denominator is the square of a quadratic, remember that squaring doubles the degree, so its degree is four.
Three of these are improper. Two have equal degrees, which counts as improper, and one has a numerator of degree four over a denominator of degree two. Each of those must be divided before anything else happens.
The other three are proper, and happen to be the integrands of Examples 3.29, 3.33 and 3.35. When a fraction is proper you move straight on to factoring the denominator. The point of sorting them now is to make the degree check a habit you run before you do anything else.
Worked example
Find the area under the curve from x equal to 0 to x equal to 4.
\[ \int_0^4 \frac{x}{1+x}\,dx \]
Divide
Why: Write the numerator as the denominator minus 1.
\[ \frac{x}{1+x} = \frac{(1+x) - 1}{1+x} = 1 - \frac{1}{1+x} \]
Find an antiderivative
Why: A constant and a logarithm; on this interval one plus x is positive.
\[ \int\left(1 - \frac{1}{1+x}\right)dx = x - \ln(1+x) \]
Evaluate from 0 to 4
Why: At 0 both terms are zero.
\[ \Big[x - \ln(1+x)\Big]_0^4 = 4 - \ln 5 \]
Convert to a decimal
Why: The natural log of 5 is about 1.6094.
\[ 4 - \ln 5 \approx 4 - 1.6094 = 2.3906 \]
Figure (svg): The curve y equals x over 1 plus x from 0 to 5, rising toward the dashed line y equals 1, with the region under it from x equals 0 to x equals 4 shaded.
Check against the picture and a numerical rule
Why: The curve stays below height 1, so the area must be under 4, and Simpson's rule with 2000 strips agrees to ten places.
\[ 2.3906 < 4, \qquad \text{Simpson: } 2.3905620876 \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 309 — Exercise 230
This is an area problem, and the integrand is improper: degree one over degree one. The quickest division is the same trick as in the checkpoint, writing x as one plus x, minus 1.
After that the integral is a constant and a logarithm. From 0 to 4 the result is exactly four minus the natural log of 5, which is about 2.3906.
The picture explains the answer. The curve rises toward the dashed line at height one, so the region sits inside a strip of height one and width four, which has area four. The region falls short of the strip by the area under one over one plus x, which is ln 5. The check confirms the value two ways: it must be less than four, and Simpson's rule on the original integrand agrees to ten decimal places.
Trap
Skipping the degree check:
\[ \frac{x^2}{x^2-1} = \frac{A}{x-1} + \frac{B}{x+1} \]
\[ x^2 = A(x+1) + B(x-1) \]
Wrong. No constants can make this true.
The right side has degree one and the left degree two, so the x squared term can never match. Divide first: the quotient is 1 and the remainder is proper.
\[ \frac{x^2}{x^2-1} = 1 + \frac{1}{x^2-1} \]
\[ = 1 + \frac{1/2}{x-1} - \frac{1/2}{x+1} \]
This slip is easy to make because x squared minus 1 factors so invitingly. You see two linear factors and write two terms before checking the degrees.
The failure is complete, not partial. After clearing denominators the right side has degree one, whatever A and B are, and the left side has degree two. No choice of constants can match an x squared term that only one side has. If you use equating coefficients you will find the system has no solution; if you plug in roots you will get numbers that do not actually work.
The repair takes one line. Divide first to pull out the 1, and the remainder, one over x squared minus 1, decomposes into one half over x minus 1, minus one half over x plus 1. The degree check would have prevented the whole detour.
Section
Part 3
Concept
Once the fraction is proper, factor the denominator. If it splits into different linear factors, each one gets a single term with an unknown constant on top.
\[ \frac{P(x)}{(a_1x+b_1)(a_2x+b_2)\cdots(a_nx+b_n)} = \frac{A_1}{a_1x+b_1} + \cdots + \frac{A_n}{a_nx+b_n} \]
There are n unknown constants and the denominator has degree n. That match between unknowns and degree holds for every form in this lesson, and it is your quickest check on a set-up.
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 299 — nonrepeated linear factors
This is the simplest case and the one you will meet most often. Every factor of the denominator is linear, and no factor repeats. Each factor then gets exactly one term, with an unknown constant on top.
Why only a constant on top? Because each term must itself be a proper fraction, and over a linear denominator the only proper numerator is a constant.
Notice the counting at the end of the slide. The number of unknowns equals the degree of the denominator. You will see that rule hold for every kind of factor in this lesson, and it gives you a quick check on any set-up: count the constants, compare with the degree, and if they differ you have left out a term.
Notation
Annotate
On: \( \frac{P(x)}{Q(x)} = \frac{A_1}{a_1x+b_1} + \frac{A_2}{a_2x+b_2} + \cdots + \frac{A_n}{a_nx+b_n} \)
Step through the notes one at a time. The first reminds you of the two conditions for this form: the fraction is proper, and the denominator is fully factored into linear factors that are all different.
The constants are numbers, not expressions. A common beginner's error is to put x on top of a linear factor, which makes the term improper and gives too many unknowns.
The last note is about existence. The book states that the constants always exist and leaves the proof for a later course. In practice you never need the proof, because in every problem you will actually find the constants, and a check confirms they work.
Concept
Multiply both sides of the set-up by the whole denominator. What remains is an equation between two polynomials.
\[ \frac{3x+2}{x(x-2)(x+1)} = \frac{A}{x} + \frac{B}{x-2} + \frac{C}{x+1} \]
\[ 3x+2 = A(x-2)(x+1) + Bx(x+1) + Cx(x-2) \]
It must hold for every x, not just a few: two polynomials that agree at infinitely many points are the same polynomial. That gives you two ways in.
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 300 — equation 3.8 and the two methods
Multiplying by the whole denominator turns an equation between fractions into an equation between polynomials. That is equation 3.8 in the book, and everything in the next two slides starts from it.
The key point is that this equation holds for every value of x. It came from an equation between fractions, which holds wherever the fractions are defined, so everywhere except the three roots. But two polynomials that agree at infinitely many points must be identical, so the equation also holds at the roots themselves.
That observation gives the two methods. Because the polynomials are identical, their coefficients match power by power, which is equating coefficients. Because the equation holds for every x, you may substitute any x you like, including the roots, which is strategic substitution. The next two slides do the same example both ways.
Worked example
\[ \int\frac{3x+2}{x^3-x^2-2x}\,dx \]
Factor the denominator
Why: Take out x, then factor the quadratic.
\[ x^3-x^2-2x = x(x^2-x-2) = x(x-2)(x+1) \]
Clear the denominators
Why: Three distinct linear factors, three constants.
\[ 3x+2 = A(x-2)(x+1) + Bx(x+1) + Cx(x-2) \]
Expand and collect powers of x
Why: Each product is a quadratic.
\[ 3x+2 = (A+B+C)x^2 + (-A+B-2C)x - 2A \]
Equate the coefficients
Why: x squared, then x, then the constant.
\[ A+B+C = 0, \quad -A+B-2C = 3, \quad -2A = 2 \]
Solve the last equation first
Why: It has one unknown.
\[ A = -1 \]
Substitute into the other two
Why: Two equations in B and C.
\[ B + C = 1, \quad B - 2C = 2 \]
Subtract them
Why: B cancels.
\[ 3C = -1 \;\Longrightarrow\; C = -\tfrac13, \quad B = \tfrac43 \]
Check in the equation not used last
Why: All three must hold; this system is consistent only because the set-up was right.
\[ -A + B - 2C = 1 + \tfrac43 + \tfrac23 = 3 \;\checkmark \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 300 — Example 3.29, method of equating coefficients
Start by factoring. Take out a common x, then factor the quadratic x squared minus x minus 2 into x minus 2 times x plus 1. Three distinct linear factors give three unknown constants.
Expanding each product and collecting powers of x is the part that needs care. A times x minus 2 times x plus 1 is A times x squared minus x minus 2; do the same for B and C and group the x squared terms, the x terms, and the constants. Then match each group with the left side, which has no x squared term, three x, and a constant 2.
Solve the easiest equation first: minus 2A equals 2 gives A equals minus 1 straight away. The other two equations reduce to a pair in B and C. The check substitutes back into an equation, and the book's remark is worth remembering: this system is consistent only because the set-up was right. A wrong set-up gives a system with no solution.
Worked example
\[ 3x+2 = A(x-2)(x+1) + Bx(x+1) + Cx(x-2) \]
Put x equal to 0
Why: The B and C terms both contain x and vanish.
\[ 2 = A(-2)(1) \;\Longrightarrow\; A = -1 \]
Put x equal to 2
Why: Now the A and C terms vanish.
\[ 8 = B(2)(3) \;\Longrightarrow\; B = \tfrac43 \]
Put x equal to minus 1
Why: Only the C term survives.
\[ -1 = C(-1)(-3) \;\Longrightarrow\; C = -\tfrac13 \]
Rewrite the integrand
Why: Three simple fractions.
\[ \int\left(-\frac1x + \frac{4/3}{x-2} - \frac{1/3}{x+1}\right)dx \]
Integrate each piece
Why: Three logarithms.
\[ = -\ln|x| + \tfrac43\ln|x-2| - \tfrac13\ln|x+1| + C \]
Check on the interval from 3 to 4
Why: The antiderivative's change must equal a numerical integral of the original fraction.
\[ F(4) - F(3) = 0.5621330, \qquad \text{Simpson: } 0.5621330 \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, pp. 300-301 — Example 3.29, method of strategic substitution
Here is the same equation solved the fast way. At x equal to 0, every term containing x vanishes, leaving only the A term. At x equal to 2, the factor x minus 2 kills the A and C terms. At x equal to minus 1, only the C term survives. Each substitution isolates one constant.
Compare this with the previous slide. Three quick substitutions replaced an expansion and a linear system. This is why strategic substitution is usually the first thing to try when the denominator has distinct linear factors.
With the constants in hand the integral is three logarithms. For the check, the antiderivative is evaluated at 4 and at 3, and the difference is compared with Simpson's rule applied directly to the original fraction. They agree to seven places, which confirms both the constants and the integration.
Picture it
Figure (svg): The graph of 3x plus 2 over x times x minus 2 times x plus 1, drawn solid with three vertical asymptotes at minus 1, 0 and 2. Near each asymptote a dashed curve, the single partial fraction for that factor, lies almost on top of it.
Near x equal to 2, the factors x and x plus 1 are just the numbers 2 and 3, so the whole fraction behaves like eight over six, divided by x minus 2. Eight sixths is four thirds, the constant B. Substituting the root is reading off that local behaviour.
This picture explains why substituting a root works. Near x equal to 2, the solid curve and the dashed curve four thirds over x minus 2 nearly coincide. Close to that asymptote, the other two factors, x and x plus 1, are simply the numbers 2 and 3.
So near x equal to 2, the whole fraction behaves like its numerator at 2, which is 8, divided by 2 times 3, all over x minus 2. Eight sixths is four thirds, exactly the constant B. The same reasoning at the other two asymptotes gives minus 1 and minus one third.
This is sometimes called the cover-up rule: cover the factor you are interested in, and evaluate what is left at that factor's root. It is the same calculation as strategic substitution, seen as a statement about how strongly the graph blows up at each asymptote, and in which direction.
Prediction
\[ \frac{5}{(x-1)(x+4)} = \frac{A}{x-1} + \frac{B}{x+4} \]
Predict first
What is A?
Correct: A = 1
Why: Clear denominators: 5 = A(x + 4) + B(x − 1). Put x = 1 and the B term vanishes, leaving 5 = 5A, so A = 1. Put x = −4 to get 5 = −5B, so B = −1. The two constants add to zero, as they must: for large x the left side falls like five over x squared, so nothing like one over x may survive.
Commit to an answer first. You can get it in your head with the cover-up rule: cover the factor x minus 1, and evaluate what is left, five over x plus 4, at x equal to 1.
Five over five is one, so A equals 1. The same move for B covers x plus 4 and evaluates five over x minus 1 at minus 4, giving minus 1.
The explanation mentions a free check worth adopting. When the numerator is a constant and the denominator is a product of distinct linear factors, the constants must add to zero, because the original fraction falls off like one over x squared, and any leftover one over x behaviour would be too slow. Here one plus minus one is zero, as it should be.
Worked example
\[ \int\frac{x^2+3x+1}{x^2-4}\,dx \]
Divide
Why: Equal degrees; the quotient is 1.
\[ x^2+3x+1 - (x^2-4) = 3x+5 \]
Write quotient plus remainder
Why: The remainder has degree one, below two.
\[ \frac{x^2+3x+1}{x^2-4} = 1 + \frac{3x+5}{(x-2)(x+2)} \]
Set up and clear the remainder
Why: Two distinct linear factors.
\[ 3x+5 = A(x+2) + B(x-2) \]
Substitute the roots
Why: x equal to 2, then minus 2.
\[ 11 = 4A \;\Rightarrow\; A = \tfrac{11}{4}, \qquad -1 = -4B \;\Rightarrow\; B = \tfrac14 \]
Integrate
Why: A constant and two logarithms.
\[ \int\left(1 + \frac{11/4}{x-2} + \frac{1/4}{x+2}\right)dx = x + \tfrac{11}{4}\ln|x-2| + \tfrac14\ln|x+2| + C \]
Check at a point that is not a root
Why: At x equal to 3 the original is 19 over 5; the decomposed form must agree.
\[ 1 + \frac{11/4}{1} + \frac{1/4}{5} = 1 + 2.75 + 0.05 = 3.8 = \frac{19}{5} \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 301 — Example 3.30
This example combines the two skills so far. The degrees are equal, so divide first. The quotient is 1, and subtracting x squared minus 4 from the numerator leaves the remainder 3x plus 5.
The remainder is proper and its denominator factors as a difference of squares, so the decomposition has two constant terms. Substituting 2 and then minus 2 gives eleven quarters and one quarter.
Do not lose the quotient. It is the 1 at the front of the integrand, and it integrates to x. Forgetting it is the most common error in divide-first problems. The check chooses x equal to 3, which is not a root, and confirms that one plus eleven quarters plus one twentieth equals nineteen fifths, the value of the original fraction there.
Worked example
\[ \int\frac{\cos x}{\sin^2 x - \sin x}\,dx \]
Substitute u for sine
Why: The cosine is exactly the derivative that du needs.
\[ u = \sin x, \quad du = \cos x\,dx \]
Rewrite as a rational integral
Why: Factor the new denominator.
\[ \int\frac{du}{u^2 - u} = \int\frac{du}{u(u-1)} \]
Decompose
Why: 1 = A(u − 1) + Bu; u equal to 0 gives A, u equal to 1 gives B.
\[ 1 = A(u-1) + Bu \;\Rightarrow\; A = -1, \; B = 1 \]
Integrate in u
Why: Two logarithms.
\[ \int\left(-\frac1u + \frac{1}{u-1}\right)du = -\ln|u| + \ln|u-1| + C \]
Return to x
Why: Replace u by sine.
\[ = -\ln|\sin x| + \ln|\sin x - 1| + C \]
Check by differentiating
Why: Chain rule on each logarithm, then a common denominator.
\[ -\frac{\cos x}{\sin x} + \frac{\cos x}{\sin x - 1} = \frac{\cos x}{\sin x(\sin x - 1)} \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 302 — Example 3.31
This integrand is not a rational function of x at all. It is a quotient of trigonometric functions. But the cosine on top is exactly the derivative of sine, which is the signal for the substitution u equals sine x.
After the substitution the integral is one over u squared minus u, a rational function of u, and the method applies. Factor to u times u minus 1, and substitute u equal to 0 and u equal to 1 to get the constants minus 1 and 1.
Integrate in u, then replace u by sine x. The check differentiates the final answer with the chain rule, and combining the two fractions over sine x times sine x minus 1 returns the original integrand. Several exercises at the end of the section work the same way, with exponentials instead of sines.
Worked example
\[ \int\frac{x+1}{(x+3)(x-2)}\,dx \]
Set up and clear
Why: Proper already; two distinct factors.
\[ x+1 = A(x-2) + B(x+3) \]
Put x equal to 2
Why: The A term vanishes.
\[ 3 = 5B \;\Longrightarrow\; B = \tfrac35 \]
Put x equal to minus 3
Why: The B term vanishes.
\[ -2 = -5A \;\Longrightarrow\; A = \tfrac25 \]
Integrate
Why: Two logarithms.
\[ \int\left(\frac{2/5}{x+3} + \frac{3/5}{x-2}\right)dx = \tfrac25\ln|x+3| + \tfrac35\ln|x-2| + C \]
Check at x equal to 0
Why: The original is 1 over minus 6; the pieces must add to the same.
\[ \frac{2/5}{3} + \frac{3/5}{-2} = \frac{4}{30} - \frac{9}{30} = -\frac16 \;\checkmark \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 302 — Checkpoint 3.18
This checkpoint is the method at its most direct. The fraction is already proper and the denominator is already factored, so you go straight to clearing denominators.
Substituting x equal to 2 wipes out the A term and gives B equals three fifths. Substituting x equal to minus 3 wipes out the B term and gives A equals two fifths. Notice that A and B add to one, the coefficient of x in the numerator, which is another quick consistency check.
The integral is two logarithms with those coefficients. The final check tests a value that is not a root, x equal to 0: the original fraction is one over minus 6, and the two pieces add to the same thing. A check at a non-root value is valuable exactly because it is independent of the substitutions you used to find the constants.
Error analysis
Annotate
On: \( 3x+2 = A(x+1) + B(x-2); \quad x = 1: \; 5 = -B \;\Rightarrow\; B = -5 \)
Look for the error before reading the notes. The idea of the calculation is right: substitute a value that makes one term vanish. The execution is not.
The factor is x plus 1, so the value that makes it zero is minus 1, not 1. At x equal to 1 the A term is 2A, which is not zero, and the calculation simply dropped it. The resulting value of B is meaningless.
Sign errors in roots are the single most common arithmetic slip in this topic. A reliable habit is to set each factor equal to zero and solve, rather than reading the root off by eye. The final note shows why checks matter: recombining the correct pieces returns 3x plus 2, and the wrong value of B would fail that test immediately.
Section
Part 4
Concept
Try to decompose a fraction with a squared factor using first powers only.
\[ \frac{x+2}{(x-1)^2(x+1)} \overset{?}{=} \frac{A}{x-1} + \frac{B}{x+1} \]
\[ x+2 = A(x-1)(x+1) + B(x-1)^2 \]
\[ x = 1: \quad 3 = 0 \]
Impossible: every term on the right contains x minus 1. Counting says the same thing: the denominator has degree three, but only two constants were offered. Add a term for the square and the count is right.
\[ \frac{x+2}{(x-1)^2(x+1)} = \frac{-1/4}{x-1} + \frac{3/2}{(x-1)^2} + \frac{1/4}{x+1} \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 302 — repeated linear factors
Try the naive set-up and watch it fail. With only first-power terms, clearing denominators puts a factor of x minus 1 into every term on the right. Substituting x equal to 1 then makes the right side zero, while the left side is 3. That is a contradiction, not a hard calculation.
The counting rule predicted this. The denominator has degree three, since the squared factor counts twice, but the naive set-up offered only two constants. One unknown is missing.
Adding a term with the square in its denominator supplies the missing constant, and the decomposition at the bottom of the slide works. You can check it by substituting x equal to 0: minus a quarter over minus 1, plus three halves over 1, plus a quarter over 1, gives two, and the original fraction at 0 is two over one, also two.
Notation
Annotate
On: \( (ax+b)^n \;\longrightarrow\; \frac{A_1}{ax+b} + \frac{A_2}{(ax+b)^2} + \cdots + \frac{A_n}{(ax+b)^n} \)
Step through the notes. The central rule is one term for each power, from the first power all the way up to the power that appears in the denominator.
Both ends of that list matter. Leaving out the highest power gives the trap later in this part; leaving out the first power gives the contradiction you just saw. Either way the count of constants falls short of the degree.
The last two notes look ahead to the calculation. Only the first-power term integrates to a logarithm; the higher powers integrate by the power rule to negative powers. And when you use strategic substitution, the root of a repeated factor only isolates the constant over the highest power. The others need another method, which the next example shows.
Concept
The higher-power terms are not logarithms. One substitution turns each into the power rule.
\[ u = ax + b, \quad du = a\,dx \]
\[ \int\frac{A}{(ax+b)^k}\,dx = \frac{A}{a}\int u^{-k}\,du \]
\[ = \frac{A}{a}\cdot\frac{u^{1-k}}{1-k} = -\frac{A}{a(k-1)(ax+b)^{k-1}}, \quad k \ge 2 \]
For k equal to 2 the answer is a constant over the linear factor itself. It stays finite in form, but, unlike a logarithm, it grows like one over the distance to the root.
\[ k = 2: \quad \int\frac{3}{(2x-1)^2}\,dx = -\frac{3}{2(2x-1)} + C \]
Before the next example, settle how the new kind of term integrates. A constant over a linear factor to the first power gives a logarithm, but once the power is two or more the logarithm is gone and the power rule takes over.
The substitution u equals ax plus b does all the work. It turns the term into a constant times u to the minus k, and the power rule raises the exponent by one and divides by the new exponent. Because k is at least two, the new exponent is negative, so the answer is a constant over a smaller power of the linear factor.
The slide finishes with the case you will need in a moment, from Example 3.32. The one over a that comes from the substitution is easy to forget, and forgetting it doubles the answer here. Differentiate your result back whenever you are unsure; the chain rule returns the factor of a and cancels it.
Worked example
\[ \int\frac{x-2}{(2x-1)^2(x-1)}\,dx \]
Set up
Why: The squared factor earns two terms, the single factor one.
\[ \frac{x-2}{(2x-1)^2(x-1)} = \frac{A}{2x-1} + \frac{B}{(2x-1)^2} + \frac{C}{x-1} \]
Clear the denominators
Why: Multiply through by the whole denominator.
\[ x-2 = A(2x-1)(x-1) + B(x-1) + C(2x-1)^2 \]
Put x equal to 1
Why: Only the C term survives.
\[ -1 = C(1)^2 \;\Longrightarrow\; C = -1 \]
Put x equal to one half
Why: Only the B term survives.
\[ -\tfrac32 = B\left(-\tfrac12\right) \;\Longrightarrow\; B = 3 \]
Put x equal to 0 for A
Why: No root is left, but B and C are known now.
\[ -2 = A(-1)(-1) + 3(-1) + (-1)(1) \]
Solve
Why: Collect the numbers.
\[ -2 = A - 4 \;\Longrightarrow\; A = 2 \]
Check with the x squared coefficients
Why: Equating coefficients requires 2A + 4C = 0.
\[ 2(2) + 4(-1) = 0 \;\checkmark \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, pp. 302-303 — Example 3.32, equation 3.9
The squared factor 2x minus 1 earns two terms and the single factor x minus 1 earns one, so there are three constants for a denominator of degree three.
Strategic substitution finds two of them quickly. At x equal to 1 only the C term survives, and at x equal to one half only the B term survives. That leaves A with no root to isolate it.
The book's trick is to use any other value of x, now that B and C are known. At x equal to 0 the equation becomes a simple equation in A alone, giving A equals 2. The check uses equating coefficients on the x squared terms, which must satisfy 2A plus 4C equals zero, and they do. Mixing the two methods like this is usually the fastest route.
Worked example
\[ \int\left(\frac{2}{2x-1} + \frac{3}{(2x-1)^2} - \frac{1}{x-1}\right)dx \]
The first power
Why: u equal to 2x minus 1 makes du equal to 2 dx, which cancels the 2.
\[ \int\frac{2}{2x-1}\,dx = \ln|2x-1| \]
The square
Why: The same u, now a power rule.
\[ \int 3(2x-1)^{-2}\,dx = \frac32\cdot\frac{(2x-1)^{-1}}{-1} = -\frac{3}{2(2x-1)} \]
The single factor
Why: A plain logarithm.
\[ \int\frac{-1}{x-1}\,dx = -\ln|x-1| \]
Assemble
Why: One constant of integration for the whole.
\[ \ln|2x-1| - \frac{3}{2(2x-1)} - \ln|x-1| + C \]
Figure (svg): The graph of x minus 2 over 2x minus 1 squared times x minus 1, with vertical asymptotes at x equals one half and x equals 1. Near one half both branches shoot up to plus infinity; near 1 the left branch goes up and the right branch comes up from minus infinity.
Check on the interval from 2 to 3
Why: Compare the antiderivative's change with Simpson's rule on the original integrand.
\[ F(3) - F(2) = 0.0176784, \qquad \text{Simpson: } 0.0176784 \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 303 — Example 3.32
With the constants found, each piece is a standard integral. The first two both use the substitution u equals 2x minus 1, whose du is 2 dx, so a factor of one half appears each time.
The first piece has a 2 on top, which cancels that one half and leaves the logarithm of the absolute value of 2x minus 1. The second is three times 2x minus 1 to the power minus two; the power rule raises the power to minus one and divides by minus one, and the one half from the substitution gives the three over two times 2x minus 1 with a minus sign.
The graph of the integrand shows both kinds of factor at once: near one half both sides shoot up, the signature of a squared factor, and near 1 the sign flips, the signature of a single one. The check compares the antiderivative's change from 2 to 3 with Simpson's rule on the original, and they agree.
Picture it
Figure (svg): Two panels. Left: y equals 1 over x minus 1, running down to minus infinity on the left of x equals 1 and up to plus infinity on the right. Right: y equals 1 over x minus 1 squared, going up to plus infinity on both sides of x equals 1.
A first-power factor makes the graph shoot off in opposite directions on its two sides; a squared factor sends both sides the same way. The squared term is not a multiple of the first-power term, so it cannot be left out.
The two panels explain, from the graph, why a squared factor needs its own term. On the left, one over x minus 1 goes to minus infinity just left of 1 and to plus infinity just right of it. On the right, one over the square goes to plus infinity on both sides.
Multiplying the left curve by any constant only stretches it or flips it; it will still point in opposite directions on the two sides. So no multiple of the first-power term can reproduce the same-sign blow-up of a squared factor.
Their integrals differ too. The first power gives a logarithm, which grows slowly near the asymptote. The square gives minus one over x minus 1, which grows much faster. A decomposition that left out either term would be missing a genuinely different kind of behaviour.
Fill the middle
\[ \int\frac{x+2}{(x+3)^3(x-4)^2}\,dx \]
Count the terms before writing the form. Type a whole number in each blank.
Fill in the blanks
The cubed factor x plus 3 earns 3 terms, the squared factor x minus 4 earns 2 terms, so the set-up has 5 unknown constants in all.
Why: The cube earns one term for each power up to 3, and the square one for each power up to 2. Five constants in all, matching the denominator's degree of 3 plus 2.
\[ \frac{A}{x+3} + \frac{B}{(x+3)^2} + \frac{C}{(x+3)^3} + \frac{D}{x-4} + \frac{E}{(x-4)^2} \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 303 — Checkpoint 3.19
The checkpoint asks only for the form, which is the part that requires thought. Finding five constants is routine once the form is right.
The factor x plus 3 appears cubed, so it earns three terms: over the first, second and third powers. The factor x minus 4 appears squared, so it earns two. That is five unknowns, and the denominator's degree is three plus two, which is five, so the count agrees.
Fill in all three blanks before checking; the full form appears after. If you were tempted to write just the highest power of each factor, compare with the trap earlier in this part: the count would have been two, far short of five.
Worked example
\[ \int\frac{dx}{x^3-2x^2-4x+8} \]
Group the terms in pairs
Why: Take x squared from the first pair and minus 4 from the second.
\[ x^2(x-2) - 4(x-2) = (x-2)(x^2-4) \]
Factor completely
Why: The difference of squares repeats the factor x minus 2.
\[ (x-2)(x-2)(x+2) = (x-2)^2(x+2) \]
Set up and clear
Why: Two terms for the square, one for the single factor.
\[ 1 = A(x-2)(x+2) + B(x+2) + C(x-2)^2 \]
Put x equal to 2, then minus 2
Why: Each root isolates one constant.
\[ 1 = 4B \;\Rightarrow\; B = \tfrac14, \qquad 1 = 16C \;\Rightarrow\; C = \tfrac{1}{16} \]
Match the x squared coefficients for A
Why: Only A and C multiply x squared.
\[ 0 = A + C \;\Longrightarrow\; A = -\tfrac{1}{16} \]
Integrate
Why: A logarithm, a power and a logarithm.
\[ -\tfrac{1}{16}\ln|x-2| - \frac{1}{4(x-2)} + \tfrac{1}{16}\ln|x+2| + C \]
Check at x equal to 0
Why: The original is one eighth; the three pieces must add to it.
\[ \frac{-1/16}{-2} + \frac{1/4}{4} + \frac{1/16}{2} = \frac{1}{32} + \frac{2}{32} + \frac{1}{32} = \frac18 \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 308 — Exercise 205
The cubic in the denominator does not come factored, and it has no common factor to take out. Grouping the four terms in pairs works: x squared times x minus 2, then minus 4 times x minus 2, so x minus 2 is a common factor.
What is left is x squared minus 4, a difference of squares, and one of its factors is x minus 2 again. So the denominator is x minus 2 squared, times x plus 2: a repeated factor you would not have seen without factoring completely.
The roots give B and C directly. For A, match the x squared coefficients: only A and C multiply x squared, and the left side has none, so A is minus C. The check at x equal to 0 confirms the three constants: the pieces add to one eighth, the value of the original fraction.
Trap
A squared factor, given only its square:
\[ \frac{x+2}{(x-1)^2(x+1)} \]
\[ = \frac{A}{(x-1)^2} + \frac{B}{x+1} \]
\[ x = 1: \; A = \tfrac32 \]
\[ x = -1: \; B = \tfrac14 \]
Wrong, though both numbers came out cleanly.
Strategic substitution always returns numbers, even for a wrong set-up. Test a third x: at 0 the cleared equation needs 2 on the left but gives only seven quarters on the right.
\[ x = 0: \; A + B = \tfrac74 \ne 2 \]
The fix is a term for each power:
\[ \frac{A_1}{x-1} + \frac{A_2}{(x-1)^2} + \frac{B}{x+1} \]
This trap is more dangerous than the ones before it because nothing visibly goes wrong. Strategic substitution happily produces three halves and one quarter, clean-looking numbers.
But the set-up is short of a constant, and the book warns about exactly this: with a wrong set-up, strategic substitution still returns values, and they are meaningless. The only way to find out is to test the equation somewhere else. At x equal to 0, the right side gives seven quarters, and the left side is 2.
Two defences, then. Count the constants against the degree before you start, and after strategic substitution always test one more value of x. Either would have caught this.
Section
Part 5
Concept
irreducible quadratic — A quadratic with no real zeros, so it cannot be split into real linear factors. The test is a negative discriminant.
\[ ax^2 + bx + c \text{ is irreducible} \iff b^2 - 4ac < 0 \]
Figure (svg): Three parabolas: y equals x squared minus 1 crossing the x-axis at minus 1 and 1 (marked with dots), and y equals x squared plus 1 and y equals x squared plus x plus 1, both staying entirely above the x-axis.
\[ x^2+x+1: \quad 1^2 - 4(1)(1) = -3 < 0 \]
A quadratic whose discriminant is zero or positive is not a new kind of factor: it splits into linear factors (repeated, when the discriminant is zero) and belongs to Parts 3 and 4.
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 304 — irreducible quadratics
The last kind of factor is a quadratic with no real zeros. On the graph, its parabola never touches the x-axis, so there is no real number you could substitute to make it zero, and no linear factors to split it into.
The discriminant decides. If b squared minus 4ac is negative, the quadratic is irreducible. The slide checks x squared plus x plus 1: the discriminant is minus 3, so it stays whole.
Be careful with the other cases. A positive discriminant always means two real factors, even when the roots are irrational. A zero discriminant means a perfect square, which is a repeated linear factor. Only a negative discriminant earns the new treatment of Part 5.
Tweak it
Parameter explorer
The curve is y = x² + 2x + c. Slide c. For which values does the parabola meet the x-axis (so the quadratic factors), and where exactly does it become irreducible?
\[ x^2 + 2x + {c} \]
Start at c equal to minus 3 and move c upward slowly. The parabola crosses the x-axis twice, so the quadratic has two real roots and two linear factors.
As c approaches 1 the two crossing points move together, and at exactly 1 the parabola just touches the axis. That is x plus 1 squared, a repeated linear factor. The discriminant, 4 minus 4c, is zero there.
Push c above 1 and the parabola lifts clear of the axis. Now there are no real roots and the quadratic is irreducible. The readout at the top shows the quadratic you are looking at; the picture is the discriminant test made visible.
Concept
An irreducible quadratic adds two to the degree of the denominator, so it must supply two unknowns. A constant numerator supplies only one; a linear numerator supplies two.
\[ \frac{P(x)}{(x-r)(ax^2+bx+c)} = \frac{A}{x-r} + \frac{Bx + C}{ax^2+bx+c} \]
\[ \text{unknowns: } 1 + 2 = 3 = \deg Q \]
Repeated quadratic factors follow the same rule as repeated linear ones: one term for every power, each with its own linear numerator.
\[ (ax^2+bx+c)^n \;\longrightarrow\; \frac{A_1x+B_1}{ax^2+bx+c} + \cdots + \frac{A_nx+B_n}{(ax^2+bx+c)^n} \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, pp. 303-304 — the problem-solving strategy, steps c and d
Apply the counting rule to a quadratic factor. It adds two to the degree of the denominator, so it has to supply two unknowns. A constant over the quadratic supplies only one. A linear numerator, some constant times x plus another constant, supplies two.
That is the whole reason the numerator over an irreducible quadratic is linear. It is not a special convention; it is what the count demands, and it is also the most general proper numerator over a quadratic.
Repeated quadratic factors follow the rule you already learned for repeated linear ones: one term for each power, and each term gets its own linear numerator. A quadratic squared therefore contributes four constants, which again matches its degree of four.
Concept
Split the numerator: the x part is a multiple of the denominator's derivative, the constant part is an inverse tangent.
\[ \int\frac{Ax+B}{x^2+a^2}\,dx = A\int\frac{x}{x^2+a^2}\,dx + B\int\frac{dx}{x^2+a^2} \]
\[ u = x^2 + a^2, \; du = 2x\,dx: \quad A\int\frac{x\,dx}{x^2+a^2} = \frac{A}{2}\ln(x^2+a^2) \]
\[ B\int\frac{dx}{x^2+a^2} = \frac{B}{a}\tan^{-1}\left(\frac{x}{a}\right) \]
Figure (svg): Two accumulated areas from 0 to x, for x from 0 to 20: one half ln of x squared plus 1, rising without bound, and arctan x, levelling off below the dashed line at pi over 2.
If the quadratic has an x term, complete the square first and shift, as Example 3.34 does.
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, pp. 304-306 — Examples 3.33 and 3.34
This is the one new integration skill of the lesson. Split the numerator into its x part and its constant part, and integrate each separately.
The x part is a multiple of the derivative of the denominator, so the substitution u equals x squared plus a squared turns it into a logarithm. The constant part is one over a sum of squares, which is an inverse tangent.
The graph shows that these are genuinely different functions. The accumulated area under x over x squared plus 1 grows without bound, like a logarithm. The accumulated area under one over x squared plus 1 levels off at pi over 2, like an inverse tangent. When the quadratic has an x term, as in Example 3.34, complete the square first so that it looks like a shifted sum of squares.
Notation
Annotate
On: \( \frac{Ax + B}{ax^2 + bx + c}, \quad b^2 - 4ac < 0 \)
Step through each note. The first repeats the key set-up rule: a linear numerator, never a lone constant.
The second note explains a practical consequence. An irreducible quadratic has no real root, so strategic substitution cannot isolate its constants. You find them by substituting the roots of the other factors first and then equating coefficients or choosing extra values of x.
The last two notes are about recognising the case and finishing it. The discriminant test tells you whether the quadratic belongs here at all, and the integration always produces a logarithm and an inverse tangent, after completing the square if there is an x term.
Worked example
\[ \int\frac{2x-3}{x^3+x}\,dx \]
Factor and set up
Why: x squared plus 1 is irreducible, so it gets a linear numerator.
\[ \frac{2x-3}{x(x^2+1)} = \frac{Ax+B}{x^2+1} + \frac{C}{x} \]
Clear the denominators
Why: Multiply by x times x squared plus 1.
\[ 2x - 3 = (Ax+B)x + C(x^2+1) \]
Put x equal to 0
Why: The only real root.
\[ -3 = C \]
Equate the remaining coefficients
Why: Collect: (A + C) x squared + B x + C.
\[ x^2: A + C = 0 \;\Rightarrow\; A = 3, \qquad x: B = 2 \]
Split the integral
Why: Three standard pieces.
\[ 3\int\frac{x}{x^2+1}\,dx + 2\int\frac{dx}{x^2+1} - 3\int\frac{dx}{x} \]
Integrate each
Why: A logarithm, an inverse tangent, a logarithm.
\[ = \tfrac32\ln(x^2+1) + 2\tan^{-1}x - 3\ln|x| + C \]
Check by differentiating
Why: Differentiate each piece, then combine over x times x squared plus 1.
\[ \frac{3x+2}{x^2+1} - \frac{3}{x} = \frac{3x^2+2x-3x^2-3}{x(x^2+1)} = \frac{2x-3}{x^3+x} \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, pp. 304-305 — Example 3.33
Factor out x to get x times x squared plus 1. The quadratic is irreducible, so it gets a linear numerator, and the single factor x gets a constant. Three constants for a denominator of degree three.
The only real root is 0, and substituting it gives C straight away. The other two constants come from equating coefficients. On the right the x squared terms are A plus C, and there are none on the left, so A is 3. The x term is just B, which must be 2.
Splitting the integral gives three standard pieces: a logarithm of x squared plus 1, an inverse tangent, and a logarithm of x. The check differentiates each piece and puts them over one denominator. The x squared terms cancel, leaving 2x minus 3 over x cubed plus x, the integrand you started with.
Step zero
\[ \int\frac{dx}{x^3-8} \]
Discussion prompt
Nothing can be set up until the denominator is fully factored. How do you factor x cubed minus 8, and how do you know the factorization is finished?
Write your answer before revealing. The instinct is to reach for a set-up immediately, but nothing can be set up until you know every factor of the denominator.
x cubed minus 8 is a difference of cubes, since 8 is 2 cubed. The formula gives x minus 2 times x squared plus 2x plus 4. Now test the quadratic: its discriminant is 4 minus 16, which is minus 12, negative, so it cannot be factored further.
This is the step that decides the form. One linear factor gives one constant term, and one irreducible quadratic gives a linear numerator. Had you missed the discriminant check, you might have tried to factor the quadratic and got nowhere, or treated it as a pair of linear factors that do not exist.
Worked example
\[ \frac{1}{(x-2)(x^2+2x+4)} = \frac{A}{x-2} + \frac{Bx+C}{x^2+2x+4} \]
Clear the denominators
Why: Multiply through.
\[ 1 = A(x^2+2x+4) + (Bx+C)(x-2) \]
Put x equal to 2
Why: The only real root; the second term vanishes.
\[ 1 = A(4+4+4) = 12A \;\Longrightarrow\; A = \tfrac{1}{12} \]
Match the x squared coefficients
Why: Only A and B produce x squared, and the left side has none.
\[ 0 = A + B \;\Longrightarrow\; B = -\tfrac{1}{12} \]
Match the constants
Why: Put x equal to 0, in effect.
\[ 1 = 4A - 2C = \tfrac13 - 2C \;\Longrightarrow\; C = -\tfrac13 \]
Rewrite the integral
Why: Factor minus one twelfth out of the second numerator.
\[ \int\frac{dx}{x^3-8} = \frac{1}{12}\int\frac{dx}{x-2} - \frac{1}{12}\int\frac{x+4}{x^2+2x+4}\,dx \]
Check with the x coefficients
Why: The one equation not used yet: 2A minus 2B plus C must be zero.
\[ 2\left(\tfrac{1}{12}\right) - 2\left(-\tfrac{1}{12}\right) - \tfrac13 = \tfrac16 + \tfrac16 - \tfrac13 = 0 \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 305 — Example 3.34
Clear the denominators first. The only real root is 2, and substituting it wipes out the quadratic-factor term and gives A equals one twelfth, since the quadratic is 12 there.
There is no second root to use, so turn to coefficients. The left side, 1, has no x squared term, and on the right only A and B produce x squared, so B is minus A. The constant terms give 4A minus 2C equals 1, which makes C minus one third.
Before moving on, the check uses the one equation not yet used, the x coefficients. Two A minus two B plus C must be zero, and it is. Then factor minus one twelfth out of the quadratic term so that its numerator becomes x plus 4, which is how the book writes it and which makes the next slide tidier.
Worked example
\[ \int\frac{x+4}{x^2+2x+4}\,dx \]
Complete the square
Why: Half of 2 is 1, and 4 minus 1 leaves 3.
\[ x^2 + 2x + 4 = (x+1)^2 + 3 \]
Figure (svg): The parabola y equals x squared plus 2x plus 4, with its vertex at the point minus 1, 3 marked and a dashed horizontal line at height 3; the whole curve stays at least 3 units above the x-axis.
Substitute u for x plus 1
Why: Then x plus 4 is u plus 3, and du is dx.
\[ \int\frac{u+3}{u^2+3}\,du = \int\frac{u}{u^2+3}\,du + \int\frac{3}{u^2+3}\,du \]
Integrate both
Why: A logarithm, and an inverse tangent with a equal to root 3.
\[ = \tfrac12\ln(u^2+3) + \frac{3}{\sqrt3}\tan^{-1}\frac{u}{\sqrt3} = \tfrac12\ln(u^2+3) + \sqrt3\tan^{-1}\frac{u}{\sqrt3} \]
Assemble the whole answer
Why: Multiply by minus one twelfth and add the first logarithm.
\[ \frac{1}{12}\ln|x-2| - \frac{1}{24}\ln(x^2+2x+4) - \frac{\sqrt3}{12}\tan^{-1}\frac{x+1}{\sqrt3} + C \]
Check on the interval from 3 to 4
Why: The antiderivative's change against Simpson's rule on one over x cubed minus 8.
\[ F(4) - F(3) = 0.0307563, \qquad \text{Simpson: } 0.0307563 \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, pp. 305-306 — Example 3.34
The quadratic term needs the full treatment from Part 5. Complete the square first: x squared plus 2x plus 4 becomes x plus 1 squared plus 3. The graph shows the same thing, a parabola whose lowest point is at height 3, never touching the axis.
Substituting u for x plus 1 turns the numerator into u plus 3 and the denominator into u squared plus 3. Split it: the u part is a logarithm, and the constant part, three over u squared plus 3, is an inverse tangent with a equal to root 3. Three over root 3 simplifies to root 3.
Return to x and assemble. The logarithm of the quadratic picks up a factor of minus one twenty-fourth, half of the minus one twelfth, and the inverse tangent picks up minus root 3 over 12. With so many constants a numerical check is worth doing: the antiderivative's change from 3 to 4 matches Simpson's rule to seven places.
Worked example
Revolve the region under the curve below, over the interval from 0 to 1, about the y-axis.
\[ f(x) = \frac{x^2}{(x^2+1)^2} \]
Figure (svg): The region under y equals x squared over x squared plus 1 squared, from x equals 0 to 1, shaded. One thin vertical strip at x about 0.6 is highlighted; an arrow from the y-axis to the strip marks its distance x from the axis of revolution.
Set up the shells
Why: Radius x, height f(x).
\[ V = 2\pi\int_0^1 x\cdot\frac{x^2}{(x^2+1)^2}\,dx = 2\pi\int_0^1\frac{x^3}{(x^2+1)^2}\,dx \]
Set up the repeated quadratic
Why: Degree 3 over degree 4: proper; two linear numerators.
\[ x^3 = (Ax+B)(x^2+1) + Cx + D \]
Expand and match
Why: Ax cubed + Bx squared + (A + C)x + (B + D).
\[ A = 1, \quad B = 0, \quad C = -1, \quad D = 0 \]
Integrate the two pieces
Why: Both are substitutions with u equal to x squared plus 1.
\[ 2\pi\int_0^1\left(\frac{x}{x^2+1} - \frac{x}{(x^2+1)^2}\right)dx = 2\pi\left[\frac12\ln(x^2+1) + \frac{1}{2(x^2+1)}\right]_0^1 \]
Evaluate
Why: Top limit minus bottom limit.
\[ 2\pi\left[\left(\tfrac12\ln 2 + \tfrac14\right) - \tfrac12\right] = \pi\left(\ln 2 - \tfrac12\right) \]
Check the number
Why: Simpson's rule on the shell integral gives the same value.
\[ \pi(\ln 2 - 0.5) \approx 0.606790, \qquad \text{Simpson: } 0.606790 \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, pp. 306-307 — Example 3.35 and Figure 3.11
This example puts partial fractions to work inside an application. Revolving the region about the y-axis suggests shells, and the shell integral multiplies the height by the radius x, which raises the numerator to x cubed.
The denominator is the square of an irreducible quadratic, so the set-up has two linear numerators, four constants. Expanding and matching coefficients gives A equals 1, C equals minus 1, and the other two zero, so the integrand is x over x squared plus 1 minus x over the square of x squared plus 1.
Both pieces yield to the substitution u equals x squared plus 1: one becomes a logarithm, the other a power. Evaluating from 0 to 1 gives pi times the quantity ln 2 minus one half, about 0.607. The check confirms that number with Simpson's rule on the shell integral.
Estimation
\[ \frac{x^2+3x+1}{(x+2)(x-3)^2(x^2+4)^2} \]
Predict first
Before writing the set-up, predict: how many unknown constants will the decomposition have?
Correct: 7
Why: The denominator's degree is 1 + 2 + 4 = 7, so seven constants: one for x + 2, two for the square of x − 3, and two linear numerators (four constants) for the square of x² + 4.
\[ \frac{A}{x+2} + \frac{B}{x-3} + \frac{C}{(x-3)^2} + \frac{Dx+E}{x^2+4} + \frac{Fx+G}{(x^2+4)^2} \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 307 — Checkpoint 3.20
Make your prediction before revealing. You do not need to write the set-up to answer: the count equals the degree of the denominator.
Add the degrees of the factors: one for x plus 2, two for x minus 3 squared, and four for x squared plus 4 squared. The total is seven.
Then check your written set-up against that number. One constant for the single linear factor, two constants for the squared linear factor, and two linear numerators for the squared quadratic, which is four constants. Seven in all. If your set-up had a different count, find the factor that was shortchanged.
Trap
Treating x squared plus 1 like a linear factor:
\[ \frac{2x-3}{x(x^2+1)} = \frac{A}{x^2+1} + \frac{C}{x} \]
\[ 2x - 3 = Ax + C(x^2+1) \]
Wrong: the equations clash.
Matching x squared forces C to be 0, but matching constants forces C to be minus 3. Two unknowns cannot fill three coefficients. The quadratic needs a linear numerator.
\[ x^2: C = 0, \quad 1: C = -3 \]
\[ \text{fix: } \frac{Ax+B}{x^2+1} + \frac{C}{x} \]
This trap treats an irreducible quadratic as though it were linear, giving it a single constant on top. The count already signals trouble: two unknowns for a denominator of degree three.
Equating coefficients makes the failure concrete. The x squared terms say C must be 0, and the constant terms say C must be minus 3. Both cannot hold, so the system is inconsistent. This is the book's point about equating coefficients: an inconsistent system means the set-up is wrong.
With the linear numerator the system has a solution, which is Example 3.33: A equals 3, B equals 2, C equals minus 3. When you see a quadratic factor, write the linear numerator automatically, and let the count confirm it.
Sorting
Sort into buckets
Sort each quadratic: does it split into real linear factors, or is it irreducible?
For each quadratic, find the discriminant before sorting. It is the one number that decides the bucket.
Two items are designed to catch you. x squared minus 3 has a positive discriminant, so it factors into x minus root 3 times x plus root 3. The roots are irrational, but they are real, and that is all that matters here. x squared plus 4x plus 4 has discriminant zero, so it is a perfect square, which puts it with the repeated linear factors, not with the quadratic factors.
The three irreducible ones all have negative discriminants. Those, and only those, get a linear numerator over the whole quadratic.
Matching
Match the pairs
Why: Each factor pays for its own degree: a linear factor one constant, a cubed linear factor three, an irreducible quadratic two (a linear numerator), and a squared quadratic four.
Match each factor with its contribution before checking. The rule underneath all four is the same: each factor supplies as many constants as its degree.
A single linear factor supplies one constant. A linear factor cubed supplies three, one over each power. An irreducible quadratic supplies two, as a linear numerator. A squared irreducible quadratic supplies four, as two linear numerators over the first and second powers.
If you can do this matching quickly, you can write down the form of any decomposition in this course. After that, everything else is arithmetic.
Section
Part 6
Concept
The two methods fail differently, and that decides how you check.
| method | if the set-up is right | if the set-up is wrong |
|---|---|---|
| equating coefficients | a consistent system with one solution | an inconsistent system: no solution at all |
| strategic substitution | the constants, fast | numbers anyway, which mean nothing |
So strategic substitution must always be followed by a check: recombine the pieces, or substitute one more x that is not a root. In practice, mix the methods: roots first for the constants they reach, then a coefficient or a spare x for the rest.
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, pp. 300-301 — the rules for both methods
The two methods are equally valid when the set-up is right. The difference is what happens when it is wrong, and that decides how you should check your work.
Equating coefficients gives a linear system. If the form was wrong, the system is inconsistent, with no solution, and you find out immediately. Strategic substitution just produces numbers, one per substitution, and they arrive whether or not the form was right. You saw that in the trap with the missing first-power term.
So combine them. Use the roots first, because they are fast, then use a coefficient or an extra value of x for anything the roots cannot reach. The last equation is then a check, not an extra step: if it holds, the set-up and the constants are both right.
Comparison
Comparison matrix
| denominator | roots give | still needed |
|---|---|---|
| x(x − 2)(x + 1) | A, B, C | nothing |
| (2x − 1)²(x − 1) | B, C | A |
| x(x² + 1) | C | A, B |
| (x² + 1)² | none | A, B, C, D |
Fill in each blank by asking which constants a root can isolate for that denominator. Look back at the examples if you need to.
Three distinct linear factors: every constant has its own root, so roots find all three and nothing more is needed. A squared linear factor times a single one: the roots give the constant over the square and the constant over the single factor, but not the constant over the first power.
A linear factor times an irreducible quadratic: the root gives only the constant over the linear factor, and the linear numerator needs coefficients. And a squared quadratic on its own has no real roots at all, so every constant comes from equating coefficients. The more quadratics and repeats, the more you rely on coefficients.
Worked example
\[ \int_0^1 \frac{e^x}{36 - e^{2x}}\,dx \]
Substitute u for e to the x
Why: du is e to the x dx; the limits become 1 and e.
\[ \int_1^{e}\frac{du}{36 - u^2} = \int_1^{e}\frac{du}{(6-u)(6+u)} \]
Decompose
Why: 1 = A(6 + u) + B(6 − u); u equal to 6 and minus 6.
\[ 1 = 12A \;\Rightarrow\; A = \tfrac{1}{12}, \qquad 1 = 12B \;\Rightarrow\; B = \tfrac{1}{12} \]
Integrate
Why: The first logarithm carries a minus sign from the minus u.
\[ \frac{1}{12}\int\left(\frac{1}{6-u} + \frac{1}{6+u}\right)du = \frac{1}{12}\left[-\ln|6-u| + \ln|6+u|\right] \]
Combine the logarithms
Why: A difference of logarithms is the logarithm of a quotient.
\[ = \frac{1}{12}\ln\left|\frac{6+u}{6-u}\right| \]
Evaluate from 1 to e
Why: Both arguments are positive on this interval.
\[ \frac{1}{12}\left[\ln\frac{6+e}{6-e} - \ln\frac{7}{5}\right] \]
Convert to five places
Why: The logarithms are 0.977055 and 0.336472.
\[ \frac{1}{12}(0.977055 - 0.336472) \approx 0.05338 \]
Figure (svg): The curve y equals e to the x over 36 minus e to the 2x for x from 0 to 1.2, rising from about 0.029 to about 0.13, with the region from 0 to 1 shaded.
Check against Simpson's rule
Why: Applied to the original integrand in x.
\[ \text{Simpson: } 0.0533819 \approx 0.05338 \;\checkmark \]
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 309 — Exercise 214
Like Example 3.31, this starts life as a non-rational integral. The e to the x on top is the derivative of e to the x, so u equals e to the x turns it into one over 36 minus u squared, and the limits 0 and 1 become 1 and e.
The denominator is a difference of squares, 6 minus u times 6 plus u. Both constants come out as one twelfth. Integrating one over 6 minus u gives minus the logarithm of 6 minus u, because of the minus sign on u, and the two logarithms combine into a single logarithm of a quotient.
The exercise asks for five decimal places, so compute the logarithms carefully: 0.977055 and 0.336472. Their difference over 12 is about 0.05338. The picture says this is a sensible size, a thin region about a tenth tall at most over an interval of width 1, and Simpson's rule on the original integral agrees.
Real world
Figure (svg): The velocity curve v of t equals 88 t squared over t squared plus 1 for t from 0 to 6 seconds, rising steeply and levelling off toward the dashed line at 88 feet per second; the area under it from 0 to 5 is shaded.
Discussion prompt
A particle moves with velocity 88t²/(t² + 1) feet per second. How far does it travel in the first 5 seconds? Divide first.
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, p. 309 — Exercise 232
Try it before revealing. The velocity is a rational function of t, with equal degrees, so divide first. The quotient is 88 and the remainder is minus 88 over t squared plus 1.
The distance is the integral of the velocity from 0 to 5, since the velocity is never negative. The constant 88 integrates to 440, and the remainder gives an inverse tangent, 88 times arctan 5, which is about 120.86. The distance is about 319.14 feet.
The picture gives the meaning. The particle's speed approaches 88 feet per second, so if it had moved at that speed the whole time it would have covered 440 feet. The inverse tangent term is the distance it lost while speeding up at the start. The same divide-first split appears whenever a quantity approaches a limiting rate.
Section
Part 7
Pattern
Figure (svg): A flow diagram: compare the degrees of P and Q; if the numerator's degree is not smaller, divide first. Then factor Q. Each distinct linear factor gives one constant term, each repeated linear factor one term per power, each irreducible quadratic a linear numerator. Solve for the constants, then integrate into logarithms, powers and inverse tangents.
OpenStax Calculus Volume 2, §3.4 Partial Fractions §3.4, pp. 303-304 — Problem-Solving Strategy: Partial Fraction Decomposition
This is the book's problem-solving strategy, in the order you should use it. Each step depends on the one before, which is why the diagram runs in a single direction.
The degree check comes first because the rest of the method is only valid for a proper fraction. Factoring comes next because the factors determine the form. The count comes before any solving, because it is the cheapest way to catch a wrong form.
Finding the constants mixes the two methods, and the check at the end is not optional. Only then integrate. By that stage the integration is almost automatic: logarithms from linear factors, powers from repeated ones, and a logarithm plus an inverse tangent from each quadratic.
Ranking
Put in order
Order the steps for integrating a rational function by partial fractions.
Why: Division must come first because the form is only valid for a proper fraction, and the form depends on the factors, so factoring comes before it. Checking the constants before integrating stops one slip from spreading through every piece.
Drag the steps into order before checking. Most of the order is forced: you cannot write a form before factoring, and you cannot find constants before you have a form.
The two steps people misplace are the division and the check. The division must come first, because decomposing an improper fraction fails outright. The check belongs before the integration, not after, because a wrong constant is far easier to find in the decomposition than in a finished antiderivative with three or four terms.
Check
Check your understanding
What is the correct form for (x² + 1)/(x(x − 1)²)?
Answer: A
Why: Degree 2 over degree 3 is proper. The factor x gets one constant and the squared factor gets a term for each power, three constants for a degree-3 denominator.
Check the degrees first, then look at each factor. The numerator has degree two and the denominator degree three, so the fraction is proper and no division is needed.
The factor x is single and gets one constant. The factor x minus 1 is squared, so it gets a term over the first power and a term over the square. That is three constants for degree three. The other options each break one rule: leaving out a power, or putting a linear numerator over a linear factor.
Check
Check your understanding
If (7x − 1)/((x − 1)(x + 2)) = A/(x − 1) + B/(x + 2), what are A and B?
Answer: A
Why: Clear denominators: 7x − 1 = A(x + 2) + B(x − 1). At x = 1, 6 = 3A, so A = 2. At x = −2, −15 = −3B, so B = 5. Check: 2 + 5 = 7 matches the coefficient of x.
Clear denominators and substitute the roots. At x equal to 1 only the A term survives, and at x equal to minus 2 only the B term survives.
The distractors come from the usual slips: swapping which root goes with which constant, forgetting to divide by what is left of the other factor, and losing a sign when dividing by a negative number. The quick check in the explanation, that A plus B equals the coefficient of x in the numerator, would catch all three.
Check
Check your understanding
Which is an antiderivative of 1/(x² + 4x + 5)?
Answer: A
Why: The discriminant is 16 − 20 = −4, so the quadratic is irreducible. Completing the square gives (x + 2)² + 1, and with u = x + 2 the integral is arctan u.
Start with the discriminant, 16 minus 20, which is negative, so the quadratic is irreducible and the answer involves an inverse tangent.
Completing the square gives x plus 2 squared plus 1. With u equal to x plus 2, the integral is one over u squared plus 1, which is arctan u. The distractors come from putting a logarithm where the numerator is not the derivative, or from completing the square with the wrong leftover constant.
Explain it to yourself
Discussion prompt
Explain in two or three sentences why the number of unknown constants in a correct set-up always equals the degree of the denominator, and how that single count catches both of this lesson's common set-up errors.
Write your explanation before revealing. Being able to say why the count works means you will never need to memorise the list of forms, because you can rebuild each one from the count.
The argument runs like this. After clearing denominators, the right side must be able to match any numerator of lower degree than the denominator. A polynomial of degree less than n has n coefficients, so you need n unknowns to match them all.
Both classic set-up errors reduce the number of unknowns. Leaving out a power of a repeated factor removes a constant, and putting a single constant over a quadratic removes one too. In each case the count falls short of the degree, and you see it before doing any algebra.
Exit ticket
\[ \int\frac{x+5}{x^2+x-2}\,dx \]
Discussion prompt
Decide whether to divide, factor, set up, find the constants, integrate, and check at one value of x.
This one problem uses the whole method. The fraction is proper, degree one over degree two, so no division. The quadratic factors into x plus 2 times x minus 1, two distinct linear factors.
Clear denominators and substitute the roots. x equal to 1 gives B equals 2, and x equal to minus 2 gives A equals minus 1. The integral is minus the logarithm of x plus 2 plus twice the logarithm of x minus 1.
The check at x equal to 0 matters as much as the answer. The two pieces give minus one half plus 2 over minus 1, which is minus five halves, and the original fraction at 0 is 5 over minus 2, the same. If you got that far and it matched, you have the method.
Recap
| factor of Q | terms it contributes | integrates to |
|---|---|---|
| ax + b | A/(ax + b) | a logarithm |
| (ax + b)ⁿ | one term for each power 1 to n | a logarithm, then powers |
| ax² + bx + c, b² − 4ac < 0 | (Ax + B)/(ax² + bx + c) | a logarithm and an inverse tangent |
| (ax² + bx + c)ⁿ | a linear numerator for each power | logarithms, inverse tangents and powers |
\[ \frac{P}{Q} = A(x) + \frac{R}{Q} \quad\text{(divide first when } \deg P \ge \deg Q\text{)} \]
Next, Section 3.5 hands the most tedious of these integrals to tables and computer algebra, and you will be able to check what they return.
Stewart, Calculus: Early Transcendentals 8e, §7.4 Integration of Rational Functions by Partial Fractions §7.4, pp. 493-502 — the same material in Stewart
The table is the whole lesson in four rows. Each kind of factor in the denominator contributes a predictable group of terms, and each group integrates to a predictable kind of function.
Around the table sit two habits. Before it, the degree check and long division, because the table only applies to proper fractions. After it, the check: recombine the pieces, or test one value of x that is not a root, before you integrate anything.
Next, Section 3.5 shows how integral tables and computer algebra systems handle integrals like these. Knowing the method yourself means you can recognise when their output is right, and rewrite it when it looks different from yours.
Want this taught 1-on-1? Alexander tutors Calculus II — $55/session, free consultation.