Hello,

I need to integrate this equation (((2^(1/a))*a*b*(hypergeo(-1/a,(-1+a)/a,2-(1/a),1/2)+((1/(1-p))^(1/a))*(-1+p)*hypergeo(-1/a,(-1+a)/a,2-(1/a),(1-p)/2)))/((-1+a)*m*p)).

So, I tried to integrate using trapezoidal rule in R using 'pracma' package . but I keep getting an error ''Error in trapz(x, y) :

Arguments 'x', 'y' must be vectors of the same length.'' I have no idea on how to solve this. Please help me.

Here, the 'a','b','m' are the constants (which I already computed earlier) and 'p' is the variable that I want to integrate with respect to. 'p' should be any number between 0 to 1. For this integral, the lower bound is 0, and the upper bound is 1.

```
n<-1000
x<-seq(0,1,len=n)
fn<-function(a,b,p,m){
equ<-(((2^(1/a))*a*b*(hypergeo(-1/a,(-1+a)/a,2-(1/a),1/2)+((1/(1-p))^(1/a))*(-1+p)*hypergeo(-1/a,(-1+a)/a,2-(1/a),(1-p)/2)))/((-1+a)*m*p))
return(equ)
}
y<-fn(a=2.686628, b=36695.74,p=0.4,m=69556.6)
trapz(x,y)
```