# Partial fraction expansion with complex numbers

$$\text{Apart}\left[\frac{1}{x^4+1}\right]$$

Does nothing. How can I get it to expand it. Sometimes it is useful.

• See this question: 68824. – Mahdi Jun 22 '15 at 17:47
• @Mahdi $$\text{Apart}\left[\text{Factor}\left[\frac{1}{x^4+1},\text{Extension}\to i\right]\right]$$ gives only $$\frac{i}{2 \left(x^2+i\right)}-\frac{i}{2 \left(x^2-i\right)}$$ and $$\text{Apart}\left[\text{Factor}\left[\frac{1}{x^4+2},\text{Extension}\to i\right]\right]$$ straight up does not work – grdgfgr Jun 22 '15 at 17:56
• What is expected result for the first one? For the second one: Apart@Factor[1/(1 + x^2), Extension -> {(-1)^(1/2), I}]? – Mahdi Jun 22 '15 at 18:05

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

$$\frac{\frac{1}{4}+\frac{i}{4}}{\sqrt{2} \left(-x+\frac{1+i}{\sqrt{2}}\right)}+\frac{\frac{1}{4}+\frac{i}{4}}{\sqrt{2} \left(x+\frac{1+i}{\sqrt{2}}\right)}-\frac{\frac{1}{4}-\frac{i}{4}}{\sqrt{2} \left(-x-\frac{1-i}{\sqrt{2}}\right)}-\frac{\frac{1}{4}-\frac{i}{4}}{\sqrt{2} \left(x-\frac{1-i}{\sqrt{2}}\right)}$$
• @grdgfgr How about ExpToTrig[Apart[Factor[1/(1 + x^4), Extension -> (x /. Solve[1 + x^4 == 0, x])]]]? – kirma Jun 22 '15 at 18:36