Let's find the integral of x2+x−23. If the numerator were 2x+1, the derivative of the denominator, u-substitution would work. But the numerator is 3, so letting u=x2+x−2 leaves an x in the integral, and u-substitution doesn't finish the problem.
∫x2+x−22x+1dx
udu=x2+x−2=(2x+1)dx
∫udu=ln∣x2+x−2∣+C
∫x2+x−23dx
udu=x2+x−2=(2x+1)dx
∫u3⋅2x+1du
Instead, notice that the denominator factors into (x−1)(x+2), which is the common denominator of x−11 and x+21. When we subtract those two fractions, we get exactly the fraction we started with.
x2+x−2=(x−1)(x+2)
x−11−x+21=(x−1)(x+2)3
Find ∫x2+x−23dx
∫x2+x−23dx=?
Text solution
Subtract over the common denominatorThe x terms in the numerator cancel, and 2−(−1) leaves 3.
(x−1)(x+2)(x+2)−(x−1)=(x−1)(x+2)3
Integrate each pieceSo our integral splits into two simpler integrals, and each one integrates to a natural log.
∫x2+x−23dx=∫(x−11−x+21)dx
=ln∣x−1∣−ln∣x+2∣+C
Writing a fraction as a sum of simpler fractions over the factors of its denominator is called partial fraction decomposition.
2
Finding the numerators
In that example, we knew the two pieces before we combined them. Usually we start with the single fraction instead. We know the factors in the denominator, and we need to find the numerators. Let's call them A and B, and multiply both sides by (x−1)(x+2) to clear the fractions.
(x−1)(x+2)3=x−1A+x+2B
3=A(x+2)+B(x−1)
If we combine the two fractions on the right, the numerator is A(x+2)+B(x−1), so it has to be the exact same polynomial as 3. That means the equation holds for every x, even x=1 and x=−2, where the fraction we started with isn't defined. And those are the values to pick. At x=1 the factor x−1 is 0, so the B term is 0 and only A is left. At x=−2, the A term is 0 instead.
x=1
3=A(3)+B(0)
A=1
x=−2
3=A(0)+B(−3)
B=−1
That gives back the two numerators we started with. Other values of x work too, but they keep both unknowns. At x=0 we get 3=2A−B. Once we know A=1, though, that same equation gives B=−1 again.
Now let's use this to evaluate an integral from scratch.
Find A and B, then evaluate ∫x2−2x−33x−1dx
∫x2−2x−33x−1dx=?
Text solution
Factor and clear the fractionsThe pieces are x−3A and x+1B. Multiplying through by the denominator clears the fractions.
x2−2x−3=(x−3)(x+1)
3x−1=A(x+1)+B(x−3)
Plug in the rootsx=3 makes the B term 0, and x=−1 makes the A term 0.
x=3:8=4A→A=2
x=−1:−4=−4B→B=1
Integrate each piece
∫x2−2x−33x−1dx=∫(x−32+x+11)dx
=2ln∣x−3∣+ln∣x+1∣+C
With three linear factors, we can still use the roots to find the unknowns. For x(x−1)(x+2)2x2+5x−4, drag x and see which values leave just one unknown.
Make two terms zero
3
Repeated factors in the denominator
Now let's look at what happens when a factor in the denominator repeats, like the (x−1)2 in ∫x(x−1)2x+1dx. If we give x and (x−1)2 one piece each, xA+(x−1)2C, the roots give us numbers, but the equation fails at x=2. That's because there aren't enough unknowns. The denominator has degree 3, so when we add fractions over it, the numerator can have an x2 term, an x term and a constant. Two unknowns aren't enough to match three coefficients.
We missed a piece. Multiplying the top and bottom of x−1B by x−1 gives a denominator of (x−1)2, so a piece over x−1 can be part of the sum too. With it, we have three unknowns for a denominator of degree 3.
x−1B=(x−1)2B(x−1)
x(x−1)2x+1=xA+x−1B+(x−1)2C
In the same way, (x−1)3 would need pieces over x−1,(x−1)2 and (x−1)3. And x2 is x⋅x, so it's a repeated factor too and needs xA+x2B, just as x2x+3 splits into x1+x23.
Evaluate ∫x(x−1)2x+1dx
∫x(x−1)2x+1dx=?
Text solution
One piece each failsWith only A and C, the roots give A=1 and C=2, but at x=2 the two sides don't match.
x+1=A(x−1)2+Cx
x=2:3=1⋅(2−1)2+2⋅2=5
Find A,B and CThe roots still give A and C. The B term has both x and x−1 as factors, so it's 0 at both roots, and we use x=2 for it.
x+1=A(x−1)2+Bx(x−1)+Cx
x=0:A=1
x=1:C=2
x=2:3=1+2B+4→B=−1
Integrate, with the power rule for the last pieceThe first two pieces give natural logs. In 2(x−1)−2 the exponent isn't −1, so the last piece isn't a log.
∫(x−1)22dx=∫2(x−1)−2dx=−x−12
∫x(x−1)2x+1dx=ln∣x∣−ln∣x−1∣−x−12+C
4
When a quadratic factor doesn't factor
Let's find the integral of x3+4x2x2+2x+4. Factoring the denominator gives x(x2+4). But x2 is never negative, so x2+4 is always at least 4. It's never 0, so it has no real roots, and we can't factor it down into linear factors.
x3+4x=x(x2+4)
x2+4≥4
As with the repeated factor, a denominator of degree 3 needs three unknowns. The piece xA gives us one unknown. A constant over x2+4 would give only two unknowns, too few to match the three coefficients of 2x2+2x+4, so the piece over x2+4 gets Bx+C on top.
x(x2+4)2x2+2x+4=xA+x2+4Bx+C
Evaluate ∫x3+4x2x2+2x+4dx
∫x3+4x2x2+2x+4dx=?
Text solution
Find A at x=0After clearing the fractions, the (Bx+C)x term is 0 at x=0.
2x2+2x+4=A(x2+4)+(Bx+C)x
x=0:4=4A→A=1
Match coefficients for B and CThe quadratic factor has no real root to plug in. Both sides are the same polynomial, so we expand the right side and match each power of x.
A(x2+4)+(Bx+C)x=(A+B)x2+Cx+4A
x2:2=A+B→B=1
x:2=C
Split the top of x2+4x+2The x part integrates to a natural log with u=x2+4. The number part integrates to an arctan, from x=2tanθ.
∫x2+4xdx=21ln(x2+4)
∫x2+42dx=arctan2x
∫x3+4x2x2+2x+4dx=ln∣x∣+21ln(x2+4)+arctan2x+C
5
When the degree of the numerator is at least the degree of the denominator
Let's find the integral of x2−x−2x3−3x+1. The denominator factors into (x−2)(x+1), so we might try splitting the fraction directly into pieces over x−2 and x+1. But when we add those two fractions, the numerator has degree at most 1. It can never equal x3−3x+1, which has degree 3.
x2−x−2=(x−2)(x+1)
x−2A+x+1B=(x−2)(x+1)A(x+1)+B(x−2)
Just as we write 37 as 2+31, we can use polynomial long division to pull out the polynomial part first. Divide the numerator's highest-power term by x2 to get the next term of the quotient. Multiply that term by x2−x−2, subtract the result from the numerator, and repeat with what's left.
x3÷x2=x
x2÷x2=1
x+1x2−x−2x3+0x2−3x+1−(x3−x2−2x)x2−x+1−(x2−x−2)3
x3−3x+1=(x+1)(x2−x−2)+3
The remainder 3 has degree 0, smaller than the denominator's degree of 2, so the remainder fraction is the part we split into pieces.
Evaluate ∫x2−x−2x3−3x+1dx
∫x2−x−2x3−3x+1dx=?
Text solution
Split the remainder fractionClear the fractions and plug in the roots, as before.
x2−x−2x3−3x+1=x+1+(x−2)(x+1)3
3=A(x+1)+B(x−2)
x=2→A=1
x=−1→B=−1
Integrate each pieceThe polynomial part uses the power rule, and each fraction gives a natural log.
∫x2−x−2x3−3x+1dx=∫(x+1+x−21−x+11)dx
=2x2+x+ln∣x−2∣−ln∣x+1∣+C
Summary
Check for u-substitution first
udu=x2+x−2=(2x+1)dx
∫x2+x−22x+1dx=∫udu=ln∣x2+x−2∣+C
Before using partial fractions, check whether a substitution works. If the numerator is a constant multiple of the denominator's derivative, let u be the denominator, so the numerator times dx is a constant times du, and the integral is a natural log.
When the degree of the numerator is at least the degree of the denominator
x2−x−2x3−3x+1=x+1+x2−x−23
If the degree of the numerator is greater than or equal to the degree of the denominator, divide first. Long division gives a polynomial plus a remainder fraction whose numerator has a smaller degree than the denominator, and you can split that fraction into partial fractions.
Setting up the pieces
Factor
Pieces
x−a
x−aA
x2
xA+x2B
(x−a)2
x−aA+(x−a)2B
x2+4
x2+4Bx+C
x2−9=(x−3)(x+3)
x2+4≥4
Each linear factor x−a gets a constant numerator, x−aA. When a linear factor is squared, like (x−a)2, give it two terms, one for the first power and one for the second, giving x−aA+(x−a)2B. A factor like x2 works the exact same way, giving xA+x2B. A quadratic factor with no real roots gets a linear numerator, x2+4Bx+C. The total number of unknown constants always matches the degree of the denominator. If a quadratic factors, like x2−9=(x−3)(x+3), split it into linear pieces rather than keeping it together.
Finding the numerators
3=A(x+2)+B(x−1)
x=1→A=1
x=−2→B=−1
Multiply both sides by the factored denominator to clear the fractions. The equation that's left holds for every x, so plug in the root of each linear factor to make the other terms zero and find that factor's numerator. To find any constants that roots do not give, plug in other values of x, or expand and match the coefficients of each power of x on both sides.
Integrating each piece
∫x−aAdx=Aln∣x−a∣
∫(x−a)2Bdx=−x−aB
∫x2+4x+2dx=21ln(x2+4)+arctan2x
∫x2+4x+2dx=21ln(x2+4)+arctan2x
∫x2+a2dx=a1arctanax
x2+2x+5=(x+1)2+4
Pieces over a linear factor integrate to natural logs, and pieces over a squared factor integrate with the power rule, not logs. For a quadratic factor with no real roots, split the numerator into an x part that integrates to a natural log with u-substitution, and a number part that integrates to an arctan. If the quadratic has an x term, like x2+2x+5, complete the square first. Then split the numerator into a multiple of the derivative, 2x+2, plus a constant.
6
Practice
Enter exact values. You can write logarithms in any equivalent form.
1
Evaluate ∫x2−x−25x−4dx.
How does x2−x−2 factor?
After multiplying through by the denominator, which x makes every term but one 0?
If you got 2ln∣x+1∣+3ln∣x−2∣+C Check which number goes over which factor. Plugging in x=2 isolates A, so A=2 goes over x−2.
Set up the partial fractionsThe top isn't a constant multiple of 2x−1, the derivative of the bottom, so we factor the denominator and set up partial fractions.
x2−x−2=(x−2)(x+1)
5x−4=A(x+1)+B(x−2)
Find the constantsPlug in the roots x=2 and x=−1 to isolate A and B.
x=2:6=3A→A=2
x=−1:−9=−3B→B=3
Integrate each piece to get natural logs.
∫[x−22+x+13]dx=2ln∣x−2∣+3ln∣x+1∣+C
2
Evaluate ∫x3+x23x+2dx.
Factor x3+x2. Its degree is 3, so how many unknown constants do you need?
If you got −x2−ln∣x+1∣+C The denominator has degree 3, so we need three unknowns. A repeated factor like x2 needs both an xA piece and a x2B piece.
Set up the partial fractionsSince x2 is a squared factor, it needs a piece for x and a piece for x2.
x3+x2=x2(x+1)
x2(x+1)3x+2=xA+x2B+x+1C
Find the constantsPlug in the roots x=0 and x=−1 first, then use any other easy value for x to find A.
3x+2=Ax(x+1)+B(x+1)+Cx2
x=0:B=2
x=−1:C=−1
x=1:5=2A+4−1→A=1
Use the power rule on x22=2x−2, and integrate the other two terms to natural logs.
∫[x1+x22−x+11]dx=ln∣x∣−x2−ln∣x+1∣+C
3
Evaluate ∫(x−1)(x2+9)x2+3x+6dx.
Since x2+9 has no real roots, what goes on top of it?
For ∫x2+9dx, let x=3tanθ. What are dx and x2+9?
If you got ln∣x−1∣+3arctan3x+C Check the constant in front of the arctangent. Integrating x2+91 brings in a factor of 31, and multiplying that by the 3 on top gives 1, not 3.
Set up the partial fractionsThe denominator has degree 3, so we need three unknowns. x−1A has one unknown, so use Bx+C over x2+9 for the other two.
(x−1)(x2+9)x2+3x+6=x−1A+x2+9Bx+C
x2+3x+6=A(x2+9)+(Bx+C)(x−1)
Find the constantsPlug in x=1 to find A, then match the x2 coefficients to find B, and plug in x=0 to find C.
x=1:10=10A→A=1
x2 terms:1=A+B→B=0
x=0:6=9A−C→C=3
Integrate each pieceThe quadratic piece gives an arctangent with an extra factor of 31, which cancels with the 3 on top.
If you got ln∣x−1∣−ln∣x+2∣+C Check the degrees before splitting into pieces. The top and bottom both have degree 2, so divide first.
Divide firstThe numerator and denominator have the same degree, so we divide before setting up partial fractions. Here the division takes one step, since the top is the bottom plus 3.
x2+x+1=(x2+x−2)+3
x2+x−2x2+x+1=1+x2+x−23
Factor the denominator as (x−1)(x+2) to split x2+x−23 into linear pieces.
x2+x−23=x−11−x+21
Integrate all three terms, remembering the 1 from dividing.
∫[1+x−11−x+21]dx=x+ln∣x−1∣−ln∣x+2∣+C
5
Evaluate ∫x2+3x−42x+3dx.
What is the derivative of x2+3x−4? Compare it with the numerator.
The top is the derivative of the bottom, so a direct substitution gives the integral in one step.
u=x2+3x−4
du=(2x+3)dx
∫x2+3x−42x+3dx=∫udu=ln∣x2+3x−4∣+C
6
Which is the form of the partial fraction decomposition of (x−2)2(x2+4)x2+1?
The denominator (x−2)2(x2+4) has degree 4. How many unknown constants do you need?
If you got (x−2)2A+x2+4Cx+D Check the repeated factor (x−2)2. It needs a piece for x−2 as well as (x−2)2.
If you got x−2A+(x−2)2B+x2+4C Check the numerator over x2+4. Because x2+4 has no real roots, we need a numerator of the form Cx+D. With only C, you have 3 unknowns for a degree 4 denominator.
If you got x−2A+x+2B+x2+4Cx+D Check the factor (x−2)2. It's (x−2)(x−2), not (x−2)(x+2).
The repeated factor (x−2)2 gets a term for each power, and the quadratic x2+4 gets a linear numerator.
(x−2)2:x−2A+(x−2)2B
x2+4:x2+4Cx+D
The denominator has degree 4, which matches the 4 unknown constants A,B,C, and D.
(x−2)2(x2+4):degree 4→A,B,C,D
7
Evaluate ∫e2x+3ex+2exdx.
Write e2x as (ex)2. What substitution turns the denominator into a quadratic?
If you got ln∣u+1∣−ln∣u+2∣+C The original integral was in terms of x, so substitute u=ex back into your answer.
Substitute u=exLetting u be the whole denominator doesn't work, since du=ex(2ex+3)dx and the integral has no 2ex+3. But we have exdx in the integral and the bottom is a quadratic in ex, so let u=ex.
u=ex
du=exdx
e2x=u2
∫e2x+3ex+2exdx=∫u2+3u+2du=∫(u+1)(u+2)du
Clear denominators and plug in the roots u=−1 and u=−2 to find A and B.
1=A(u+2)+B(u+1)
u=−1→A=1
u=−2→B=−1
Integrate in u, then substitute back u=ex. Because ex+1 and ex+2 are always positive, we don't need absolute value bars.
The derivative of x2+2x+5 is 2x+2. How can you split x+5 to match that?
Complete the square on x2+2x+5.
If you got 21ln(x2+2x+5)+4arctan2x+1+C Check the integral of (x+1)2+41. It's like x2+41 with x+1 in place of x, so it brings in a factor of 21.
Split the topCompleting the square gives x2+2x+5=(x+1)2+4. This is always at least 4, so it has no real roots. Like x2+4, it stays as one factor. The derivative of the bottom is 2x+2, which is 2(x+1), so we split x+5 into (x+1)+4. The x+1 part gives a log, and the 4 gives an arctangent.
(x2+2x+5)′=2x+2,x+5=(x+1)+4
Integrate the log partThe x+1 part integrates to a natural log using u=x2+2x+5.
Integrate the arctangent partWith the denominator written as (x+1)2+4, the integral is like ∫x2+4dx with x+1 in place of x, so it brings in a factor of 21.
What substitution turns x into a single letter? Integration by Parts used the same one.
Once the integral is a fraction of polynomials, compare the degree of the top with the degree of the bottom.
Substitute w=xThe square root is what keeps this from being a fraction of polynomials, so let w=x. Then x=w2 and dx=2wdw.
w=x
x=w2
dx=2wdw
∫1+xxdx=∫1+w2w⋅2wdw=2∫1+w2w2dw
Divide firstThe top and bottom both have degree 2, so we divide first. Writing w2 as (1+w2)−1 does it in one step. The 1 integrates to w, and 1+w21 integrates to arctanw.
1+w2w2=1+w2(1+w2)−1=1−1+w21
2∫(1−1+w21)dw=2w−2arctanw+C=2x−2arctanx+C
11
For each integral, would you use u-substitution, integration by parts, a trigonometric integral, trigonometric substitution or partial fractions? (a) ∫xcosxdx, (b) ∫sin3xdx, (c) ∫x21−x2dx, (d) ∫x2+x−2x+5dx.
(a)∫xcosxdx
Check each one for a u-substitution first. Is one part of the fraction or product a constant times the derivative of another part?
Which part of each integral suggests a method to use? In (c), look at the square root. In (d), notice that the denominator factors.
(b)∫sin3xdx
(c)∫x21−x2dx
(d)∫x2+x−2x+5dx
U-substitution doesn't work directly on any of these integrals as written. In (d), for example, the derivative of x2+x−2 is 2x+1, and x+5 isn't a multiple of it. So we need to choose another method for each integral.
(a) Integration by partsxcosx is a product, and differentiating x turns it into 1, while cosx is easy to integrate.
∫xcosxdx=xsinx−∫sinxdx=xsinx+cosx+C
(b) A trigonometric integralThe power of sine is odd, so we keep one sinx for du, write sin2x as 1−cos2x, and let u=cosx.