This is a re-post from StackOverflow, I was advised to post it here.
https://stackoverflow.com/questions/64101194/partial-fraction-decomposition
How do I find the constants A,B,C,D,K,S such that
$$ \frac{1}{x^6+1} = \frac{Ax+B}{x^2+1} + \frac{Cx+D}{x^2-\sqrt 3 x+1} + \frac{Kx+S}{x^2+\sqrt 3 x+1} $$
is true for every real x.
I need some sympy code maybe, not sure. Or... any other Python lib which could help here.
I tried by hand but it's not easy at all... and after 1 hour of calculating, I found that I have probably made some mistake.
I tried partial fraction decomposition in SymPy but it does not go that far.
I tried Wolfram Alpha too, but it also does not decompose to that level of detail, it seems.
See the alternate forms which WA gives below.
EDIT: I did a second try entirely by hand and I got these:
\begin{align}A &= 0,\\ B &= \frac13,\\ C &= -\frac1{2\sqrt3},\\ D &= \frac13,\\ K &= \frac1{2\sqrt3},\\ S &= \frac13. \end{align}
Could someone verify if these are correct?
And in general... how can I automate this task via SymPy or WA?
solve()– Calvin Khor Sep 28 '20 at 12:51ApartsupportsFactorwithExtension, for example: Partial fraction expansion with complex numbers. And btw, instead of writing the WA Mathematica code into WA, you can write it into an online wolfram mathematica notebook and then click run (shift + enter). – Vepir Oct 02 '20 at 16:35