HP Forums

Full Version: integration in CAS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

In the following integral, why do I have to rewrite 1/sqrt(x) to sqrt(x)^-1 to get the result ?
Simplifying that unresolved integral two times raises another question:
Why does it give complex results (a decomposition of Si(1/√x) to its real and its imaginary part) even if CAS setting "Complex" was unchecked?
[attachment=1441]
Worse: if "Complex" is checked, it outputs an endless repetition of "Error: Invalid series expansion: non tractable function im at +infinity" (sometimes reboots).
Complex on the Prime means variables are complex variables. It is not recommended to check it unless you know exactly what you do, because it leads to fairly complex answers. There should be a warning about that when you run the integral.
I tried simplify on the answer in Xcas, I could interrupt it therefore I guess it's a Prime specific problem if it reboots, perhaps because there is not enough ram available.
I'll have a look about re/im(Si()) that are introduced when simplify is run over int(sin(sqrt(x)^-1)) (if complex_variables is set to the default 0 value).
The second integral (not evaluted here) crashes the Prime and the emulator.
Fixed in source (infinite recursion). By the way, please report CAS bugs by commandlines instead of screen capture, it's much more efficient, for example here
int(1/sin(x^-1))
As a consequence int(sin(sqrt(x)^-1)) will not be integrated automatically anymore, that's the price to pay to avoid an infinite recursion. You will have to do the change of variable explicitly:
assume(t>0); a:=subst(int(sin(sqrt(x)^-1)),x=1/t^2); b:=subst(a,t=1/sqrt(x))
(01-15-2015 08:58 AM)parisse Wrote: [ -> ][...] avoid an infinite recursion.
Maybe you could pass a counter when recursing and stop at a reasonable value of it. I do this when collecting hierachical database structures in our ERP where users are free to define sets that contain themselfs (obviously by mistake).
Reference URL's