On 01/13/2017 05:12 AM, Enrique Artal wrote: > I would like to know how to handle with this issue. Consider a function > f=sqrt(cos(x)^3 - 3*cos(x)^2 - cos(x) + 6). It is possible to deal with > this function for standard procedures like numerical_integral in (-1,1). > If one considers f.canonicalize_radical() it is presented > as sqrt(cos(x)^2 - cos(x) - 3)*sqrt(cos(x) - 2), which avoids numerical > integration in particular since each factor is complex in (-1,1). It is > not solved if x is declared as a real variable (with domain='real'). For > this particular function, it is not hard to avoid the issue, but if it > appears in more complex expressions, it is less obvious.
Don't use canonicalize_radical =) If you read its documentation, there is a big WARNING stating that it is going to do weird and unpredictable things. As you have discovered, it's not a form of simplification -- the input and output may be wildly different functions. -- You received this message because you are subscribed to the Google Groups "sage-support" 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
