MATH 164, Spring 2001 Due Date: Name(s): Extra Project 8.4a: Partial Fractions Objective To illustrate how Maple can be used to integrate a rational function by partial fractions. Narrative One of the challenging aspects of integration by partial fractions is the algebra involved in obtaining the partial fraction decomposition of the integrand. In this project we illustrate how Maple can be used to find x4 - 2x2 + 4x + 1 x3 - x2 - x + 1 dx. Our reason for doing this is two-fold: First, it might help you with your MATH 164 homework. Second, it is important to learn how to do a partial fraction decomposition of a rational function since doing so is a basic skill required in solving differential equations by using Laplace transforms. Task Type the command lines in the left-hand column below into Maple in the order in which they are listed. The effect of each command is described in the right-hand column for your reference. Your lab report will be a hard copy of your typed input and Maple's responses. > # Project 8.4a: Partial Fractions > restart; First let num and den denote the numerator and denominator of the fraction. > num := x^4-2*x^2+4*x+1; den := x^3-x^2-x+1; Next find the quotient and remainder. > quo(num,den,x); rem(num,den,x); Now factor the denominator. > factor(den); So the fraction we need to break into parts is ... > 4*x/((x+1)*(x-1)^2) = A/(x-1) + B/(x-1)^2 + C/(x+1); To do this first clear denominators ... > (x+1)*(x-1)^2*%; > eq := simplify(%); Now equate the constant on the lefthand side of eq with that on the righthand side ... > eq0 := coeff(lhs(eq),x,0) = coeff(rhs(eq),x,0); the coefficient of x on the left-hand side of eq with that on the right-hand side ... > eq1 := coeff(lhs(eq),x,1) = coeff(rhs(eq),x,1); and the coefficient of x2 on the left-hand side of eq with that on the right-hand side ... > eq2 := coeff(lhs(eq),x,2) = coeff(rhs(eq),x,2); We then solve eq0, eq1, and eq2 for A, B, and C ... > solve({eq0,eq1,eq2},{A,B,C}); Let's check our work ... > simplify(1/(x-1)+2/(x-1)^2-1/(x+1)); And finally let's compute the integral ... > int(x+1+1/(x-1)+2/(x-1)^2-1/(x+1),x); Don't forget that we can always check our answer by differentiating. > simplify(diff(%,x)); Comments The purpose of this project was to illustrate how Maple can be used to help you check he computations that you would otherwise do by hand in completing your homework. If you just want to check whether you answer is correct, you can either: a) see what you get when you ask Maple to add the partial fractions, or b) use the Maple command parfrac() which computes the partial fraction decomposition of the argument (see Maple's Help for further details).