[sage-support] Re: [sage-support]how to simply the equation
Hello, 2009/10/12 wxu...@sohu.com: Hi, everyone, I got the expression, sin(t)^8 + 4*sin(t)^6*cos(t)^2 + 6*sin(t)^4*cos(t)^4 + 4*sin(t)^2*cos(t)^6 + cos(t)^8 actually it is 1. how can I get it? Here you go: sage: t = var('t') sage: a = sin(t)^8 + 4*sin(t)^6*cos(t)^2 + 6*sin(t)^4*cos(t)^4 + 4*sin(t)^2*cos(t)^6 + cos(t)^8 sage: a.trig_simplify() 1 --Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: [sage-support]how to simply the equation
wxu...@sohu.com ha scripte: Hi, everyone, I got the expression, sin(t)^8 + 4*sin(t)^6*cos(t)^2 + 6*sin(t)^4*cos(t)^4 + 4*sin(t)^2*cos(t)^6 + cos(t)^8 actually it is 1. how can I get it? Thanks in advance! The secret is the method fullsimplify var('t') A = sin(t)**8 + 4*sin(t)**6*cos(t)**2 + 6*sin(t)**4*cos(t)**4 +4*sin(t)**2*cos(t)**6 + cos(t)**8 A.full_simplify() BTW, you should write sin(t)**2 instead of sin(t)^2 for at least two reasons : 1. this is the correct syntax 2. My Thunderbird printed sin(t)², and a copy paste to the Sage notebook produced sin(t)2. Thus I had to add ** by hand. The second point could, however, be seen as a bug in thunderbird... Have a good day Laurent --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: [sage-support]how to simply the equation
Thank you very much. Mike Hansen 写道: Hello, 2009/10/12 wxu...@sohu.com: Hi, everyone, I got the expression, sin(t)^8 + 4*sin(t)^6*cos(t)^2 + 6*sin(t)^4*cos(t)^4 + 4*sin(t)^2*cos(t)^6 + cos(t)^8 actually it is 1. how can I get it? Here you go: sage: t = var('t') sage: a = sin(t)^8 + 4*sin(t)^6*cos(t)^2 + 6*sin(t)^4*cos(t)^4 + 4*sin(t)^2*cos(t)^6 + cos(t)^8 sage: a.trig_simplify() 1 --Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: [sage-support]how to simply the equation
On Mon, Oct 12, 2009 at 3:30 PM, wxu...@sohu.com wrote: Thank you. It confused me how can I know all about the method. Is there some efficient way to know all of them? The easiest way is to use tab-completion. For example, if ex is your object, type in ex.simplify_ and then press TAB. It will show all the possible methods that start with simplify_. --Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org -~--~~~~--~~--~--~---