Rational Functions

MTHSC 108H, Fall 1999

The following exercise illustrates some of the aspects of using partial fraction expansions on rational functions.

First consider what happens when we add some simple rational functions together. We multiply the denominators
to get a common denominator and then multiply each numerator by the appropriate factor and finally add all the
adjusted numerators together.

> r1 := 1/(x-1);
r2 := (x+1)/(x-1);
r1+r2;
simplify(r1+r2);
expand(r1+r2);
convert(r1+r2,parfrac,x);

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

Simplify gets things over a common denominator, expand splits the nuumerator, and convert(-,parfrac,-) does whatever
divisions are possible and writes things as a sum of fractions with simple denominators. The partial fraction expansion
is the ideal form for integration.

What happens when you use these three commands on [Maple Math] by itself - namely, simplify(r2); expand(r2);
and convert(r2,parfrac,x)?

What is the integral of r1+r2? Do this by inspection, then double check with Maple.

Now consider a slightly more complicated denominator.

> r3 := 1/(x^3-x^2+x-1);
simplify(r3);
expand(r3);
convert(r3,parfrac,x);
r4 := int(r3,x);
plot({r3,r4},x=-4..4,y=-2..1);

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Plot]

If we look at these results carefully, we should have a few observations and questions. First, because the numerator is so simple
observe that neither simplify nor expand changed anything.


What happens if you apply simplify or expand to the partial fraction result?

Note that the partial fraction form has two terms and the integral has three terms. Where did the third term come from?

Also note that the rational function is defined for all values of
[Maple Math] , except [Maple Math] ,but the integral is only plotted for values larger than 1.
What's wrong here?

Plotting the three different terms shows that [Maple Math] is the problem.

> plot({1/2*ln(x-1),-1/4*ln(x^2+1),-1/2*arctan(x)},x=-4..4,y=-2..1);

[Maple Plot]

Since Maple left out the absolute value, we don't get the correct behavior for [Maple Math] .
If we fix that, then we get a plot that makes more sense.

> r4hat := 1/2*ln(abs(x-1))-1/4*ln(x^2+1)-1/2*arctan(x);
plot({r3,r4hat},x=-4..4,y=-2..1);

[Maple Math]

[Maple Plot]

Looking back at the partial fraction expansion for r3, we see that the first term, [Maple Math] , integrates to the [Maple Math] function,
and the second term integrates into the remaining two terms, because the numerator can be expanded.

> int(1/(x-1),x);
expand((x+1)/(x^2+1));
int(x/(x^2+1),x);
int(1/(x^2+1),x);

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

Let's consider a final example with an even more complicated denominator.

> r5 := 1/(x^4-2*x^3+2*x^2-2*x+1);
factor(r5);
plot(r5,x=-3..4,y=0..10);

[Maple Math]

[Maple Math]

[Maple Plot]

Note that the plot indicates that the factor [Maple Math] , must occur in the denominator raised to an even power, because the funtion
approaches positive infinity from both sides of
[Maple Math] . Factoring this rational function confirms this showing that the function
has a double root at
[Maple Math] , and that it has the irreducible quadratic factor [Maple Math] . When we do the partial fraction expansion,
the double root leads to two terms. As we can see these two terms by themselves add up to a rational function which is of degree
one over degree two. Another way to think about what must happen is that each factor in the original denominator will occur
in the partial fraction expansion raised to the power of its multiplicity. Each term will then have a numerator which has degree
one less than the denominator.

> r6 := convert(r5,parfrac,x);
simplify(1/2*1/((x-1)^2)-1/2*1/(x-1));
int(r6,x);
r6hat := -(1/2)*1/(x-1) - (1/2)*ln(abs(x-1)) + (1/4)*ln(x^2+1);
plot({r5,r6hat},x=-3..4,y=-5..10);

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Plot]

Again we have to adjust the [Maple Math] term in order to get a correct plot of the integral of [Maple Math] .

Be sure that you can recognize which curve is for the integral and which is the derivative.
Work out an example using the following definition for r7.

> r7 := (x^4-x^2+15*x)/(x^5+4*x^3-3*x^4-4*x^2+3*x-1);

[Maple Math]

>