Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Numerical Multiple Integration

  1. Apr 2, 2016 #1
    I'm trying to solve numerically this multiple integral. But i don't know how to calculate it with Mathamtica or Sage software.

    $$c=||\vec{r}_{12}|| - (2R)^2$$

    Thank you!
  2. jcsd
  3. Apr 2, 2016 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    What you have presented is insufficient. The bounds of the integration are not apparently specified, nor are the variables identified in any way.

    Much more context is needed to understand what you want to do.
  4. Apr 2, 2016 #3
    I'm trying to calculate the second virial coefficient for a potential E that depends on positions and velocities. The N particles are moving inside LxL square.

    $$c=||\vec{r}_{12}|| - (2R)^2$$

    R, tau_0 and k are constants.
  5. Apr 2, 2016 #4


    User Avatar
    Gold Member

    I don't have much experience using Mathematica or Sage. But most numerical integration algorithms use iteration to solve such problems anyway, so as long as you know how to calculate a single integral with one of those programs you can use the same technique to calculate 4 nested ones. Just evaluate the integrals from the inside out, and feed the result of the first to the second, from the second to the third, and so on. If the constants give you trouble, just set them all to 1 to start with. (There might be a function supplied that is designed for doing an arbitrary number of integrations as well, so look for that.)

    Also, you said you want to numerically integrate these equations, but the information you've provided is only really sufficient for a symbolic integration. For example, how would the software evaluate b without numeric expressions for r12 and v12?
  6. Apr 2, 2016 #5
    I'm sorry, i forgot it.
    r12 is the relative position and v12 is the relative velocity
    $$ r_{12}=r_1-r_2$$
    it's the same for v12
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted