Re: [R] Solving an integral in R gives the error “The integral is probably divergent”

2013-04-13 Thread peter dalgaard
On Apr 13, 2013, at 06:47 , Thomas Lumley wrote: > On Sat, Apr 13, 2013 at 6:31 AM, peter dalgaard wrote: > But is it supposed to be t^{-3/2} or t^{-0.5}?? The formula has the former > and the code the latter, and the integral is clearly divergent with the > former. > > > I didn't look at th

Re: [R] Solving an integral in R gives the error “The integral is probably divergent”

2013-04-12 Thread Thomas Lumley
On Sat, Apr 13, 2013 at 6:31 AM, peter dalgaard wrote: > But is it supposed to be t^{-3/2} or t^{-0.5}?? The formula has the former > and the code the latter, and the integral is clearly divergent with the > former. > I didn't look at that -- I just assumed that the code would reproduce the rep

Re: [R] Solving an integral in R gives the error "The integral is probably divergent"

2013-04-12 Thread Janesh Devkota
: Friday, April 12, 2013 1:32 PM To: Thomas Lumley Cc: Janesh Devkota; groep R-help Subject: Re: [R] Solving an integral in R gives the error "The integral is probably divergent" But is it supposed to be t^{-3/2} or t^{-0.5}?? The formula has the former and the code the latter, and the i

Re: [R] Solving an integral in R gives the error “The integral is probably divergent”

2013-04-12 Thread peter dalgaard
But is it supposed to be t^{-3/2} or t^{-0.5}?? The formula has the former and the code the latter, and the integral is clearly divergent with the former. -pd On Apr 12, 2013, at 04:51 , Thomas Lumley wrote: > I don't get an error message (after I correct the missing line break after > the com

Re: [R] Solving an integral in R gives the error “The integral is probably divergent”

2013-04-11 Thread Thomas Lumley
I don't get an error message (after I correct the missing line break after the comment > b<- sapply(a, Cfun, upper=1) > b [1] 1.583458e-54 7.768026e-50 2.317562e-45 4.206260e-41 4.645737e-37 3.123801e-33 1.279358e-29 3.193257e-26 4.860876e-23 [10] 4.516582e-20 2.564400e-17 8.908932e

[R] Solving an integral in R gives the error “The integral is probably divergent”

2013-04-08 Thread Janesh Devkota
I am trying to solve an integral in R. However, I am getting an error when I am trying to solve for that integral. The equation that I am trying to solve is as follows: $$ C_m = \frac{{abs{x}}e^{2x}}{\pi^{1/2}}\int_0^t t^{-3/2}e^{-x^2/t-t}dt $$ [image: enter image description here] The code tha