Integration by Partial Fractions

> with(student):

Rational Functions: Case 0.

Recall: [Maple Math] where p and q are polynomials is a rational function. R is a proper rational function if the degree of p is less than the degree of q. If the degree of p is greater than or equal to the degree of q then R is improper . Recall from high school that if R is improper then you can use long division to write R as the sum of a polynomial and a proper rational function.

Use long division to covert the following improper rational functions to a "proper" form:

> R1:=(x^3+2)/(x^2+x-1);convert(R1,parfrac,x);

[Maple Math]

[Maple Math]

> R2:=(x+1)/(x-1);convert(R2,parfrac,x);

[Maple Math]

[Maple Math]

> R3:=(2*x^4+x-1)/(x^2+1);convert(R3,parfrac,x);

[Maple Math]

[Maple Math]

Note: the integration techniques we will develop will apply only to proper rational functions so it is mandatory that you learn how to divide polynomials!

Find the following integrals by first converting the improper rational functions to a "proper" form:

> I1:=Int((x-1)/(x+1),x);value(I1);convert(integrand(I1),parfrac,x);

[Maple Math]

[Maple Math]

[Maple Math]

> I2:=Int((t^2+2*t+2)/(t+1),t);value(I2);convert(integrand(I2),parfrac,t);

[Maple Math]

[Maple Math]

[Maple Math]

> I3:=Int((2*x^4+x-1)/(x^2+1),x);value(I3);convert(integrand(I3),parfrac,x);

[Maple Math]

[Maple Math]

[Maple Math]

Now, suppose you were trying to integrate a proper rational function that looked like [Maple Math] . This would be difficult unless you happened to notice that [Maple Math] . Then it would be easy. The right hand side of the preceeding equation is called the partial fraction decomposition of [Maple Math] and is the name of the game for what follows.

Case 1: The denominator of [Maple Math] is a product of distinct linear factors .

Note: When I write [Maple Math] in the following sections I am assuming that [Maple Math] is a proper rational function . In cases when it is not, it is assumed that we would first use long division to write [Maple Math] in its "proper" form and then apply the following techniques.

Consider the example [Maple Math] in which the denominator factors into distinct linear factors as follows: [Maple Math] . The partial fraction decomposition of R is obtained by writing

[Maple Math] = [Maple Math] and solving this equation for the constants A, B and C (see your text or the blackboard for details). Once decomposed, it is a trivial matter to find an antiderivative for R

> R:=(x^2+2*x+3)/(x^3-2*x^2-3*x);convert(R,parfrac,x);int(R,x);

[Maple Math]

[Maple Math]

[Maple Math]

e.g.

> I1:=Int(3/(x^2-4),x);value(I1);

[Maple Math]

[Maple Math]

note: The above answer is more politely written as [Maple Math] [Maple Math] .

e.g.

> I2:=Int(1/(x^2-a^2),x);value(I2);

[Maple Math]

[Maple Math]

note: the above antiderivative would normally be reported as [Maple Math] [Maple Math] .

Case 2: [Maple Math] is a product of linear factors , some of which are repeated .

In case 2 we consider [Maple Math] where q factors into linear factors, but some are repeated. Suppose, for instance, q contains 3 factors of the form [Maple Math] . In the decomposition then we would need three terms of the form: [Maple Math] where each [Maple Math] is a constant. For example, to decompose [Maple Math] you would solve the equation [Maple Math] = [Maple Math] for A, B, C, D.

e.g. find [Maple Math]

> p:=9*x^2-20*x-2;q:=6*x^3-18*x^2+24;

[Maple Math]

[Maple Math]

> factor(q);

[Maple Math]

> convert(p/q,parfrac,x);

[Maple Math]

> int(p/q,x);

[Maple Math]

Case 3: [Maple Math] contains distinct irreducible quadratic factors .

Three Preliminary e.g.'s

Big e.g.: Find [Maple Math] (use substitution ).

> Int(1/(x^2+a^2),x)=int(1/(x^2+a^2),x)+C;

[Maple Math]

e.g. Find [Maple Math]

> Int((x+2)/(x^2+4),x)=int((x+2)/(x^2+4),x);

[Maple Math]

e.g. Find [Maple Math]

> R:=1/(x^2+x+1):I1:=Int(R,x);completesquare(R,x);value(I1);

[Maple Math]

[Maple Math]

[Maple Math]

The decomposition.

It can happen that a polynomial cannot be factored completely into linear factors. It may be that q contains quadratic factors that cannot be factored i.e. irreducible quadratic factors. Recall how quadratic expressions may be factored using the quadratic formula (below):

> p:=a*x^2+b*x+c;solutions:=solve(p=0,x);

[Maple Math]

[Maple Math]

> a*(x-solutions[1])*(x-solutions[2]);

[Maple Math]

> expand(%);

[Maple Math]

It follows from the above lines that a quadratic expression is reducible (over the Real numbers) if and only if [Maple Math] > 0. To decompose [Maple Math] when q contains distinct irreducible quadratic factors you must include a term of the form [Maple Math] for each irreducible term [Maple Math] . For example to decompose [Maple Math] you would solve the equation [Maple Math] = [Maple Math] for A, B, C, D.

e.g.

> Int((x^2+2*x-1)/(x^4+x^3+x^2+x),x);

[Maple Math]

> factor(x^4+x^3+x^2+x);

[Maple Math]

> convert((x^2+2*x-1)/(x*(x+1)*(x^2+1)),parfrac,x);

[Maple Math]

> Int((x^2+2*x-1)/(x*(x+1)*(x^2+1)),x)=int((x^2+2*x-1)/(x*(x+1)*(x^2+1)),x);

[Maple Math]

Case 4: [Maple Math] contains repeated irreducible quadratic factors.

This case is handled analogously to the case of repeated linear factors. For example, to decompose [Maple Math] you would solve the equation [Maple Math] for A, B, C, D, E

> R:=(1)/(x*(x^2+2)^2);convert(R,parfrac,x);Int(R,x)=int(R,x);

[Maple Math]

[Maple Math]

[Maple Math]

Some "rationalizing" substitutions

e.g. Find I1 = [Maple Math] using substitution :

> I1:=Int(1/(x*sqrt(x+1)),x);

[Maple Math]

First try: let u = x + 1

> I2:=changevar(u=x+1,I1,u);

[Maple Math]

Second try: let w = [Maple Math] or, equivalently, [Maple Math] :

> I3:=changevar(w^2=x+1,I1,w);

[Maple Math]

> value(I3);ans:=value(I1);

[Maple Math]

[Maple Math]

> convert(ans,ln);

[Maple Math]

And the polite answer is: [Maple Math]

e.g. Find I1 = [Maple Math] using substitution :

> I1:=Int(x^3/((x^2+1)^(1/3)),x);

[Maple Math]

First try: u = [Maple Math] :

> changevar(u=x^2+1,I1,u);

[Maple Math]

Second try: w = [Maple Math] or [Maple Math]

> I2:=changevar(w^3=x^2+1,I1,w);

[Maple Math]

> value(I2);value(I1);

[Maple Math]

[Maple Math]

e.g. Find I1 = [Maple Math]

> I1:=Int(1/(sqrt(x)+x^(1/3)),x);

[Maple Math]

> I2:=changevar(u^6=x,I1,u);convert(integrand(I2),parfrac,u);

[Maple Math]

[Maple Math]

> value(I2);value(I1);

[Maple Math]

[Maple Math]
[Maple Math]