Mathematica Gaussian integral in Mathematica

Click For Summary
To evaluate the Gaussian integral in Mathematica, one must choose appropriate coordinates for the integration, typically Cartesian coordinates for simplicity. The triple integral is expressed as d^3x = dxdydz, requiring three nested Integrate functions in Mathematica. The code structure involves integrating f(x,y,z) multiplied by e^(t*g(x)) over the specified limits for x, y, and z. If spherical or cylindrical coordinates are needed, additional factors must be included in the integration process. The discussion highlights the importance of coordinate selection and the syntax required for proper evaluation in Mathematica.
MadMax
Messages
98
Reaction score
0
How can I evaluate something like

\int^{\infty}_{-\infty} d^3 \mathbf{x} f(\mathbf{x}) e^{t g(\mathbf{x})}

in Mathematica, where x is a vector in 3D?
 
Physics news on Phys.org
When you say:

<br /> \int^{\infty}_{-\infty}d^3x<br />

It means that you want to integrate over all space, so first you need to pick a set of coordinates (which will probably depend on the coordinates in which you have f(x) and g(x) expressed). If you use Cartesian (the simplest) then

<br /> d^3x = dxdydz<br />

and now how you have to do a triple integral (one integral for dx where you think of y and z as constants, one for dy where you think of x and z and constants, and similarly for dz). So the Mathematica code would look like:

Integrate[ Integrate[ Integrate[ f(x,y,z)*Exp[t*g(x)], {x,-Infinity, Infinity}], {y,-Infinity, Infinity}], {z,-Infinity, Infinity}]

Where you have to supply the forms for f(x,y,z) and g(x,y,z).

If, on the other hand, you need to do it in spherical or cylindrical coordinates, then you have to add in a few more factors, which I could explain if you need them. Perhaps you already know all the math and just needed the syntax, in which case I apologize for telling you all this that you already knew, but I figured too much would be better than too little :cool:

Peace,
Jason
 
Last edited:
humm, yeah thanks man. I was hoping there would be a way to do it without expanding x... ah well, cheers mate.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
Replies
8
Views
4K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K