Mike wrote:

Thanks for the reply. Using the exact same setup I changed "h1" to "p"
and it worked out fine. Well not fine exactly but at least I'm getting
some kind of answer. It's giving me some kind of "I" variable. Anyway
this seems like kind of a major bug. Is there a way to add this into
the tutorial or anything like that to warn new comers? I'm a bit of a
noob and have been pulling my hair out for a day and a half. Seems
like something worth mentioning. Thanks again



Answer: Yes, there is some imaginary unit, probably rounding error
which cannot be removed when using floating arithmetic. Another thing
is, that I observed similar behavior also for much simpler cubic
equations. Perhaps a gap which could be improved.

Robert


On 30 bře, 22:28, "ma...@mendelu.cz" <ma...@mendelu.cz> wrote:
> Try to_poly_solve=True
>
> sage: h1=var('h1')
> sage: solve ([(6000*(h1/2)/(((1/12)*0.1125*(h1^3)) -
> ((1/12)*(0.1125-0.012)*((h1-(2*0.012))^3)))) == 8928880.28799800],
> h1,to_poly_solve=True)
> [x^k*binomial(n, k) == -0.965941485371, x^k*binomial(n, k) ==
> 0.000330542127524, x^k*binomial(n, k) == 0.362610946746]
>
> sage: eq=(6000*(x/2)/(((1/12)*0.1125*(x^3)) -
> ((1/12)*(0.1125-0.012)*((x-(2*0.012))^3)))) == 8928880.28799800
> sage: sol=eq.solve(x,to_poly_solve=True)
> sage: map(lambda x:x.rhs().n(),sol)
> [-0.965941482668331 - 1.11022302462516e-16*I, 0.000330542129099686 +
> 4.48209178105508e-16*I, 0.362610940539232 - 3.05311331771918e-16*I]
>
> What is very funy (and bad) - I get binomial coefficients if I use
> variable h1.
>
> BTW: it is cubic equation, it has either one or three real solutions.
>
> Robert
>
> On 30 bře, 20:22, Mike <mikeduf...@gmail.com> wrote:
>
> > I seem to be having an issue solving an equation for an unknown
> > variable. I have graphed it and know that there are at least 2
> > solutions, however sage just keeps returning an empty set. Any ideas?
> > The solution I'm looking for is in the neighborhood of 0.19
>
> > From  www.sagenb.orgrunningin Firefox on Ubuntu 9.10
>
> > solve ([(6000*(h1/2)/(((1/12)*0.1125*(h1^3)) -
> > ((1/12)*(0.1125-0.012)*((h1-(2*0.012))^3)))) == 8928880.28799800], h1)
>
> >     [ ]
>
> > Thanks
> > -mike-

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

To unsubscribe, reply using "remove me" as the subject.

Reply via email to