Week 6 Discussion Notes

Table of Contents

Partial Fractions

Overview

You usually want to use partial fractions when you want to integrate a rational function, i.e., a function of the form

p(x)q(x),\frac{p\p{x}}{q\p{x}},

where pp and qq are polynomials. For example, the result of partial fractions looks something like

1(x1)(x2)=1x21x1.\frac{1}{\p{x - 1}\p{x - 2}} = \frac{1}{x - 2} - \frac{1}{x - 1}.

As you can imagine, the left side is hard to integrate, but the right side is a lot easier to integrate.

Process

When setting up the partial fractions, you want to look at the factors of qq. Here're the rules for the setup:

Linear Factors

For every factor of qq of the form (x+a)n\p{x + a}^n, you need to include the following sum:

a1x+a+a2(x+a)2++an(x+a)n.\frac{a_1}{x + a} + \frac{a_2}{\p{x + a}^2} + \cdots + \frac{a_n}{\p{x + a}^n}.

Quadratic Factors

For factors of the form (x2+ax+b)n\p{x^2 + ax + b}^n, you need

a1x+b1x2+ax+b+a2x+b2(x2+ax+b)2++anx+bn(x2+ax+b)n.\frac{a_1x + b_1}{x^2 + ax + b} + \frac{a_2x + b_2}{\p{x^2 + ax + b}^2} + \cdots + \frac{a_nx + b_n}{\p{x^2 + ax + b}^n}.

Once you have the setup, you need to solve for all the constants.

Examples

Example 1.

Calculate 9(x+1)(x22x+6)dx\displaystyle \int \frac{9}{\p{x + 1}\p{x^2 - 2x + 6}} \,\diff{x}.

Solution.

First, we're gonna use partial fractions. Our setup will look like:

9(x+1)(x22x+6)=Ax+1+Bx+Cx22x+6    9=A(x22x+6)+(Bx+C)(x+1).\begin{aligned} \frac{9}{\p{x + 1}\p{x^2 - 2x + 6}} &= \frac{A}{x + 1} + \frac{Bx + C}{x^2 - 2x + 6} \\ \implies 9 &= A\p{x^2 - 2x + 6} + \p{Bx + C}\p{x + 1}. \end{aligned}

This equality is true as functions, i.e., no matter what you plug in for xx, the equality is still true. That's going to be our main strategy for solving for these coefficients.

x=1    9=A((1)22(1)+6)+(B(1)+C)(1+1)    9=9A    A=1x=0    9=6A+C    9=6+C    C=3x=1    9=A(12+6)+(B+C)(1+1)    9=5A+2B+2C    9=5+2B+6    2=B    B=1\begin{aligned} x = -1 &\implies 9 = A\p{\p{-1}^2 - 2\p{-1} + 6} + \p{B\p{-1} + C}\p{-1 + 1} \\ &\phantom{\implies} 9 = 9A \\ &\phantom{\implies} \colorbox{red}{$A = 1$} \\ x = 0 &\implies 9 = 6A + C \\ &\phantom{\implies} 9 = 6 + C \\ &\phantom{\implies} \colorbox{red}{$C = 3$} \\ x = 1 &\implies 9 = A\p{1 - 2 + 6} + \p{B + C}\p{1 + 1} \\ &\phantom{\implies} 9 = 5A + 2B + 2C \\ &\phantom{\implies} 9 = 5 + 2B + 6 \\ &\phantom{\implies} -2 = B \\ &\phantom{\implies} \colorbox{red}{$B = -1$} \end{aligned}

So, our partial fraction decomposition tells us that

9(x+1)(x22x+6)dx=1x+1+x+3x22x+6dx.\int \frac{9}{\p{x + 1}\p{x^2 - 2x + 6}} \,\diff{x} = \int \frac{1}{x + 1} + \frac{-x + 3}{x^2 - 2x + 6} \,\diff{x}.

We know how to integrate the first term:

dxx+1=lnx+1+C,\int \frac{\diff{x}}{x + 1} = \ln\abs{x + 1} + C,

so we need to figure out how to do the second one.

Our goal is to use the uu-substitution u=x22x+6    du=2x2dxu = x^2 - 2x + 6 \implies \diff{u} = 2x - 2 \,\diff{x}. In order to be able to use it, we need to get 2x22x - 2 into the numerator somehow. What we're going to do is force the situation that we want by multiplying by 11 and adding by 00:

x+3x22x+6dx=22x+3x22x+6dx=122x6x22x+6dx=122x+(2+2)6x22x+6dx=122x2x22x+6+4x22x+6dx=122x2x22x+6dx124x22x+6dx=122x2x22x+6dx+2x22x+6dx.\begin{aligned} \int \frac{-x + 3}{x^2 - 2x + 6} \,\diff{x} &= \int \frac{-2}{-2} \cdot \frac{-x + 3}{x^2 - 2x + 6} \,\diff{x} \\ &= -\frac{1}{2} \int \frac{2x - 6}{x^2 - 2x + 6} \,\diff{x} \\ &= -\frac{1}{2} \int \frac{2x + \p{-2 + 2} - 6}{x^2 - 2x + 6} \,\diff{x} \\ &= -\frac{1}{2} \int \frac{2x - 2}{x^2 - 2x + 6} + \frac{-4}{x^2 - 2x + 6} \,\diff{x} \\ &= -\frac{1}{2} \int \frac{2x - 2}{x^2 - 2x + 6} \,\diff{x} - \frac{1}{2} \int \frac{-4}{x^2 - 2x + 6} \,\diff{x} \\ &= -\frac{1}{2} \int \frac{2x - 2}{x^2 - 2x + 6} \,\diff{x} + \int \frac{2}{x^2 - 2x + 6} \,\diff{x}. \end{aligned}

We can integrate the first term with the uu-substitution specified earlier:

122x2x22x+6dx=12duu=12lnu+C=12lnx22x+6+C.\begin{aligned} -\frac{1}{2} \int \frac{2x - 2}{x^2 - 2x + 6} \,\diff{x} = -\frac{1}{2} \int \frac{\diff{u}}{u} &= -\frac{1}{2} \ln\abs{u} + C \\ &= -\frac{1}{2} \ln\abs{x^2 - 2x + 6} + C. \end{aligned}

So, to finish the problem, we have to integrate the last term. If we complete the square, we get x22x+6=(x1)2+5x^2 - 2x + 6 = \p{x - 1}^2 + 5, so we can use the trig sub

x1=5tanθ    dx=5sec2θdθ.x - 1 = \sqrt{5} \tan\theta \implies \diff{x} = \sqrt{5} \sec^2\theta \,\diff\theta.

This turns the integral into

2x22x+6dx=2(x1)2+5dx=25sec2θ(5tanθ)2+5dθ=25sec2θ5tan2θ+5dθ=25sec2θ5(tan2θ+1)dθ=25sec2θ5sec2θdθ=25dθ=25θ+C=25tan1(x15)+C.\begin{aligned} \int \frac{2}{x^2 - 2x + 6} \,\diff{x} = \int \frac{2}{\p{x - 1}^2 + 5} \,\diff{x} &= \int \frac{2\sqrt{5} \sec^2\theta}{\p{\sqrt{5}\tan\theta}^2 + 5} \,\diff\theta \\ &= \int \frac{2\sqrt{5} \sec^2\theta}{5\tan^2\theta + 5} \,\diff\theta \\ &= \int \frac{2\sqrt{5} \sec^2\theta}{5\p{\tan^2\theta + 1}} \,\diff\theta \\ &= \int \frac{2\sqrt{5} \sec^2\theta}{5\sec^2\theta} \,\diff\theta \\ &= \frac{2}{\sqrt{5}} \int \diff\theta \\ &= \frac{2}{\sqrt{5}} \theta + C \\ &= \frac{2}{\sqrt{5}} \tan^{-1}\p{\frac{x - 1}{\sqrt{5}}} + C. \end{aligned}

Putting everything together, our final answer is

9(x+1)(x22x+6)dx=lnx+112lnx22x+6+25tan1(x15)+C.\int \frac{9}{\p{x + 1}\p{x^2 - 2x + 6}} \,\diff{x} = \boxed{\ln\abs{x + 1} - \frac{1}{2} \ln\abs{x^2 - 2x + 6} + \frac{2}{\sqrt{5}} \tan^{-1}\p{\frac{x - 1}{\sqrt{5}}} + C}.

Improper Integrals

Introduction

You're (hopefully) familiar with the Riemann integral: for a function continuous on an interval [a,b]\br{a, b}, we can calculate its definite integral on this interval:

abf(x)dx.\int_a^b f\p{x} \,\diff{x}.

The idea of improper integrals is to look at integrals where ff may not be defined on all of [a,b]\br{a, b}, or integrals where b=b = \infty:

Definition

Let f(x)f\p{x} be a function. If ff is not defined at aa, then we have the following improper integral of ff:

abf(x)dx=limta+tbf(x)dx.\int_a^b f\p{x} \,\diff{x} = \lim_{t \to a^+} \int_t^b f\p{x} \,\diff{x}.

Similarly, if ff is not defined at bb, then

abf(x)dx=limtbatf(x)dx.\int_a^b f\p{x} \,\diff{x} = \lim_{t \to b^-} \int_a^t f\p{x} \,\diff{x}.

If b=b = \infty, we also define

af(x)dx=limtatf(x)dx.\int_a^\infty f\p{x} \,\diff{x} = \lim_{t \to \infty} \int_a^t f\p{x} \,\diff{x}.

If the limit of one of these integrals exists and is a real number, then we say that integral converges. Otherwise, in the case that the limit does not exist (including the case where the limit is \infty), we say that the integral diverges.

In most cases, you won't be able to calculate an improper integral directly, but you'll be able to figure out if it converges or diverges (which is what the next couple weeks of the class will involve).

Here are the main examples of convergent and divergent integrals (which can be calculated directly):

Examples

Example 2.

(pp-integrals) Let a>0a > 0. Determine the values of pp such that the improper integrals

0adxxpandadxxpdx\int_0^a \frac{\diff{x}}{x^p} \quad\text{and}\quad \int_a^\infty \frac{\diff{x}}{x^p} \,\diff{x}

converge or diverge.

Solution.

For these integrals, we can evaluate them and take limits directly. If p=1p = 1, then

stdxx=lnxst=lntlns.\int_s^t \frac{\diff{x}}{x} = \ln\abs{x} \Big\rvert_s^t = \ln\abs{t} - \ln\abs{s}.

Since

limtlnt=andlimt0+lnt=,\lim_{t\to\infty} \ln\abs{t} = \infty \quad\text{and}\quad \lim_{t\to0^+} \ln\abs{t} = -\infty,

we get

0adxx=limt0+(lnalnt)=adxx=limt0+(lntlna)=,\begin{aligned} \int_0^a \frac{\diff{x}}{x} &= \lim_{t\to0^+} \p{\ln\abs{a} - \ln\abs{t}} = \infty \\ \int_a^\infty \frac{\diff{x}}{x} &= \lim_{t\to0^+} \p{\ln\abs{t} - \ln\abs{a}} = \infty, \end{aligned}

so both integrals diverge in this case. If p1p \neq 1, then

st1xpdx=x1p1pst=t1p1ps1p1p.\int_s^t \frac{1}{x^p} \,\diff{x} = \left. \frac{x^{1-p}}{1 - p} \right\rvert_s^t = \frac{t^{1-p}}{1 - p} - \frac{s^{1-p}}{1 - p}.

If p>1p > 1, then the exponent of t1pt^{1-p} is negative, so

0adxxp=limt0(a1p1pt1p1p)=adxxp=limt(t1p1pa1p1p)=a1p1p.\begin{aligned} \int_0^a \frac{\diff{x}}{x^p} &= \lim_{t\to0^-} \p{\frac{a^{1-p}}{1 - p} - \frac{t^{1-p}}{1 - p}} = \infty \\ \int_a^\infty \frac{\diff{x}}{x^p} &= \lim_{t\to\infty} \p{\frac{t^{1-p}}{1 - p} - \frac{a^{1-p}}{1 - p}} = -\frac{a^{1-p}}{1 - p}. \end{aligned}

Similarly, if p<1p < 1, then t1pt^{1-p} has a positive exponent, so

0adxxp=limt0(a1p1pt1p1p)=a1p1padxxp=limt(t1p1pa1p1p)=.\begin{aligned} \int_0^a \frac{\diff{x}}{x^p} &= \lim_{t\to0^-} \p{\frac{a^{1-p}}{1 - p} - \frac{t^{1-p}}{1 - p}} = \frac{a^{1-p}}{1 - p} \\ \int_a^\infty \frac{\diff{x}}{x^p} &= \lim_{t\to\infty} \p{\frac{t^{1-p}}{1 - p} - \frac{a^{1-p}}{1 - p}} = \infty. \end{aligned}

In summary,

0adxxp={convergesif p<1,divergesif p1adxxp={divergesif p1,convergesif p>1.\begin{aligned} \int_0^a \frac{\diff{x}}{x^p} &= \begin{cases} \text{converges} & \text{if } p < 1, \\ \text{diverges} & \text{if } p \geq 1 \end{cases} \\ \int_a^\infty \frac{\diff{x}}{x^p} &= \begin{cases} \text{diverges} & \text{if } p \leq 1, \\ \text{converges} & \text{if } p > 1. \end{cases} \end{aligned}

Pitfalls

A pretty common error when determining convergence and divergence is that you forget to check where your function is not defined. For example, the following calculation is wrong:

11dxx2=1x11=11=2,\int_{-1}^1 \frac{\diff{x}}{x^2} = \left. -\frac{1}{x} \right\rvert_{-1}^1 = -1 - 1 = -2,

but we know from pp-integrals that this should diverge, so this calculation is wrong. The reason why is because this is actually an improper integral, so we should have split it up to begin with:

11dxx2=limt010dxx2+limt0+t1dxx2,\int_{-1}^1 \frac{\diff{x}}{x^2} = \lim_{t\to0^-} \int_{-1}^0 \frac{\diff{x}}{x^2} + \lim_{t\to0^+} \int_t^1 \frac{\diff{x}}{x^2},

and both integrals diverge, so the original integral must also diverge.

Direct Comparison

As a quick preview, we're going to quickly talk about direct comparison.

Theorem (direct comparison)

Suppose f(x)f\p{x} and g(x)g\p{x} are functions which satisfy 0f(x)g(x)0 \leq f\p{x} \leq g\p{x}. Then

abg(x)dx converges    abf(x)dx converges\int_a^b g\p{x} \,\diff{x} \text{ converges} \implies \int_a^b f\p{x} \,\diff{x} \text{ converges}

and

abf(x)dx diverges    abf(x)dx diverges.\int_a^b f\p{x} \,\diff{x} \text{ diverges} \implies \int_a^b f\p{x} \,\diff{x} \text{ diverges}.

This includes the case when b=b = \infty.

The picture looks something like this:

Hopefully, it's intuitive to you why this is true: if the area under gg is finite, then the area under ff should be smaller, so it should also be finite. Similarly, if ff has infinite area, then gg has a larger area, so it should have infinite area as well.

The assumption that everything is non-negative is important so that we can "squeeze" ff with gg. Consider something like this:

The integrals af(x)dx\int_a^\infty f\p{x} \,\diff{x} and ag(x)dx\int_a^\infty g\p{x} \,\diff{x} in this case have no relation to each other, so direct comparison does not apply in this scenario.