NIntegrate fails to work...
- To: mathgroup at smc.vnet.net
- Subject: [mg122740] NIntegrate fails to work...
- From: GQ Wang <gqwang1984 at gmail.com>
- Date: Wed, 9 Nov 2011 06:24:22 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
Hi guys, I came across this problem in my calculation: I have G(x, y), which is a very complicated matrix function of x and y. The integrand of my problem, denoted by f(G(x, y)), is a function of the eigenvalues and eigenvectors of G(x, y), and so naturally is a function of x and y. G(x, y) is formally so complicated that it's impractical to be diagonalized symbolically on the level of variables x and y. When I indeed tried this symbolic calculation, I get the error message Eigenvectors::eivec0: Unable to find all eigenvectors. >> and get the zero vector as the result. So I thought numerical integration should be the way to go. The procedure in my mind goes like this: write down G(x, y) numerically for each (x0, y0) point which appeared in the numerical integration, diagonalize the numerical matrix, calculate the eigenvectors and eigenvalues, and then calculate f(G(x0, y0)). In this way, at least in principle, the numerical integration could be performed. The code goes like G[x_, y_]:=... f[x_,y_]:=... NIntegrate[f[x, y],{x, xmin, xmax}, {y, ymin, ymax}] But it did not work out. The reason probably is, I suspect (based on the same error message that I received), that mathematica evaluates the integrand at each (x0, y0) point using something like f(G(x, y))/{x->x0, y->y0}, which requires the explicit form of the integrand f(G(x, y)), which, as I have mentioned, mathematica fails to calculate symbolically. So, my question is, how should I proceed... It seemed such an innocent problem. Thanks a lot guys. Cheers, GQ