Dear all,
I am trying to make a numerical integral of a Hypergeometrical function 2F1
but it is not working. I dont know how to pass the arguments to my
function. Thank you beforehand.
Chuse.
Here is my code:
H <- 0.7;
t <- 1;
s <- seq(0,t,0.1);
x <- 1-t/s;
library(gsl)
Gauss2F1 <- function(H,x){
a <- H-1/2;
b <- 1/2-H;
c <- H+1/2;
# if(x>=0 & x<1){
# hyperg_2F1(a,b,c,x)
# }else{
hyperg_2F1(c-a,b,c,1-1/(1-x))/(1-x)^b
# }
}
F <- Gauss2F1(a,b,c,x)
integrate(F,lower=-1,upper=1,H=0.7)
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.