Integration yields different results... Why?
- To: mathgroup at smc.vnet.net
- Subject: [mg35397] Integration yields different results... Why?
- From: Binesh Bannerjee <binesh-dated-1026891966.8faddf at hex21.com>
- Date: Thu, 11 Jul 2002 05:24:01 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi. I'm wondering if I haven't understood something here... Let me get the mathematica script that's giving me trouble out of the way. F[a_, b_, c_, d_, e_, X_] := (a + b X + c X^2)Exp[-(d + e X)^2] I0 = Simplify[ Integrate[F[a, b, c, d, e, X]*(Exp[X]*f - g), {X, h, Infinity}, Assumptions -> {Im[e] == 0}]]; F2[Params_] := Simplify[ Integrate[ F[a,b,c,Apply[d,Params],Apply[e,Params],X]*(Exp[X]*f-g), {X, h, Infinity}, Assumptions -> {Im[Apply[e, Params]] == 0, Im[e] == 0} ] /. { Apply[e, Params] -> e, Apply[d, Params] -> d } ] Arguments = {{z}, {y, z}, {x, y, z}, {w, x, y, z}} Map[F2[#] - I0 &, Arguments] I've cut and pasted that, and it works, so, you can try that. Basically, I have the original function, then I make the parameters to the function be functions whose parameters do _NOT_ include X _or_ a,b,c,d,e,f,g,h. and, then, I substitute out the functional parameters fromthe output via the /. operator. For some reason, it works fine up to a 3 parametered function. (You see the final output is { 0,0,0,If[h<0,(* Ridiculous expression *), Integrate[...]] } If I make it a 4 parametered function, then it gives me a _different_ answer, EVEN if I strip out the conditional in the If[(h<0)]... Why is this happening? Can I just assume that this is a bug in Mathematica? Would it be ok for me to just do this: FourParams = Integrate[F[a,b,c,d,e,X]*(Exp[X]*f-g),{X,h,Infinity}] /. { d->d[w,x,y,z], e->e[w,x,y,z] } Is that functionally identical? I'm using Mathematica 4.0.0.0. Unfortunately, I can't as of now afford to upgrade to 4.2.0.0 just now... Any help appreciated, Thanks, Binesh Bannerjee