I need to convert $ \dfrac{1}{2x^{3}+x^{2}+2x} $ to $\dfrac{1}{2x} + \dfrac{\dfrac{-1}{4}+I\dfrac{\sqrt{15}}{60}}{x+\dfrac{1}{4}-\dfrac{I\sqrt{15}}{4}}+\dfrac{\dfrac{-1}{4}-I\dfrac{\sqrt{15}}{60}}{x+\dfrac{1}{4}-\dfrac{I\sqrt{15}}{4}} $ where I is imaginary
When I try to do
$f:= \dfrac{1}{2x^{3}+x^{2}+2x}$
$convert(f, parfrac, complex):$
It turns into a bunch of floating numbers such as:
$ \dfrac{(-.2500000000-0.6454972245*I)}{(x+.2500000000+.9682458366*I)}$ $ +\dfrac{(-.2500000000+0.6454972245e-1*I)}{(x+.2500000000-.9682458366*I)} $ $+ \dfrac{.5000000000}{x} $
You first solve
$$2x^{3}+x^{2}+2x=x(2x^2+x+2)=0 \tag{1}$$
and obtain 3 roots $a,b,c$
$$a=0,b=(1/4)(-1+i\sqrt{15}),c=(1/4)(-1-i\sqrt{15})\tag{1B}$$
i.e.
$$2x^{3}+x^{2}+2x=2(x-a)(x-b)(x-c)\tag{2}$$
Then you can assume
$$\frac{1}{2x^{3}+x^{2}+2x}=\frac{A}{x-a}+\frac{B}{x-b}+\frac{C}{x-c}\tag{3}$$
Multiply (2) by (3) and obtain
$$1=2A(x-b)(x-c)+2B(x-a)(x-c)+2C(x-a)(x-b)\tag{4}$$
You can then set coefficients of $x^0,x^1,x^2$ to be zero to solve for $A,B,C$ and obtain:
$$A=\frac{1}{2(a-b)(a-c)},B=\frac{1}{2(b-a)(b-c)},C=\frac{1}{2(c-a)(c-b)}\tag{5}$$
Substitution of (1B) into (5) leads to:
$$A=\frac{1}{2}$$ $$B=\frac{-4i}{15+i\sqrt{15}}=-\frac{1}{4}\left(1+\frac{i}{\sqrt{15}}\right)$$ $$C=\frac{+4i}{15-i\sqrt{15}}=-\frac{1}{4}\left(1-\frac{i}{\sqrt{15}}\right)$$
This method (from (2) through (5)) is quite general. It does not depend on the actual values of 3 roots $a,b,c$.