Gaussian integral in Mathematica

In summary, to evaluate the integral \int^{\infty}_{-\infty} d^3 \mathbf{x} f(\mathbf{x}) e^{t g(\mathbf{x})}in Mathematica for a vector x in 3D, you first need to choose a set of coordinates, such as Cartesian or spherical. Then, using the appropriate syntax, you can perform a triple integral over all space, with x as the variable and f(x) and g(x) as the given functions.
  • #1
MadMax
99
0
How can I evaluate something like

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

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

[tex]
\int^{\infty}_{-\infty}d^3x
[/tex]

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

[tex]
d^3x = dxdydz
[/tex]

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:
  • #3
humm, yeah thanks man. I was hoping there would be a way to do it without expanding x... ah well, cheers mate.
 

1. What is a Gaussian integral in Mathematica?

A Gaussian integral is a type of integral that involves a Gaussian function, also known as the normal distribution function. It is a commonly used function in statistics, probability, and physics, and can be evaluated using the built-in function "Integrate" in Mathematica.

2. How do I evaluate a Gaussian integral in Mathematica?

To evaluate a Gaussian integral in Mathematica, you can use the built-in function "Integrate". For example, to evaluate the integral of e^(-x^2) from -∞ to ∞, you can use the command "Integrate[Exp[-x^2], {x, -∞, ∞}]". This will give you the result of √π.

3. Can I solve a Gaussian integral with limits other than -∞ and ∞?

Yes, you can solve a Gaussian integral with any limits using the "Integrate" function in Mathematica. For example, to evaluate the integral of e^(-x^2) from 0 to 2, you can use the command "Integrate[Exp[-x^2], {x, 0, 2}]".

4. Can I plot a Gaussian integral in Mathematica?

Yes, you can plot a Gaussian integral using the built-in function "Plot". For example, to plot the integral of e^(-x^2) from -5 to 5, you can use the command "Plot[Exp[-x^2], {x, -5, 5}]". This will give you a bell-shaped curve, which is the graph of the Gaussian function.

5. Are there any special functions in Mathematica for working with Gaussian integrals?

Yes, there are several special functions in Mathematica that can be used for working with Gaussian integrals, such as Erf, Erfc, and NormalDistribution. These functions can be used to evaluate, plot, and manipulate Gaussian integrals in a variety of ways.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
13
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
3K
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Special and General Relativity
Replies
5
Views
363
  • Advanced Physics Homework Help
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
Back
Top