[Date Index]
[Thread Index]
[Author Index]
Re: Re: More weird integration issues...
*To*: mathgroup at smc.vnet.net
*Subject*: [mg35765] Re: [mg35748] Re: [mg35728] More weird integration issues...
*From*: Andrzej Kozlowski <andrzej at tuins.ac.jp>
*Date*: Tue, 30 Jul 2002 07:22:15 -0400 (EDT)
*Sender*: owner-wri-mathgroup at wolfram.com
It seems that you have not evaluated Binesh's defintion of F. You should
be getting a numerical answer, not a formula involving F, Integrate etc.
Andrzej
On Monday, July 29, 2002, at 07:57 PM, DrBob wrote:
> I get the same answer both ways, to as many places as you see here:
>
> 1.8430622009642987*Integrate[
> (-0.9025328739879791 + X)^5*
> F[Subscript[p, 0],
> 0.2856264419666387,
> 0.04012528894153399,
> 0.2662836604257217,
> 0.7959934248376723,
> 0.15354837805257518, X],
> {X, -Infinity, Infinity}]
>
> I'm using Version 4.2.
>
> Bobby
>
> -----Original Message-----
> From: Andrzej Kozlowski [mailto:andrzej at tuins.ac.jp]
To: mathgroup at smc.vnet.net
> Sent: Monday, July 29, 2002 2:13 AM
> Subject: [mg35765] [mg35748] Re: [mg35728] More weird integration issues...
>
> There does sem to be a bug here, but it is not quite what you think.
> It's the first answer that you get that is probably wrong. On the other
> hand, in the second case it is very unlikely that Mathematica enters an
> infinite loop, rather it is still trying to arrive at the answer and
> there is no guarantee that it will reach one after, say a week or a
> month.
>
> As for first case, the reason why the answer is probably this. Evaluate
> the formula:
>
>
> formula=Integrate[F[Subscript[p, 0], Subscript[p, 1], Subscript[p, 2],
> Subscript[p, 3], Subscript[p, 4], Subscript[p, 5], X]*((X -
> m)/sd)^5,
> {X, -Infinity, Infinity}]
>
> Now set
>
>
> Evaluate[Table[Subscript[p, i], {i, 1, 5}]] = Table[Random[], {5}]
>
> and also
>
> sd = Random[]; m = Random[];
>
> Now evaluate again
>
>
> Integrate[F[Subscript[p, 0], Subscript[p, 1], Subscript[p, 2],
> Subscript[p, 3], Subscript[p, 4], Subscript[p, 5], X]*((X -
> m)/sd)^5,
> {X, -Infinity, Infinity}]
>
> and
>
> formula
>
> You will almost certainly get different answers, while they clearly
> ought to be the same. It seems that it is nto the fact that the names
> you are suing are different that leads to different results in both of
> your integrals but the fact that the names of the parameters in the
> first case are not symbols. "Officially" there is no reason why they
> should be, but in practice using non-symbols in formulas makes them more
>
> complicated and is more likely to result in errors.
>
> The really bad news as far as your problem is concerned is that it is
> the 6 hour fruitless computation that appears to be the correct one ...
>
Andrzej Kozlowski
Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/
>
> On Saturday, July 27, 2002, at 07:43 PM, Binesh Bannerjee wrote:
>
>> Hi. I'm trying to compute the 5th moment of a tweak to the normal pdf.
>> Here's what I have:
>>
>> F[a_, b_, c_, d_, e_, f_, X_] := (a + b X + c X^2 + d X^3 + e X^4 + f
>> X^5)*
>> Exp[-(((X - m)/sd)^2)/2]/(Sqrt[2Pi]sd)
>>
>> The strange thing, and I'd appreciate someone shedding some light on
>> this,
>> is that this:
>>
>> \!\(Integrate[
>> F[p\_0, p\_1, p\_2, p\_3, p\_4, p\_5,
>> X]*\((\((X - m)\)/sd)\)^5, {X, \(-Infinity\), Infinity},
>> Assumptions -> {sd > 0}]\)
>>
>> (I cut and pasted that it looks like it works)
>>
>> Anyway, THAT gives me an answer really quickly... (within 5 minutes on
>
>> my box)
>>
>> JUST changing it from p0..5 to a,b,c,d,e,f like so:
>>
>> Integrate[F[a, b, c, d, e, f, X]*((X - m)/sd)^5, {X, -Infinity,
>> Infinity},
>> Assumptions -> {sd > 0}]
>>
>> Causes mathematica to go into an infinite loop (seemingly after 6
>> hours).
>>
>> This ... sucks. How am I to know if a certain equation is solvable, if
>> only I choose the right variables??
>>
>> Binesh Bannerjee
>>
>> --
>> "For in much wisdom is much grief, and he that increaseth knowledge
>> increaseth sorrow." -- Ecclesiastes 1:18
>>
>> PGP Key: http://www.hex21.com/~binesh/binesh-public.asc
>> SSH2 Key: http://www.hex21.com/~binesh/binesh-ssh2.pub
>> SSH1 Key: http://www.hex21.com/~binesh/binesh-ssh1.pub
>> OpenSSH Key: http://www.hex21.com/~binesh/binesh-openssh.pub
>>
>>
>>
>
>
>
>
>
Prev by Date:
**Re: Re: More weird integration issues...**
Next by Date:
**Re: Re: Work with Contexts**
Previous by thread:
**Re: Re: More weird integration issues...**
Next by thread:
**Re: More weird integration issues...**
| |