help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with double quadrature


From: Nicholas Jankowski
Subject: Re: help with double quadrature
Date: Mon, 11 Sep 2017 16:31:53 -0400

On Mon, Sep 11, 2017 at 4:04 PM, Juan Pablo Carbajal <address@hidden> wrote:
On Mon, Sep 11, 2017 at 8:17 PM, Clinton Winant
<address@hidden> wrote:
> I have to evaluate an integral over a triangular area:
> int_0^1 int_0^y [f(x,y)] dx,dy
>
> Initially I though I could use dblquad, but is seems the integration limits
> have to be numbers, not variables.  I have backed of to using quadgk to do
> the inner integral, then summing over all y.  Does anyone know a better way?

Have you consider using Monte Carlo integration?

Never saw that before.  That's interesting.  How much better is in than, say, a 3D equivalent of 'trapz'? (is there a name for that? patch summation over a 2D mesh of points?

In any case, yes, dblquad only works over a rectangular region.  Mathworks implemented variable limits into both quad2d and integral2, but Octave has not yet implemented compatible functions for those.

Octave documentation does provide a possible double integration solution using collocation, I don't know if this is as easy to adapt to a non-rectangular region as suggested by Juan Pablo.

https://www.gnu.org/software/octave/doc/v4.2.1/Functions-of-Multiple-Variables.html

reply via email to

[Prev in Thread] Current Thread [Next in Thread]