 |
|
List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] Problem using evalf(Int)
| [MUG] Problem using evalf(Int) |
|
Author: Maple User Group
Posted: Mon, 17 Feb 2003 22:16:33 -0500
|
>> From: Maple User Group "maple_gr"
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Sat, 15 Feb 2003 16:48:55 -0400
From: C W "sylvester7"
To: "maple-list"
Subject: Problem using evalf(Int(..)) to verify density function
Hi !
Using Maple V R4 I obtained the following value of the integral for
y=y0..infinity :
1-1/2*erf(1/2*y0^(1/2)*2^(1/2)/sigma-1/2/sigma*mu*2^(1/2))-1/2*erf(1/2*y0^(1/2)*2^(1/2)/sigma+1/2/sigma*mu*2^(1/2))
Chris
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: "Dr Francis J. Wright" "F.J.Wright"
To: "Jay.Porter"
Subject: Problem using evalf(Int(..)) to verify density function
Date: Sat, 15 Feb 2003 19:10:09 -0000
From: "Jay Porter" "Jay.Porter"
To: "maple-list"
Sent: Friday, January 31, 2003 6:14 PM
Subject: [MUG] Problem using evalf(Int(..)) to verify density function
> The following function represents a probability density for a random
> variable that can take values from zero to infinity (the RV is the
> square of a gaussian RV with parameters mu and sigma):
>
> pdf := y ->
> 1/4*(exp(-1/2*(y^(1/2)-mu)^2/sigma^2)+exp(-1/2*(-y^(1/2)-mu)^2/sigma^2))
> /sigma*2^(1/2)/(Pi*y)^(1/2)
>
> As a density, the integral of pdf over (0,infinity) should be 1 (when mu
> and sigma are assigned numerical values).
>
> Letting mu := 33, sigma := 1, and evaluating from 0 to infinity gives
> nonsense; .8113159769e-27
The problem appears to lie in the NAG routine that is used by default and
one solution (in Maple 8) is explicitly to avoid using it:
evalf(Int(pdf(y), y = 0..infinity, method = _NoNAG));
1.000000000
Francis
|
Previous by date: [MUG] scope of `setoptions' command, Erik Leunissen
Next by date: [MUG] maple printing question, Maple User Group
Previous thread: [MUG] Re: Bug in Eigenvectors?, David Linder
Next thread: [MUG] maple printing question, Clearthink
|
|
|