{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 "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 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 "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 11 12 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1395 "RatFuncInt:=proc(f f,x)\n local f,a,b,c,d,i,v,m,A,eqns,vars,z;\n # If you want to see w hat the code does, then remove the\n # comment symbol # from the foll owing line:\n # options trace;\n f:=evala(Normal(ff)); # evala(Norm al( .. )) is same as normal\n # but also works with algebraic numb ers\n if type(f,polynom(anything,x)) then\n # a polynomial, inte grate it with the following formula.\n RETURN( add( coeff(f,x,i)/ (i+1) * x^(i+1) ,i=0..degree(f,x)) )\n fi;\n v:=sqrfree(denom(f),x); \n v:=v[2];\n m:=max(seq(i[2],i=v)); # = maximal pole order\n d:=1; \n for i in v do\n if i[2]=m then\n d:=d*i[1]\n fi\n \+ od;\n if m>1 then\n A := add(c[i]*x^i,i=0..degree(d,x)-1)/d^(m-1) ;\n eqns:=numer(normal( (f-diff(A,x))*d^m ));\n eqns:=\{coeffs (rem(eqns,d,x),x)\};\n vars:=\{seq(c[i],i=0..degree(d,x)-1)\};\n \+ A:=subs( solve(eqns,vars) , A);\n # Now integrate f-diff(A,x)\n # We don't need to normalize because this procedure\n # alrea dy does that in the beginning.\n v:=RatFuncInt(f-diff(A,x), x);\n \+ RETURN( v + A )\n fi;\n if m<>1 then\n ERROR(`this can not h appen`)\n fi;\n a,b := numer(f), denom(f);\n v:=resultant(a-z*diff( b,x),b,x);\n v:=\{solve(v,z)\};\n A := add(i*log(gcd(a-i*diff(b,x),b )),i=v);\n v:=RatFuncInt(f-diff(A,x), x);\n v + A # Note: if you d on't use RETURN command then\n # the last evaluated expressio n will be returned.\nend;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }} {PARA 12 "" 1 "" {XPPMATH 20 "6#>%+RatFuncIntGR6$%#ffG%\"xG6.%\"fG%\"a G%\"bG%\"cG%\"dG%\"iG%\"vG%\"mG%\"AG%%eqnsG%%varsG%\"zG6\"F6C1>8$-%&ev alaG6#-%'NormalG6#9$@$-%%typeG6$F9-%(polynomG6$%)anythingG9%-%'RETURNG 6#-%$addG6$*&*&-%&coeffG6%F9FI8)\"\"\")FI,&FUFVFVFVFV\"\"\"FX!\"\"/FU; \"\"!-%'degreeG6$F9FI>8*-%(sqrfreeG6$-%&denomG6#F9FI>F\\o&F\\o6#\"\"#> 8+-%$maxG6#-%$seqG6$&FUFeo/FUF\\o>8(FV?&FUF\\o%%trueG@$/F_pFho>Fbp*&Fb pFV&FU6#FVFV@$2FVFhoC)>8,*&-FN6$*&&8'6#FUFV)FIFUFV/FU;Fgn,&-Fin6$FbpFI FV!\"\"FVFY)Fbp,&FhoFVF]rFVFZ>8--%&numerG6#-%'normalG6#*&,&F9FV-%%diff G6$F_qFIF]rFV)FbpFhoFV>Far<#-%'coeffsG6$-%$remG6%FarFbpFIFI>8.<#-F]p6$ FdqFhq>F_q-%%subsG6$-%&solveG6$FarFgsF_q>F\\o-F$6$FirFI-FK6#,&F\\oFVF_ qFV@$0FhoFV-%&ERRORG6#%4this~can~not~happenG>6$8%8&6$-FcrFboF`o>F\\o-% *resultantG6%,&F`uFV*&8/FV-F[s6$FauFIFVF]rFauFI>F\\o<#-F`t6$F\\oFju>F_ q-FN6$*&FUFY-%$logG6#-%$gcdG6$,&F`uFV*&FUFVF[vFYF]rFauFVF`p>F\\oFctFgt F6F6F6" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "RatFuncInt(x,x); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,$*$)%\"xG\"\"#\"\"\"#\"\"\"F'" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "RatFuncInt(1/x,x);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#-%#lnG6#%\"xG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "f:=(5*x^13-2079*x+120)/(x^4-3)^3*x;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fG*&*&,(*$)%\"xG\"#8\"\"\"\"\"&F*!%z?\"$?\" \"\"\"F0F*F0F,*$),&*$)F*\"\"%F,F0!\"$F0\"\"$F,!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "RatFuncInt(f,x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,,*$)%\"xG\"\"$\"\"\"#\"\"&F'*&-%%sqrtG6#F'F(-%#lnG6#,& *$)F&\"\"#F(\"\"\"*$F,F(!\"\"F6#F*\"#7*&F,F(-F06#,&F3F6F7F6F6#!\"&F:*& ,&F3#F*F5F$!#XF(,&*$)F&\"\"%F(F6!\"$F6!\"\"F6*&,&F3F@F$\"#\")F(*$)FE\" \"#F(FJF6" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "evala(Normal( \+ diff(%,x) - f ));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"!" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "6 0 0" 0 } {VIEWOPTS 1 1 0 1 1 1803 }