[Date Index] [Thread Index] [Author Index]
Re: be aware!
Hi Zvi, The problem is occuring because of when you are substituting the values of the parameters mu and sg. In the first set of integrals you are substituting after the integration has been done, which forces a symbolic integration to give the result in terms of the parameters mu and sg which only then are substituted to give the final result. It might seem that this would not matter, but if you look at this symbolic integration result you will see that it involves the square root of squares of mu and sg which then raises the problematic issue of what branch of Sqrt you are on, since Mathematica in its generality does not assume variables are real and positive. If you force the issue by using PowerExpand then you will get the correct answer....otherwise it may not as you see from your results. This has been a frequent issue in this news group and many people who are not aware of their implicit assumption that their variables are real and/or positive get unexpected results. So indeed, one has to BE AWARE. regards, R. Finley