[R] Numerical Integration in 1D

2008-03-07 Thread Max
Dear UseRs, I'm curious about the derivative of n!. We know that Gamma(n+1)=n! So when on takes the derivative of Gamma(n+1) we get Int(ln(x)*exp(-x)*x^n,x=0..Inf). I've tried code like > integrand<-function(x) {log(x)*exp(x)*x^n} > integrate(integrand,lower=0,upper=Inf) It seems that R doesn

Re: [R] Numerical Integration in 1D

2008-03-07 Thread Prof Brian Ripley
On Fri, 7 Mar 2008, Max wrote: > Dear UseRs, > > I'm curious about the derivative of n!. > > We know that Gamma(n+1)=n! So when on takes the derivative of > Gamma(n+1) we get Int(ln(x)*exp(-x)*x^n,x=0..Inf). > > I've tried code like > >> integrand<-function(x) {log(x)*exp(x)*x^n} >> integrate(inte

Re: [R] Numerical Integration in 1D

2008-03-07 Thread Ravi Varadhan
Faculty/Varadhan.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Max Sent: Friday, March 07, 2008 1:41 PM To: [EMAIL PROTECTED] Subject: [R] Numerical Integration in 1D Dear UseRs, I'm curious about the derivative of n!. We know that Gamma(n+

Re: [R] Numerical Integration in 1D

2008-03-07 Thread Max
Prof Brian Ripley formulated on Friday : > On Fri, 7 Mar 2008, Max wrote: > >> Dear UseRs, >> >> I'm curious about the derivative of n!. >> >> We know that Gamma(n+1)=n! So when on takes the derivative of >> Gamma(n+1) we get Int(ln(x)*exp(-x)*x^n,x=0..Inf). >> >> I've tried code like >> >>> in

Re: [R] Numerical Integration in 1D

2008-03-07 Thread Ravi Varadhan
le/Faculty/Varadhan.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Max Sent: Friday, March 07, 2008 1:41 PM To: [EMAIL PROTECTED] Subject: [R] Numerical Integration in 1D Dear UseRs, I'm cu

Re: [R] Numerical Integration in 1D

2008-03-07 Thread Prof Brian Ripley
On Fri, 7 Mar 2008, Max wrote: > Prof Brian Ripley formulated on Friday : >> On Fri, 7 Mar 2008, Max wrote: >> >>> Dear UseRs, >>> >>> I'm curious about the derivative of n!. >>> >>> We know that Gamma(n+1)=n! So when on takes the derivative of >>> Gamma(n+1) we get Int(ln(x)*exp(-x)*x^n,x=0..Inf)