How do I find the constants A,B,C,D,K,S such that
1/(x**6+1) = (A*x+B)/(x**2+1) + (C*x+D)/(x**2-sqrt(3)*x+1) + (K*x+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: 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:
A = 0
B = 1/3
C = -1/(2*sqrt(3))
D = 1/3
K = 1/(2*sqrt(3))
S = 1/3
How can I verify if these are correct?
Edit 2
The main point of my question is: how to do this with some nice/reusable Python code?