I have a function in R which I am trying to integrate, but for some (extreme) values of the function parameters, integrate
returns the incorrect solution. I bel
you could shift the integration variable to centre the peak,
wrapper <- function(x, func_mean_v, ...)
integrandFunc_F(x+func_mean_v, func_mean_v=func_mean_v, ...)
integrate(wrapper, rel.tol = 1e-8, lower=-Inf, upper=Inf, func_u= 8, func_u_lowerBar= 8,
func_u_upperBar= 8, func_mean_v= 50, func_sigma_v= .1, func_sigma_epsilon= 2,
func_sigma_y= 1, func_gamma= 1/1.1, func_rho= .05)
# 1 with absolute error < 1.3e-09