Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6089 > unrolled thread
| Started by | Daniel Lichtblau <danl@wolfram.com> |
|---|---|
| First post | 2011-11-01 05:02 +0000 |
| Last post | 2011-11-01 05:02 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Assumptions - an issue. Does mathematica store it? Daniel Lichtblau <danl@wolfram.com> - 2011-11-01 05:02 +0000
| From | Daniel Lichtblau <danl@wolfram.com> |
|---|---|
| Date | 2011-11-01 05:02 +0000 |
| Subject | Re: Assumptions - an issue. Does mathematica store it? |
| Message-ID | <j8nuh4$ect$1@smc.vnet.net> |
On 10/31/2011 10:47 AM, Sumesh P.T. wrote:
> Thanks Daniel. Looks like it is related to some intermediate results
> only, because I see the same behavior. So is there a way to tell
> Mathematica to produce only the final result and not the intermediate
> ones?
>
> regards,
> sumesh
I do not understand the question. Let me try to clarify. Mathematica is
not producing intermediate results. It is producing differing final
results (that is, different Out[] results). The likely cause is the
caching state of intermediate computations (not results) affecting later
computations.
I am not aware of any way to prevent results from changing on
recomputation, or even to recognize in any general way that this might
happen.
Daniel lichtblau
Wolfram Research
> On Mon, Oct 31, 2011 at 9:12 PM, Daniel Lichtblau<danl@wolfram.com> wrote:
>> 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 top | Article view | comp.soft-sys.math.mathematica
csiph-web