Home > database >  Double integral in R with variable in the bound
Double integral in R with variable in the bound

Time:01-02

How can the below integral be calculated in R? :

enter image description here

The difficulty is that in the inner integral the upper bound contains one of the variables.

Anyone knows ?

The result must be : 0.0104166666666667

CodePudding user response:

You can get this from:

integrate(Vectorize(function(y) {
    integrate(function(x) {x*y}, 0, 1-2*y)$value }), 0,0.5)
0.01041667  with absolute error < 1.2e-16
  • Related