(actually, you don't need to factor, but doing so shows the quadratic
nature of the thing). I get for approx. solutions, +/- 2.6.
On Friday, January 16, 2015 at 1:06:18 PM UTC-6, Chris Smith wrote:
>
> 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/53665b8e-973a-4a6e-be8f-dc14d973441b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.