From: "antonio di cesare >" on
Hi all,

is there any way to calculate a double integral on an infinite
rectangle?

As an example, I would like to calculate something like

integrand = @(x,y)exp(-x.*y);
quad2d(integrand,0,Inf,1,2)

whose solution is log(2), but quad2d only accepts finite arguments and
I have to use an approximation like

integrand = @(x,y)exp(-x.*y);
quad2d(integrand,0,1000,1,2)

I also tried to use quadgk

f=@(y)(quadgk(@(x)exp(-y.*x),0,Inf));
quadgk(@(y)f(y),1,2)

but it doesn't work.

Any suggestion? Thanks in advance.

From: John D'Errico on
"antonio di cesare >" <dicesare(a)vodafone.it> wrote in message <bebbf694-8c5d-49a6-8964-075112ab9ee9(a)m26g2000yqb.googlegroups.com>...
> Hi all,
>
> is there any way to calculate a double integral on an infinite
> rectangle?
>
> As an example, I would like to calculate something like
>
> integrand = @(x,y)exp(-x.*y);
> quad2d(integrand,0,Inf,1,2)
>
> whose solution is log(2), but quad2d only accepts finite arguments and
> I have to use an approximation like
>
> integrand = @(x,y)exp(-x.*y);
> quad2d(integrand,0,1000,1,2)
>
> I also tried to use quadgk
>
> f=@(y)(quadgk(@(x)exp(-y.*x),0,Inf));
> quadgk(@(y)f(y),1,2)
>
> but it doesn't work.
>
> Any suggestion? Thanks in advance.

Calc 1(or 2) solution: transform the domain to
one with a finite support.

John