Integration by Partial Fractions
> with(student):
Rational Functions: Case 0.
Recall:
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);
> R2:=(x+1)/(x-1);convert(R2,parfrac,x);
> R3:=(2*x^4+x-1)/(x^2+1);convert(R3,parfrac,x);
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);
> I2:=Int((t^2+2*t+2)/(t+1),t);value(I2);convert(integrand(I2),parfrac,t);
> I3:=Int((2*x^4+x-1)/(x^2+1),x);value(I3);convert(integrand(I3),parfrac,x);
Now, suppose you were trying to integrate a proper rational function that looked like
. This would be difficult unless you happened to notice that
. Then it would be easy. The right hand side of the preceeding equation is called the
partial fraction decomposition
of
and is the name of the game for what follows.
Case 1: The denominator of
is a product of
distinct
linear factors
.
Note:
When I write
in the following sections I am assuming that
is a
proper rational function
. In cases when it is not, it is assumed that we would first use
long division
to write
in its "proper" form and
then
apply the following techniques.
Consider the example
in which the denominator factors into
distinct linear factors
as follows:
. The
partial fraction decomposition
of R is obtained by writing
=
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);
e.g.
> I1:=Int(3/(x^2-4),x);value(I1);
note:
The above answer is more
politely
written as
.
e.g.
> I2:=Int(1/(x^2-a^2),x);value(I2);
note: the above antiderivative would normally be reported as
.
Case 2:
is a product of
linear factors
, some of which are
repeated
.
In case 2 we consider
where q factors into
linear factors,
but some are repeated. Suppose, for instance, q contains 3 factors of the form
. In the decomposition then we would need three terms of the form:
where each
is a constant. For example, to decompose
you would solve the equation
=
for A, B, C, D.
e.g. find
> p:=9*x^2-20*x-2;q:=6*x^3-18*x^2+24;
> factor(q);
> convert(p/q,parfrac,x);
> int(p/q,x);
Case 3:
contains
distinct
irreducible quadratic factors
.
Three Preliminary e.g.'s
Big e.g.: Find
(use
substitution
).
> Int(1/(x^2+a^2),x)=int(1/(x^2+a^2),x)+C;
e.g.
Find
> Int((x+2)/(x^2+4),x)=int((x+2)/(x^2+4),x);
e.g.
Find
> R:=1/(x^2+x+1):I1:=Int(R,x);completesquare(R,x);value(I1);
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);
> a*(x-solutions[1])*(x-solutions[2]);
> expand(%);
It follows from the above lines that a
quadratic expression
is reducible (over the
Real
numbers) if and only if
> 0. To decompose
when q contains distinct irreducible quadratic factors you must include a term of the form
for each irreducible term
. For example to decompose
you would solve the equation
=
for A, B, C, D.
e.g.
> Int((x^2+2*x-1)/(x^4+x^3+x^2+x),x);
> factor(x^4+x^3+x^2+x);
> convert((x^2+2*x-1)/(x*(x+1)*(x^2+1)),parfrac,x);
> 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);
Case 4:
contains
repeated
irreducible quadratic factors.
This case is handled analogously to the case of repeated linear factors. For example, to decompose
you would solve the equation
for A, B, C, D, E
> R:=(1)/(x*(x^2+2)^2);convert(R,parfrac,x);Int(R,x)=int(R,x);
Some "rationalizing" substitutions
e.g. Find I1 =
using
substitution
:
> I1:=Int(1/(x*sqrt(x+1)),x);
First try: let u = x + 1
> I2:=changevar(u=x+1,I1,u);
Second try:
let w =
or, equivalently,
:
> I3:=changevar(w^2=x+1,I1,w);
> value(I3);ans:=value(I1);
> convert(ans,ln);
And the polite answer is:
e.g. Find I1 =
using
substitution
:
> I1:=Int(x^3/((x^2+1)^(1/3)),x);
First try:
u =
:
> changevar(u=x^2+1,I1,u);
Second try:
w =
or
> I2:=changevar(w^3=x^2+1,I1,w);
> value(I2);value(I1);
e.g. Find I1 =
> I1:=Int(1/(sqrt(x)+x^(1/3)),x);
> I2:=changevar(u^6=x,I1,u);convert(integrand(I2),parfrac,u);
> value(I2);value(I1);