MATLAB: Double integration

integral

How to perform double integration of exp(-ax-by)*(x^m)*(y^n)/(cx+dy)where x & y lies between 0 and infinity, a,b,m,n,c,d are positive real numbers.
Thank you.

Best Answer

If you have the 2012a release, just use INTEGRAL2:
>> a = 2; b = 3; m = 2; n = 3; c = 2; d = 3;
>> f = @(x,y)exp(-a*x-b*y).*(x.^m).*(y.^n)./(c*x+d*y)
f =
@(x,y)exp(-a*x-b*y).*(x.^m).*(y.^n)./(c*x+d*y)
>> integral2(f,0,inf,0,inf)
ans =
0.0030864
Be sure to use .*, .^, and ./ to do elementwise operations instead of matrix ops.
If you don't have 2012a yet, you can use the solution I presented here: http://www.mathworks.com/matlabcentral/answers/14514-double-integral-infinite-limits