On Wed, 29 Jun 2011 19:54:06 -0700 (PDT)
ObsessiveMathsFreak <[email protected]> wrote:
> This is pretty infuriating.
Unfortunately we haven't worked out the interaction between maxima's
assume() function and GiNaC/Pynac's knowledge of domains yet.
> sage: forget()
> sage: assume(theta,'real')
> sage: exp(I*theta).real()
>
> e^(-imag_part(theta))*cos(real_part(theta))
The method .real() is purely in GiNaC. You either need to pass through
maxima with a call to simplify
sage: var('theta')
theta
sage: exp(I*theta).real()
cos(real_part(theta))*e^(-imag_part(theta))
sage: exp(I*theta).real().simplify()
cos(theta)
or tell GiNaC that your variable is real:
sage: var('theta',domain=RR)
theta
sage: exp(I*theta).real()
cos(theta)
Cheers,
Burcin
--
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