Re: partial fraction

*To*: mathgroup at smc.vnet.net*Subject*: [mg32881] Re: [mg32865] partial fraction*From*: BobHanlon at aol.com*Date*: Mon, 18 Feb 2002 05:22:00 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

In a message dated 2/16/02 4:45:52 AM, kyguan at hotmail.com writes: >Do you have any ideas on how to integrate the following function by partial > >fraction? > >1/(1-x^2)^2 (Sorry it was supposed to be a minus instead of plus) > >I have found the answer by using 'the integrator'. However, I have no single > >clue on how the answer were calculated. > Although it does not appear to be documented, the standard add-on package DiscreteMath`RSolve` defines the function PartialFractions. Needs["DiscreteMath`RSolve`"]; f[x_] := 1/(1-x^2)^2; pfe1 = PartialFractions[f[x], x] 1/(4*(-1 + x)^2) - 1/(4*(-1 + x)) + 1/(4*(1 + x)^2) + 1/(4*(1 + x)) Integrating term-by-term Integrate[#,x]& /@ pfe1 -1/(4*(-1 + x)) - 1/(4*(1 + x)) - Log[-1 + x]/4 + Log[1 + x]/4 %//Simplify ((-2*x)/(-1 + x^2) - Log[-1 + x] + Log[1 + x])/4 You could also do the partial fraction expansion yourself Factor[f[x]] 1/((-1 + x)^2*(1 + x)^2) The partial fraction is then of the form pfe2 = {a, b, c, d}.(1/{x+1, (x+1)^2 , (x-1), (x-1)^2}) d/(-1 + x)^2 + c/(-1 + x) + b/(1 + x)^2 + a/(1 + x) eqn = Thread[ (cl = CoefficientList[Numerator[Together[pfe2]],x])== PadRight[ CoefficientList[Numerator[f[x]],x], Length[cl]]] {a + b - c + d == 1, -a - 2*b - c + 2*d == 0, -a + b + c + d == 0, a + c == 0} soln = Solve[eqn, {a,b,c,d}][[1]] {a -> 1/4, b -> 1/4, c -> -1/4, d -> 1/4} (pfe2 /. soln) == pfe1 True Bob Hanlon Chantilly, VA USA

**Follow-Ups**:**Re: Re: partial fraction***From:*Murray Eisenberg <murraye@attbi.com>