Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6098
| From | Daniel Lichtblau <danl@wolfram.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Assumptions - an issue. Does mathematica store it? |
| Date | 2011-11-01 05:09 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j8nuuh$ei4$1@smc.vnet.net> (permalink) |
| References | <201110311150.GAA28310@smc.vnet.net> |
On 10/31/2011 06:50 AM, Sumesh PT wrote:
> Hi,
> I have come across a peculiar situation in Mathematica where the same expression integrated twice with the same set of assumptions gives me two different answers (the answers are same on simplification). However I am wondering how can the software decided to do the integration in two different methods and does it have anything to do with the assumptions that once uses. An example code is given below. It might be a good idea to paste it in a note book so that you can know what I am talking about. Answers at1 and at2 in the code should be same ,but they look different. Can anybody explain it?
>
> Thanks,
> sumesh
> In[35]:= ClearAll[x]
>
> In[36]:= att = (25 (x^4) \[Rho] )/(4 (x^2 + \[Rho]^2)^(7/2)) - (
> 75 (x^2) (\[Rho]^3) )/(16 (x^2 + \[Rho]^2)^(7/2)) - (
> 75 (\[Rho]^5) )/(64 (x^2 + \[Rho]^2)^(7/2)) - (
> 15 (x^2) \[Rho] )/(4 (x^2 + \[Rho]^2)^(5/2)) + (
> 15 (\[Rho]^3) )/(8 (x^2 + \[Rho]^2)^(5/2)) - (
> 75 (x^4) (zp^3) \[Rho] )/(
> 8 (x^2 + \[Rho]^2)^(7/2) (zp^2 + \[Rho]^2)^(5/2)) + (
> 75 (x^4) zp (\[Rho]^3) )/(
> 16 (x^2 + \[Rho]^2)^(7/2) (zp^2 + \[Rho]^2)^(5/2)) + (
> 75 (x^3) (zp^2) (\[Rho]^3) )/(
> 4 (x^2 + \[Rho]^2)^(7/2) (zp^2 + \[Rho]^2)^(5/2)) + (
> 225 (x^2) (zp^3) (\[Rho]^3) )/(
> 16 (x^2 + \[Rho]^2)^(7/2) (zp^2 + \[Rho]^2)^(5/2)) + (
> 225 (xzp^2) (\[Rho]^5) )/(
> 32 (x^2 + \[Rho]^2)^(7/2) (zp^2 + \[Rho]^2)^(5/2));
>
> In[37]:= at1 =
> Integrate[att, {\[Rho], 0, \[Infinity]},
> Assumptions -> {x \[Element] Reals, x^2> 0, zp^2> 0}]
>
> Out[37]= (1/(24 x^4 zp^4 (x^2 -
> zp^2)^5))(-30 x^4 zp^4 (12 x^6 zp + 48 x^5 zp^2 + 80 x^3 zp^4 -
> 15 xzp^2 zp^4 - 3 x^4 (xzp^2 - 40 zp^3) -
> 30 x^2 zp^2 (xzp^2 - 2 zp^3)) +
> Abs[x]^3 (30 zp^4 (10 x^7 + 60 x^6 zp + 90 x^5 zp^2 + 30 x^3 zp^4 -
> 3 xzp^2 zp^4 - 2 x zp^6 - 15 x^4 (xzp^2 - 8 zp^3) -
> 6 x^2 (5 xzp^2 zp^2 - 2 zp^5)) Abs[
> zp] + (x^2 -
> zp^2)^5 (12 zp^4 Hypergeometric2F1[1, 2, -(3/2), x^2/
> zp^2] + (16 x^2 zp^2 - 21 zp^4) Hypergeometric2F1[2,
> 2, -(1/2), x^2/zp^2] +
> 32 x^4 Hypergeometric2F1[2, 3, 1/2, x^2/zp^2] -
> 168 x^2 zp^2 Hypergeometric2F1[2, 3, 1/2, x^2/zp^2] +
> 9 zp^4 Hypergeometric2F1[2, 3, 1/2, x^2/zp^2] +
> 504 x^4 Hypergeometric2F1[2, 4, 3/2, x^2/zp^2] -
> 108 x^2 zp^2 Hypergeometric2F1[2, 4, 3/2, x^2/zp^2] +
> 144 x^4 Hypergeometric2F1[2, 5, 5/2, x^2/zp^2])))
>
> In[38]:= at2 =
> Integrate[att, {\[Rho], 0, \[Infinity]},
> Assumptions -> {x \[Element] Reals&& x^2> 0&& zp^2> 0}]
>
> Out[38]= (1/(4 x^2 (x^2 - zp^2)^5))5 (-12 x^8 zp - 48 x^7 zp^2 -
> 80 x^5 zp^4 + 15 x^2 xzp^2 zp^4 + 3 x^6 (xzp^2 - 40 zp^3) +
> 30 x^4 zp^2 (xzp^2 - 2 zp^3) + (10 x^7 + 60 x^6 zp + 90 x^5 zp^2 +
> 30 x^3 zp^4 - 3 xzp^2 zp^4 - 2 x zp^6 -
> 15 x^4 (xzp^2 - 8 zp^3) + 6 x^2 zp^2 (-5 xzp^2 + 2 zp^3)) Abs[
> x] Abs[zp])
Probably partial caching of intermediate results. See
http://forums.wolfram.com/mathgroup/archive/2010/Jan/msg00253.html
I did not replicate the behavior you are seeing above, by the way. But
that too could depend on vagaries such as specific version or machine speed.
Daniel Lichtblau
Wolfram Research
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Assumptions - an issue. Does mathematica store it? Daniel Lichtblau <danl@wolfram.com> - 2011-11-01 05:09 +0000
csiph-web