Integration within a wave with explicit indexing.

So from a mathematical/physical point of view what I'm trying to do is convert a potential diagonal in position space to momentum-space. V(x) is a wave I have. The space I've defined is in units of micrometers and Hz. I essentially need a 2d wave that is functionally a 3d wave integrated along one dimensio (the x dimension). This is not tenable when I've got a 100 micron wide area and a 100 nm resolution defining the size of my eigensystem (and is barely tenable with just a 2d wave). So I tried integrating inside the 2d wave. Igor freaks out. Igor will do all sorts of mathematical operations inside a wave like this with explicit indexing, but integration doesn't seem to be on the list. Does anyone have a tenable idea in how I can make this work?

V[][] = 365*(p == q)*((p-kzero)*kstep)^2 + (p != q)*(Integrate1D(exp(-sqrt(-1)*(p-kzero)*x)*exp(-sqrt(-1)*(q-kzero)*x)*potential(x), 0, scale*psize))


Thank you,
Matt
I'm aware at this point I was using integrate1D entirely incorrectly, but my problem still stands. How do I generate a multidimensional wave that is in part the sum of an integral? So M[][] = y(p,q) + Int f(p,q,x)dx. I get the feeling this is a solved problem because it's so easy in other scripting languages.
It may be easy but the devil is in the details. This is an interesting application -- we will help you with implementation details via technical support (support@wavemetrics.com).

A.G.
WaveMetrics, Inc.
johnweeks wrote:
For other users that have seen this thread, could you provide a brief summary of what you worked out?


There was one (very tiny) NaN in an input wave.