Post Reply 
Incorrectly calculated integral.
05-22-2023, 07:26 PM (This post was last modified: 05-22-2023 07:39 PM by parisse.)
Post: #5
RE: Incorrectly calculated integral.
@Chan: you're right in the sense it is not a (pure) sqrt branch choice issue, but it *is* really an algebraic branch choice issue. The CAS always tries to simplify sqrt (this is necessary for some operations, like symbolic integration), using algebraic equations (here it involves a polynomial of degree 4, cfsolve((4x^2+2)^2-3)), which means sqrt(z) may mean any of the 2 solutions x^2=z if z is negative or complex, there is code to choose the right solution only for the largest root.

@hp-zl: adding new special functions would require a large coding effort, because that would not be restricted to output these functions for a few selected integral inputs, it would also mean add support for numeric evaluation (in the complex plane or a part of), series expansions and limits (including at infinities), integration by part/change of variables. It's not on my roadmap (but of course I'm not against any contribution to Giac codebase). Therefore on the Prime, keep in mind to always enter one approx data in your integral if you want a numeric answer, in order to call the numeric algorithm (which is I believe robust).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Incorrectly calculated integral. - hp-zl - 05-20-2023, 06:00 PM
RE: Incorrectly calculated integral. - parisse - 05-22-2023 07:26 PM



User(s) browsing this thread: 2 Guest(s)