help-octave
[Top][All Lists]
Advanced

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

Re: help with double quadrature


From: Carlo De Falco
Subject: Re: help with double quadrature
Date: Tue, 12 Sep 2017 12:31:53 +0000

> On 11 Sep 2017, at 20:17, 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?

Hi, 

The simplest approach is to use a (singular) affine trasformation that maps 
your triangle
into a square and a quadrature rule that does not place a quadrature node in 
the point of 
singularity, e.g. the method descibed in the section "Tensor product-type 
Gaussian quadrature 
- Simple but less efficient" in the document at this link:

  http://math2.uncc.edu/~shaodeng/TEACHING/math5172/Lectures/Lect_15.PDF

To implement this in Octave you can simply apply dblquad to the transformed 
integral that
you can see in the last formula on page 5 of the above reference.

But I think you should switch the backend of dblquad to something that does not 
place
quadrature nodes on the boundary of the domain, e.g. quadgk, rather than quadcc.

HTH,
c.








reply via email to

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