The expression is quadratic in C0 only if C0 is positive. Try replace C0 
with var('x', positive=True); factor the result, *then* solve for your two 
values.

On Wednesday, January 14, 2015 at 4:44:28 PM UTC-6, Junwei Huang wrote:
>
> Hi all, I have a symbolic expression as in polyC
>
> In [46]: polyC
> Out[46]: -(sqrt(2035953389603699)*sqrt(-1/C0**12)/2000000 - 
> 4849598923/(54000000*C0**6))**(1/3) - 1 + 3599/(300*C0**2) - 
> 368417/(18000*C0**4*(sqrt(2035953389603699)*sqrt(-1/C0**12)/2000000 - 
> 4849598923/(54000000*C0**6))**(1/3))
>
> In [47]: N(polyC,2)
> Out[47]: -(23.0*(-1/C0**12)**0.5 - 90.0/C0**6)**0.33 - 1.0 + 12.0/C0**2 - 
> 20.0*(23.0*(-1/C0**12)**0.5 - 90.0/C0**6)**(-0.33)/C0**4
>
> In [48]: polyC.simplify()
> Out[48]: -1 - (54*sqrt(2035953389603699)*sqrt(-1/C0**12) - 
> 9699197846/C0**6)**(2/3)/(600*(27*sqrt(2035953389603699)*sqrt(-1/C0**12) - 
> 4849598923/C0**6)**(1/3)) + 3599/(300*C0**2) - 
> 368417*2**(1/3)/(60*C0**4*(27*sqrt(2035953389603699)*sqrt(-1/C0**12) - 
> 4849598923/C0**6)**(1/3))
>
> In [49]: solve(polyC.simplify(),C0)
> Out[49]: []
>
> In [50]: solve_poly_system([polyC.simplify()],C0)
> PolynomialError: C0**(-2) contains an element of the generators set
>
>
> But if you exam Out[46], polyC seems to be something like C0**2*(expr)-1. 
> then C0 can be solved with two roots. Anything I missed? Thank you.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/2c2c8636-8a26-4ee0-b97b-a0c0af75ba68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to