# Partial fraction decomposition of $1/(e^x-1)$

This link has discussion on finding partial fraction decomposition of $1/(e^x-1)$, so I experimented with Mathematica to see if M can do it, but looks like not. Similar is the case with one more CAS I tried.

I can clearly see that its not working with M but question is why ?

What I think is that probably CAS gives algebraically closed solutions without extending domain hence it returns Apart[1/(x^2+1)] without success though it has roots in complex numbers(but its just a thought).

Also Apart[1/(a*x^2-1)] is not evaluated. Looks like symbolic computation on Apart is not supported or may be no such algorithm exists. Don't know !!

Can someone suggest why complex roots are not considered part of decomposition on CASes ?

Quite frankly, as a user of Mathematica, I would expect the CAS to return results based on choice whether its algebraically closed or complex roots.

• Define please, what is CAS? Oct 22, 2014 at 7:56
• @AlexeiBoulbitch Computer Algebra Systems ? E.g. Ginac++, FORM, Fermat, Mathematica, etc... Factoring, especially in denominators, tends to be their most frustrating point. Oct 22, 2014 at 8:03
• How to do partial fraction of 1/{(x^m)*((p-x^(n-1))^((n-m)/(n-1)))}? Is it possible to factorize it in Mathematica? May 18, 2017 at 5:20

Apart only factorizes the denominator in simple cases. Otherwise it needs some help:

Apart[1/Factor[(x^2 + 1), Extension -> I]]


(* -(I/(2 (-I + x))) + I/(2 (I + x)) *)

Apart[1/Factor[x^2 + 2, Extension -> {I, Sqrt[2]}]]


(* 1/(2 Sqrt[2] (Sqrt[2] - I x)) + 1/(2 Sqrt[2] (Sqrt[2] + I x)) *)

• hm..I think it should be built in Apart, thanks though. Oct 22, 2014 at 13:45

That is not, properly speaking, a partial fraction decomposition. Those are finite and involve polynomial denominators. What you showed is a form of series representation. That can be done in Mathematica using SeriesCoefficient.

In[102]:= SeriesCoefficient[1/(Exp[x] - 1), {x, 0, n}]

(* Out[102]= Piecewise[{{BernoulliB[1 + n]/(1 + n)!, n >= -1}}, 0] *)

• Its possible that you are correct because it doesn't look like decomposition, but there must be some partial fraction decomposition for 1/(e^x-1). I couldn't find details on this particular function. Thanks for responding though. Oct 24, 2014 at 8:16
• Recently I read more in detail on pfd and I found that it is indeed a pfd representation.Check this link, citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.49.3091 Oct 26, 2014 at 6:18
• (1) You are correct that series coefficnets do not capture what you want, and... (2) It might be the case that there are extensions of pfd to meromorphic but not rational functions (that is, not polynomial quotients, but... (3) That cited article does not handle such functions. It is strictly for rational functions. Oct 26, 2014 at 19:22

I'll use the function from Factoring polynomials to factors involving complex coefficients by Daniel Lichtblau which can also factor -1 + a x^2

factorCompletely[poly_, x_] := Module[{solns, lcoeff},
solns = Solve[poly == 0, x, Cubics -> False, Quartics -> False];
lcoeff = Coefficient[poly, x^Exponent[poly, x]];
lcoeff*(Times @@ (x - (x /. solns)))];


Now

Apart[1/factorCompletely[-1 + a x^2, x]]


Apart[1/factorCompletely[ x^2 + 1, x]]


• :thanks for bringing this link up Nasser. Its helpful. Oct 22, 2014 at 13:46