On Thursday, May 17, 2012 1:52:38 AM UTC-4, ketchers wrote:
>
>
>
>
> I don't know how to get sage to understand "domain : complex" so I tried
> with assume and here is what happened. Does it make sense?
>
>
>>
Yes, it does. Our assumptions go through Maxima, and apparently assuming a
variable is complex does the job.
sage: a = integrate(x*cos(x^3),(x,0,0.5)).n()
sage: assume(x,'complex')
sage: b = integrate(x*cos(x^3),(x,0,0.5)).n()
sage: assumptions()
[x is complex]
But apparently we didn't think of this redundancy. I suppose it's possible
for a variable to be real and complex, but probably this is not what is
intended, as your post implies. (Try to actually cut and paste commands,
having it in the image makes it tedious to reproduce.)
sage: assume(x,'real')
sage: assumptions()
[x is complex, x is real]
sage: maxima_calculus('domain')
complex
sage: forget()
sage: c = integrate(x*cos(x^3),(x,0,0.5)).n()
sage: a; b; c
-0.0677842754623305
0.1247560409610376
-0.0677842754623305
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org