Powsimp

32 views
Skip to first unread message

Paul Royik

unread,
Jun 22, 2015, 3:12:30 PM6/22/15
to sy...@googlegroups.com
Can't rewrite sin(x)**17/x**17 as (sin(x)/x)**17. 
Is there any way to do that?

Aaron Meurer

unread,
Jun 22, 2015, 3:37:26 PM6/22/15
to sy...@googlegroups.com
Unfortunately, for integer powers, SymPy automatically denests them,
so (sin(x)/x)**17 is automatically rewritten as sin(x)**17/x**17.

Aaron Meurer

On Mon, Jun 22, 2015 at 2:12 PM, Paul Royik <distan...@gmail.com> wrote:
> Can't rewrite sin(x)**17/x**17 as (sin(x)/x)**17.
> Is there any way to do that?
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/9c3ad9a2-82aa-454f-9d6e-27d279efbbb3%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Paul Royik

unread,
Jun 22, 2015, 4:01:48 PM6/22/15
to sy...@googlegroups.com
Thanks.

Francesco Bonazzi

unread,
Jun 23, 2015, 7:24:22 AM6/23/15
to sy...@googlegroups.com

In [1]: (sin(x)/x)**17
Out[1]:
   
17  
sin  
(x)
--------
   
17  
  x    

In [2]: Pow(sin(x)/x, 17, evaluate=False)
Out[2]:
       
17
/sin(x)\  
|------|  
\  x   /  


Set evaluation to False.
Reply all
Reply to author
Forward
0 new messages