1 | initial version |

You're just seeing some round-off error. If you increase the number of digits, the real parts get closer together but still show round-off error further out. If you want to make sure two of the roots are complex conjugates, then don't evaluate them numerically.

The factor of `U`

gives you poles at $p=0$ and $p = pm i \omega$, so that part can be set aside as known. The denominator of `F`

is a cubic polynomial in `p`

, so you know that its roots are either all real or one real plus a complex conjugate pair. The following code

```
var('C_1 C_2 L_1 omega R_1 Amp t p')
Z_1 = ((L_1*p + 1/(C_1*p))*(1/(C_2*p)))/((1/(C_2*p)) + ((L_1*p + 1/(C_1*p))))
F = (R_1/(R_1 + Z_1)).full_simplify()
show(F.denominator())
G = F.denominator().subs(C_1 = 6*10^-15, C_2 = 3*10^-12, L_1 = 4.2217, R_1 = 1000)
show(G)
H = solve(G,p)
for h in H: show(h.rhs())
```

displays the denomiator of `F`

before and after substitution of your choice of constants along with the exact roots, as can be seen in the live example here. I've declared all the variables at once for simplicity.

If you compare the first two roots, you'll see that they are exactly complex conjugates. There's no error in your code, just some numerical rounding.

2 | No.2 Revision |

You're just seeing some round-off error. If you increase the number of digits, the real parts get closer together but still show round-off error further out. If you want to make sure two of the roots are complex conjugates, then don't evaluate them numerically.

The factor of `U`

gives you poles at $p=0$ and $p = ~~pm ~~\pm i \omega$, so that part can be set aside as known. The denominator of `F`

is a cubic polynomial in `p`

, so you know that its roots are either all real or one real plus a complex conjugate pair. The following code

```
var('C_1 C_2 L_1 omega R_1 Amp t p')
Z_1 = ((L_1*p + 1/(C_1*p))*(1/(C_2*p)))/((1/(C_2*p)) + ((L_1*p + 1/(C_1*p))))
F = (R_1/(R_1 + Z_1)).full_simplify()
show(F.denominator())
G = F.denominator().subs(C_1 = 6*10^-15, C_2 = 3*10^-12, L_1 = 4.2217, R_1 = 1000)
show(G)
H = solve(G,p)
for h in H: show(h.rhs())
```

displays the denomiator of `F`

before and after substitution of your choice of constants along with the exact roots, as can be seen in the live example here. I've declared all the variables at once for simplicity.

If you compare the first two roots, you'll see that they are exactly complex conjugates. There's no error in your code, just some numerical rounding.

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.