Menu

#96 abs(x)^k not simplified for real x and even k

None
closed
nobody
None
5
2019-03-07
2019-03-04
arpi
No

For even k and real valued x, abs(x)^k=x^k. This is not taken into account.
realvalued x;
abs(x)^4;
returns abs(x)^4 and not x^4. Maybe something like a let rule
for all x,k such that (realvaluedp(x) and numberp(k) and fixp(k) and evenp(k)) let abs(x)^k =x^k;
could be added somewhere.

Discussion

  • Rainer Schöpf

    Rainer Schöpf - 2019-03-04
    • status: open --> unread
    • Group: -->
     
  • Rainer Schöpf

    Rainer Schöpf - 2019-03-04

    Thanks for reporting this.

    Actually there is already a rule

    let {abs(~x)^2 => x^2 when symbolic not !*precise

    (Try showrules ^)

    Changing the rule to

    let {abs(~x)^2 => x^2 when symbolic not !*precise or realvaluedp x

    should do the trick.

    I need to check that this proposed change doesn't cause mayhem elsewhere, then I will commit it.

    Rainer
    
     
  • Rainer Schöpf

    Rainer Schöpf - 2019-03-04
    • status: unread --> accepted
     
  • Rainer Schöpf

    Rainer Schöpf - 2019-03-07
    • status: accepted --> closed
     
  • Rainer Schöpf

    Rainer Schöpf - 2019-03-07

    Correction committed to sources.

     

Log in to post a comment.