{VERSION 3 0 "SGI MIPS UNIX" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 266 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 267 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 269 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 271 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 272 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 }1 0 0 0 8 4 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 2" 3 4 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 8 2 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 107 "Consider the following ra tional function. A rational function is a polynomial or a quotient of \+ polynomials." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "f := x^3*(- 1+2*x^2)/(1-x^2+x^4);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "int (f,x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 41 "How can Maple compute t he above integral?" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 268 16 "Three questions:" }}{PARA 0 "" 0 "" {TEXT -1 65 "1) How \+ do calculus books teach integration of rational functions?" }}{PARA 0 "" 0 "" {TEXT -1 79 "2) Why is the standard calculus method not very s uitable for the above example?" }}{PARA 0 "" 0 "" {TEXT -1 103 "3) How can this method be improved; what is the method that computer algebra systems such as Maple use?" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 51 "C alculus method for integrating rational functions." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 49 "The Maple command s: int, Int, simplify and value." }}{PARA 0 "" 0 "" {TEXT -1 315 "In M aple the command \"int\" is the command for integration, and \"Int\" i s the \"inert version\" of the integration command. An inert command m eans essentially: \"just display the command but do not do the computa tion yet\". The inert version of integration, \"Int\", does no computa tion until you apply the command \"value\"." }}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 11 "int(x^3,x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "Int(x^3,x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "simp lify(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 238 "The percentage sign \+ % refers to the most recently evaluated expression. The simplify comma nd tries to simplify expressions but it does not tell \"Int\" to final ly do something. Only the command \"value\" awakes the \"Int\" from it s hybernation." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "value(%); " }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 97 "We \+ know from calculus the following formula, which is valid for every rea l number n, except n=-1." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 " Int(x^n, x) = int(x^n, x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 369 "No te that as far as Maple is concerned, an unassigned variable such as \+ \"n\" is not considered to be equal to any particular real number, nor is it equal to any other unassigned variable. So we have to be very c areful about general formulas in Maple because whenever an equation is true in general (but with an exceptions like n=-1) then Maple will ju st use that formula." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 17 "For n=-1 we have:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "Int(x^(-1),x) = int(x^(-1),x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 66 "More generally, if c is some complex number we have \+ the following " }{TEXT 272 21 "two calculus formulas" }{TEXT -1 1 ":" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "Int( (x-c)^n ,x) = int( ( x-c)^n,x ); # when n <> -1" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "Int( 1/(x-c) ,x) = int(1/(x-c),x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 10 "The above " }{TEXT 269 21 "two calculus formulas" }{TEXT -1 47 " are enough to integrate any rational function!" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 105 "Why? Because every \+ rational function is a linear combination of functions of the form (x -c)^n with c in " }{TEXT 257 1 "C" }{TEXT -1 10 " and n in " }{TEXT 258 1 "Z" }{TEXT -1 3 " (" }{TEXT 259 1 "C" }{TEXT -1 37 " is the fie ld of complex numbers and " }{TEXT 260 1 "Z" }{TEXT -1 26 " is the rin g of integers)." }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 28 "Rational func tions in Maple." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 42 "Let f be a rational function, for example:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "f := x^6/((x-3)^2*(x-2)^2) - (5*x^2 +x-3)/((x-3)*x^2);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 159 "We can nor malize f, writing f as the quotient of two polynomials, so that we hav e only one numerator and one denominator. This is done by the command \+ \"normal\"." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "normal(f);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "f; # f is unchanged:" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 156 "Note that \"normal\" or any other Maple command does not change f, it just returns the normalized f. If we want to change f we have to use an assignment \":=\"." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "f := normal(f);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "numer(f); # the numerator" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "denom(f); # the denominator" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 159 "The command normal does more than just b ring everything under the same denominator. It also removes common roo ts of the numerator and denominator. For example:" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 59 "f:=( numer(f) * (x^2 - 2*x + 1) ) / ( denom( f) * (x-1)^2 );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 198 "Now the numer ator and denominator have a common root: namely x=1 is a common double root. The common roots are the roots of the \"gcd\", the \"greatest c ommon divisor\" of the numerator and denominator." }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 9 "numer(f);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "denom(f);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "gcd( numer(f), denom(f) );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 174 "The normal command divides both numerator and denominator by the \+ \"gcd\". So after you apply \"normal\", there can no longer be any com mon roots of the numerator and denominator." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "f:=normal(f);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "gcd( numer(f), denom(f) );" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 181 "After you do \"normal\", the gcd of the numerator and \+ denominator is always 1, meaning that a complex number c can never be \+ the root of the numerator and denominator at the same time." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 30 "The roots of nu mer(f) are the " }{TEXT 263 11 "roots of f." }{TEXT -1 53 " The functi on f takes the value zero at these points." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 30 "The roots of denom(f) are the \+ " }{TEXT 264 11 "poles of f." }{TEXT -1 49 " The function f goes to in finity at these points." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 19 "The roots of f are:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "solve(numer(f));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 149 "The expression RootOf( polynomial, index = i) refers to the i'th \+ root of that polynomial. It is a short way to denote a root of a polyn omial exactly." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 19 "The poles of f are:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "solve(denom(f));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 193 "We see that all three poles have multiplicity 2 because they all \+ appear 2 times. So the function f goes to infinity at these points \"j ust as fast\" as 1/x^2 goes to infinity when x goes to zero." }}}} {SECT 1 {PARA 4 "" 0 "" {TEXT -1 31 "Series expansion of a function." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 81 "If R is some function that is convergent at x=0 we can compute the Taylor ser ies:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "R:=sin(x)/(x-2);" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "series(R,x=0);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 468 "Here O(x^6) refers to some function that , when you divide it by x^6, it still converges at x=0. So when x goes to zero that function O(x^6) goes to zero at least as fast as x^6. In a small neighborhood of x=0 this function O(x^6) takes very small val ues. The terms given above (given up to x^5) form a good approximation of the function near x=0. If we want to have a more accurate approxim ation we simply have to take more terms of the Taylor expansion, say 1 5 terms:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "series(R,x=0,15 );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 521 "Now O(x^15) refers to some unknown function that is very small when x is close to zero, because \+ divided by x^15 it would still converge at x=0. So the above terms (gi ven up to x^14) give a very accurate approximation of f near x=0. Near other points, say near x=5 the above series is not accurate at all, i t would never be accurate no matter how many terms we would use becaus e the radius of convergence is only 2. So the above terms only give a \+ good approximation at values for x that are well below 2 in absolute v alue." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 96 " An approximation of R near x=5 in the form of a Taylor series expansio n of R at x=5 is given by:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "series(R,x=5);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 78 "How can Map le compute a series expansion of a function that has a pole at x=c?" } }{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 279 "That's \+ not so hard, just multiply the function by a power of x-c so that the \+ function at some point converges at x=c, then compute the coefficients of the Taylor series by computing the value of the derivatives of tha t function at x=c, and at the end divide by that power of x-c." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "R := 1/(cos(x)-1);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "series(R,x=0,10);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 44 "How could we have calculated that \+ ourselves?" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 217 "Easy enough, first get rid of the pole by multiplying with x^2 . Then compute the coefficients as follows. Note that diff(f, x) is th e first derivative of f. And diff(f,x,x) = diff(f,x$2) is the second d erivative, etc." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "S := R*x ^2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "c0 := limit(S,x=0)/0 !;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "c1 := limit(diff(S,x) ,x=0)/1!;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "c2 := limit(di ff(S,x,x),x=0)/2!;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "c3 := limit(diff(S,x$3),x=0)/3!;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "c4 := limit(diff(S,x$4),x=0)/4!;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 439 "One final remark on a series expansion. Whenever we compute on ly finitely many terms, the function is (in some open subset of the co mplex numbers) only approximately equal to its expansion. The function only equals its expansion if we take all terms, which we can not do o n a computer because there are infinitely many terms. However, if we w ant to study local properties of a function such as poles, then we onl y need finitely many terms." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 49 "Poles are very important for integration becaus e:" }}{PARA 0 "" 0 "" {TEXT -1 44 "If f is a rational function, and if F is an " }{TEXT 265 14 "antiderivative" }{TEXT -1 16 " of f, that is , " }{TEXT 266 5 "F'=f " }{TEXT -1 39 "or in Maple language: diff(F,x) =f. Then" }}{PARA 0 "" 0 "" {TEXT 267 96 "Important principle: f has \+ a pole at x=c if and only if the antiderivative F has a pole at x=c." }}{PARA 0 "" 0 "" {TEXT -1 410 "This means that when we want to comput e F := int(f,x), then we already know all the poles of F. Not only tha t, we also know the pole orders, because if f has a pole of order 5 th en F must have a pole of order 4 at x=c. And if f has a pole of order \+ 1 then F must have a logarithm. So this trivial principle already give s a lot of information about the antiderivative F, which we will have \+ to use to determine F." }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 122 "Writ ing a rational function f as a linear combination of (x-c)^n and integ rating these terms by the two calculus formulas." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "f := normal( x^6/((x-3)^2*(x-2)^2) - (5*x^2+x-3)/((x-3)*x^2) );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "We have seen that the poles of f are c=0, c= 2, c= 3." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 74 "A rational function f is a polynomial if and only if it has no poles \+ c in " }{TEXT 256 1 "C" }{TEXT -1 59 ", in other words: If for every c omplex number c, the limit:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "Limit(f, x=c);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 199 "exists and is finite then f is a polynomial. For this particular f this is not t rue for c=0,2,3, and f is not a polynomial. Note that Limit is the \"i nert\" = \"do nothing\" version of the command limit." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "Limit(f, x=0) = limit(f,x=0);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "Limit(f,x=2) = limit(f,x=2); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "Limit(f,x=3) = limit(f, x=3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "limit(f,x=7);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 318 "We see that at x is 0, 2 or 3, th e function f goes to plus or minus infinity, and at any other x (such \+ as the randomly chosen x=7) it does not go to plus or minus infinity. \+ If we want to know more precisely what f \"does\" at the points x=0, x =2 and x=3, we have to compute a power series expansion of f at those \+ points." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "series(f,x=0);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 21 "We see that f equals:" }}{PARA 0 "" 0 "" {TEXT -1 34 " -x^(-2) + 5/3 + 5/9*x + O(x^2)" }}{PARA 0 " " 0 "" {TEXT -1 141 "where O(x^2) refers to a function that takes smal l values when x is close to 0. A function that, when divided by x^2, s till converges at x=0." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 23 "In particular f equals:" }}{PARA 0 "" 0 "" {TEXT -1 45 " -x^(-2) + a function that converges at x=0." }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 14 "series(f,x=2);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 21 "We see that f equals:" }}{PARA 0 "" 0 "" {TEXT -1 75 " 6 4*(x-2)^(-2) + 320*(x-2)^(-1) plus some function that converges at x=2 . " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "series(f,x=3);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 17 "So f also equals:" }}{PARA 0 "" 0 "" {TEXT -1 68 "729*(x-3)^(-2) - 5*(x-3)^(-1) plus a function that con verges at x=3." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 26 "If we combine all of this:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 77 "S := -x^(-2) + 64*(x-2)^(-2) + 320*( x-2)^(-1) + 729*(x-3)^(-2) - 5*(x-3)^(-1)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 17 "then we see that:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 55 "f = S plus a function \+ g that converges at x=0, 2 and 3." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 78 "S := -x^(-2) + 64*(x-2)^(-2) + 320*(x-2)^(-1) + 729*( x-3)^(-2) - 5*(x-3)^(-1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 3 "So:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "g := f - S;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 392 "Now g must be a function with no poles a t x=0, x=2, x=3. Then why do we still see x, x-2 and x-3 in the denomi nator? Well, that is because whenever we add or multiply rational func tions, we must apply \"normal\" to get the normalization. This will ca use the roots x=0, x=2, x=3 in the denominator to cancel against roots of the numerator, which causes these roots of the denominator to go a way." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "g:=normal(g);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "f = S + g;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 87 "As you can see, we have now written f as a line ar combination of functions of the form:" }}{PARA 0 "" 0 "" {TEXT -1 10 " (x-c)^n" }}{PARA 0 "" 0 "" {TEXT -1 10 "with c in " }{TEXT 261 1 "C" }{TEXT -1 10 " and n in " }{TEXT 262 2 "Z." }}{PARA 0 "" 0 "" {TEXT -1 64 "In other words we have written f as a sum of things of th e form:" }}{PARA 0 "" 0 "" {TEXT -1 46 " (some number)*(x-some number) ^(some integer)." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 124 "We can integrate each of these terms, x^2, or 1/(x-2) or 1/(x-3)^2, etc., by the calculus formulas given before, and we get:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "S+g;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "int(%,x);" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 55 "Exercise: Compute an integral with the calculus method." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 183 "Compute \+ the poles of the following rational function by applying Maple's \"sol ve\" on the denom(f). Then compute the series expansions of f at those poles. Then, like above, write f as:" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 11 "f = S + g," }}{PARA 0 "" 0 "" {TEXT -1 57 "f = a linear combination of some (x-c)^n for some c's in " } {TEXT 270 2 "C " }{TEXT -1 11 "and n's in " }{TEXT 271 2 "Z," }{TEXT -1 22 " plus some polynomial." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 105 "After that, integrating f is easy by app lying the two calculus formulas. Here is the rational function f:" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "f:=(x^7-5*x^5-2*x^2-4*x-1+4*x^3)/(x^6+2*x^5-2*x^4-4*x^3+x^2+2*x); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 494 "Open a new Maple worksheet, \+ copy this rational function to your worksheet, find the poles, compute the series expansions at the poles, write f as a sum of things that l ook like (some number)*(x-some number)^(some number) plus a polynomial . Then integrate each of the terms in the sum to find an antiderivativ e of f. Verify your answer by computing the derivative (use Maple!) of your result, normalize that derivative, and see if it is the same as \+ f. E-mail your worksheet to hoeij@math.fsu.edu" }}{PARA 0 "" 0 "" {TEXT -1 43 "I will grade the worksheets in the weekend." }}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 35 "A problem with the calculus method." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "f := x^3*(-1+2*x^2)/(1-x^2+x^4);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "denom(f);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "solve(%,x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "c1, c2, \+ c3, c4 := %;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 40 "Now c1, c2, c3, c 4 are the 4 poles of f." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "c 1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "series(f,x=c1,2);" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "convert(%,polynom);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 179 "Converting the series expansion i nto a polynomial is done so that we can select coefficients. We only n eed the coefficient of the only term that has a negative exponent in ( x-c1)." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "r1 := coeff(%,(x- c1)^(-1));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "r1:=simplify( r1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 126 "r2, r3, r4 := seq( simplify(coeff(convert(series(f,x=c.i,2),polynom),(x-c.i)^(-1))), i=2. .4); # In Maple 6+ replace c.i by c||i" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "S := r1*(x-c1)^(-1) + r2*(x-c2)^(-1) + r3*(x-c3)^(-1) + r4*(x-c4)^(-1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 94 "g:=ev ala(f-S); # use evala instead of normal for normalizing when there are algebraic numbers." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "f = \+ g + S;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 48 "Now apply the calculus \+ formulas to integrate g+S" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "int(g+S,x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 251 "We see that w e get a terrible answer because we are computing with all roots of den om(f), which introduces nasty expressions such as nested square roots. For other examples it can even get much worse. How come Maple gets a \+ nicer (i.e. shorter) answer?" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "int(f,x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 170 "Apparantly Map le does not calculate the roots c1,c2,c3,c4 of denom(f), because that \+ was where the all the square roots in our answer (with the calculus me thod) came from." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {SECT 1 {PARA 3 "" 0 "" {TEXT -1 57 "Some rational functions that shou ld be easy to integrate." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "F := (1-x)/(x^10-x^7+2*x^6-2*x^8-3* x^4-x^3+3*x^2+3*x+1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "di ff(F,x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "f:=normal(%, ex panded);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "d := denom(f); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "set_of_poles := \{solve (% , x)\};" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 201 "This set of roots \+ of d=denom(f) has 7 elements, say c1,..,c7. The roots c1,..,c7 of d ar e the poles of f, because f is normalized which implies that the roots of denom(f) are not roots of the numer(f)." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 478 "So there 7 poles, c1,..,c7. We would rather not compute with these c1,..,c7 because they are not-so- simple expressions. Computing with c1,..,c7 will only lead to more com plicated expressions. It shouldn't be necessary to compute with these \+ complicated expressions c1,..,c7, after all, the integral int(f,x) = F is a simple expression (see top of this section). There has to be som e quick computation with expressions not involving these complicated c 1,..,c7 that will lead to F." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 100 "Main idea: Try to compute just with polynomial s, instead of with the roots c1,..,c7 of a polynomial." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 21 "Some questions arise :" }}{PARA 0 "" 0 "" {TEXT -1 88 "1) How do we compute the pole orders f if we don't even compute with the poles c1,..,c7?" }}{PARA 0 "" 0 " " {TEXT -1 263 "2) Don't we need a series expansion at each pole, and \+ doesn't that make it necessary to compute with whatever expression it \+ takes to write down that pole? (if we use the calculus method then yes , then we do need to compute with that expression c1, or c2, .., c7). " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 50 "Squar e-free decomposition (more details in class)." }}{PARA 0 "" 0 "" {TEXT -1 45 "If d = d1^1 * d2^2 * d3^3 * d4^4 * ... * dn^n" }}{PARA 0 "" 0 "" {TEXT -1 4 "then" }}{PARA 0 "" 0 "" {TEXT -1 48 "gcd(d, diff(d ,x)) = d2^1 * d3^2 * ... * dn^(n-1)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "step1 := gcd(d, diff(d,x)); # d2^1*d3^2*d4^3*..." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "step2 := gcd(%, diff(%,x)); \+ # d3^1*d4^2*d5^3*..." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "gcd (%, diff(%,x)); # d4^1*d5^2*..." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 145 "So there is no d4 or d5 or.. So the highest order of any root of \+ d is 3. The roots of f that have order 3 are precisely the roots of d3 which is:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "d3:=step2;" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 59 "Now the polynomial given in step 1 equals d2*d3^2, so d2 is:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "d2:=normal(step1/d3^2);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 75 "So we find that d = (some number)*d2^2*d3^3, and that (some number) equa ls:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "normal(d/d2^2/d3^3); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 257 "What we did above, we can le t Maple do that by the command sqrfree(d,x). Then it computes that (so me number) which is 1 in this example. It also computes d1 (absent, th ere are no roots of multiplicity 1), d2 and d3, and indicates the mult iplicities as well." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "sqrf ree(d,x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "The above means d = \+ 1 * (x^3-x-1)^3 * (x^4+x+1)^2." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 161 "As you can see we have determined the or der of the roots of d, in other words we have determined the pole orde rs (2 and 3) of f, without computing with c1,..,c7." }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 16 "TO BE CONTINUED." }}}}} {MARK "6" 0 }{VIEWOPTS 1 1 0 3 2 1804 }