Re: Getting numerical values from a closed form integration?
"Alasdair McAndrew" <[email protected]>
| Newsgroups | gmane.comp.mathematics.axiom.user |
|---|---|
| Message-ID | <[email protected]> |
Thank you, Francois and Bill, both solutions work fine. I'm still getting my head around the concept of an "expression" as a type. Integer, Float, Complex, List, String... they're all very well, but I'm still very unsure about "expression". (Also still very unsure about lots of other things, too). cheers, Alasdair On 7/12/07, Bill Page <[email protected]> wrote: > > On 12 Jul 2007 12:58:49 +0200, Francois Maltey wrote: > > > For example: > > > > > > integrate(sin(2*x),x=-%pi/3..4*%pi/7) > > > > > > The answer is in closed form, but I can't convert it to a float. At > least: > > > > > > integrate(sin(2*x),x=-%pi/3..4*%pi/7)::Float > > > > Try > > > > numeric integrate(sin(2*x),x=-%pi/3..4*%pi/7) > > > > I get 0.20048... > > I think that is a good solution. But one thing to keep in mind perhaps > for later use is that often when > > integrate(sin(2*x),x=-%pi/3..4*%pi/7)::Float > > fails, the following similar coercion will work > > integrate(sin(2*x),x=-%pi/3..4*%pi/7)::Expression Float > > I think the issue is a certain weakness in Axiom's system of coercions. > > > Don't you find a strong typed CAS is nice for mathematics > > even if the final user is a little bored... > > > > Francois, could you expand this comment? I am not sure what point you > are making when you say "bored". :-) > > Regards, > Bill Page. > _______________________________________________ Axiom-mail mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/axiom-mail