Bivariate Integrations/Assumptions error/
- To: mathgroup@smc.vnet.net
- Subject: [mg10603] Bivariate Integrations/Assumptions error/
- From: Mary Lesperance <mlespera@uvic.ca>
- Date: Mon, 26 Jan 1998 04:42:34 -0500
- Organization: University of Victoria
Mathematica has trouble with bivariate integrations. I tried the following: (The answer is 1 for any real Phi and Psi - this is just the product of 2 normal densities) f[x_,y_,\[Phi]_,\[Psi]_,n_]:=.5*Exp[-.5*((x-\[Phi])^2 + (y-(\[Phi]^2 + \[Psi]))^2)]/Pi Integrate[f[x,y,\[Phi],\[Psi],1],{x,-Infinity,Infinity},{y,-Infinity,Infinity},Assumptions -> {Im[\[Phi]]==0 && Im[\[Psi]]==0}] The answer that Mathematica returns starts with: (If[\(Re[\(-1.`\)\ \[Phi]\^2 - 1.`\ \[Psi]] > 0 && Re[1.`\ \[Phi]\^2 + 1.`\ \[Psi]] > 0 && Re[\[Phi]] < 0, \)\)\) i.e. a condition IF Re(Phi^2 + Psi)<0 AND Re(Phi^2 + Psi)>0, then resulting answer; Clearly, the assumptions state that this cannot be true. if the condition is false, Mathematica returns the unevaluated integral. --------------- Sometimes Mathematica returns the value def. integral ZERO - it depends on Mathematica's "state of mind"! And sometimes it just shuts down altogether: The Kernel Local has quit(exited) during the course of an evaluation. Why? ---------------- The following seems to perform better - I've told it not to generate conditions: Integrate[f[x,y,\[Phi],\[Psi],1],{x,-Infinity,Infinity},{y,-Infinity,Infinity},Assumptions -> {Im[\[Phi]]==0 && Im[\[Psi]]==0},GenerateConditions->False] The answer is 1, except Mathematica cannot simplify to that level. After Chop[%] and FullSimplify[%] it returns: Exp^0 . Phi^2 . (Phi^2 + Psi)^2 / (Phi^2 + Psi)^2 ---------------- I am running this on an HP workstation, and am truly disappointed. After spending big $$ on Mathematica, I expected better. performs this computation in very little time. I would appreciate hints as to "teaching" Mathematica to perform these types of integrations more smoothly. I would like to progress to more difficult expressions. Thanks. Mary Lesperance, University of Victoria