Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Numerical integration over an arbitrary 2D domain' topicStudent Support Forum > General > "Numerical integration over an arbitrary 2D domain"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Michael
07/05/12 03:01am

Hi,

I've been trying to think how best to answer. Certainly it can be done. It's not clear what you know about your functions. Do you know them only at the points of the triangulation? Or do you know the formulas (e.g. for the density)?

If you want to do an approximate integral based on the triangular mesh, you can sum up for each triangle {P, Q, R}, the vertices in counterclockwise order,

1/6 (f[Px, Py] + f[Qx, Qy] + f[Rx, Ry]) (Px Qy + Qx Ry +
Rx Py - (Py Qx + Qy Rx + Ry Px))

where f is the function. If you can get a list of the triangles, you can use the function Sum to do this.

Another way is to parametrize the region and use a double integral.

Yet another way is that you might get lucky and be able to use Green's Theorem and use a line integral.

The notebook in the URL shows one way to compute the centroid of a polygon( CountryData's polygon for Italy, which seemed like a complex domain, unless you meant a domain in the complex numbers).

Anyway, I hope it might help you get started.


URL: https://www.dropbox.com/sh/d4htdmemfd4j0xr/r6ZWPFixeM/LineIntegral-Polygon.nb,

Subject (listing for 'Numerical integration over an arbitrary 2D domain')
Author Date Posted
Numerical integration over an arbitrary 2D domain Alfonso 06/30/12 12:26pm
Re: Numerical integration over an arbitrary 2D ... Michael 07/05/12 03:01am
Re: Re: Numerical integration over an arbitrary... Alfonso 07/06/12 02:14am
Re: Re: Re: Numerical integration over an arbit... Michael 07/07/12 12:25pm
Re: Re: Re: Re: Numerical integration over an a... Alfonso 07/08/12 03:49am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic