Menu

#3862 radcan possible bug with trig functions

None
open
nobody
5
2021-12-09
2021-09-24
John Oliver
No

I only use maxima a couple of times per year, so I may have a pilot error. However, it seems that "radcan" may have a bug. I am using it to compare the differentiated result of an integral against the expression that is integrated.

After using "ratsimp" on the differentiated integral result - which when evaluated for a specific set of parameters shows equality with the expression to be integrated - "radcan" is invoked and equality is lost.

Thank you for any help - hope I have submitted this in the proper manner.

1 Attachments

Discussion

  • Richard Gobeli

    Richard Gobeli - 2021-12-09

    I have seen a similar result in other cases using ctensor and sqrt factors of differences.
    When radcan switches a sign of a factor in the sqrt to cancel with another factor, it should multiply the sqrt by i so that this sign change is remembered. If an even number of sign changes of divison were made the i s would cancel. but if an even number of sign changes of products made a square the result should be the product of two i , which will be minus and not a plus. If it chooses plus instead of minus the result has changed.

     
  • Stavros Macrakis

    This is correct behavior by radcan. The bug is that it is not documented in the manual.
    See the original paper or this discussion thread.

    Basically, the problem is that sqrt is a multivalued function.

    A simpler example where radcan(ex) doesn't match ex numerically:

    ex: sqrt(x^2-1)/sqrt(1-x)$
    exr: radcan(ex)$
    [ex,exr],x=0 => [%i,-%i]
    
     
  • Stavros Macrakis

    • labels: radcan, trigonometry --> radcan, documentation
     

Log in to post a comment.