Question: Write a function 'doubleIntegralF' that has four arguments: lower/upper limits for x and for y and returns the **value** object from the **integrate** function. Here,
Write a function 'doubleIntegralF' that has four arguments: lower/upper limits for x and for y and returns the **value** object from the **integrate** function. Here, we are just thinking about integrating over rectangular regions. To integrate over 'x', we define a function 'innerF' which take in argument y. Finish the 'doubleIntegralF' function by integrating innerF. doubleIntegralF = function(xLower,xUpper,yLower,yUpper){ innerF = function(y){sapply(y, function(z) { integrate(f_XY, xLower, xUpper,z)$value } ) } integrate the inner function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
