Thank you! On Friday, February 27, 2015 at 5:41:07 PM UTC+2, vdelecroix wrote: > > Here is one way... not sure it is the best > > sage: eq1 = sqrt(cos(4*x)+1) > sage: eq2 = eq1.simplify_trig() > sage: eq2 > sqrt(8*cos(x)^4 - 8*cos(x)^2 + 2) > > The next step consists in factoring what is inside the sqrt: > > sage: o = eq2.operands()[0] > sage: of = o.factor() > sage: o > 8*cos(x)^4 - 8*cos(x)^2 + 2 > sage: of > 2*(2*cos(x)^2 - 1)^2 > sage: eq3 = eq2.subs({o:of}) > sage: eq3 > sqrt(2)*sqrt((2*cos(x)^2 - 1)^2) > > Then for the conversion sqrt(x^2) -> abs(x) you can use > > sage: eq3.simplify_real() > sqrt(2)*abs(2*cos(x)^2 - 1) > > Vincent >
-- 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 sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.