Re: [R] LSODA not accurate when RK4 is; what's going on?

2008-04-10 Thread Ravi Varadhan
ph.edu/agingandhealth/People/Faculty/Varadhan.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Tillinghast Sent: Wednesday, April 09, 2008 7:18 PM To: r-help@r-project.org Subject: [R] LSODA not accurate when RK4 is; what's going on? I&

Re: [R] LSODA not accurate when RK4 is; what's going on?

2008-04-10 Thread Ravi Varadhan
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Tillinghast Sent: Wednesday, April 09, 2008 7:18 PM To: r-help@r-project.org Subject: [R] LSODA not accurate when RK4 is; what's going on? I'm solving the differential equation dy/

Re: [R] LSODA not accurate when RK4 is; what's going on?

2008-04-10 Thread Ravi Varadhan
hn Tillinghast Sent: Wednesday, April 09, 2008 7:18 PM To: r-help@r-project.org Subject: [R] LSODA not accurate when RK4 is; what's going on? I'm solving the differential equation dy/dx = xy-1 with y(0) = sqrt(pi/2). This can be used in computing the tail of the normal distribution. (The actual

[R] LSODA not accurate when RK4 is; what's going on?

2008-04-09 Thread John Tillinghast
I'm solving the differential equation dy/dx = xy-1 with y(0) = sqrt(pi/2). This can be used in computing the tail of the normal distribution. (The actual solution is y(x) = exp(x^2/2) * Integral_x_inf {exp(-t^2/2) dt} = Integral_0_inf {exp (-xt - t^2/2) dt}. For large x, y ~ 1/x, starting around x~