integrate1=function(f,y.lower,y.upper){
f2=function(y) integrate(f,lower=-Inf,upper=Inf,y=y)[[1]]
f3=function(y) sapply(y, f2)
integrate(f3,y.lower,y.upper)
}
f=function(x,y)x^2+y^2
integrate1(f,-Inf,Inf)
题意是对x^2+y^2这个函数进行重积分对x从负无穷积到正无穷,再对y从负无穷积到正无穷,但是在x=y点处不进行积分,那我的积分上下限应该怎么定义啊?谢谢了