1
$\begingroup$

I was trying to calculate the definite integral

$$ \int_0^.0076\int_0^.0425\int_0^.1275\frac{1}{x^2+y^2+z^2}\,dz\,dy\,dx $$

I entered this:

Integrate[1/(x^2 + y^2 + z^2) {z, 0, .1275}, {y, 0, .0425}, {x, 0, .0076}]

But Mathematica returned the following:

$$ \int_0^{0.1275}\int_0^{0.0425}\frac{\tan^{-1}\left(\frac{0.0076}{\sqrt{y^2+z^2}}\right)}{\sqrt{y^2+z^2}}\,dy\,dz $$

I even tried finding a definite integral in order to make sure that there was no problem with the bounds of integration and still no luck. Any ideas on what I can do to solve the integral or at least estimate the solution?

$\endgroup$

closed as off-topic by AccidentalFourierTransform, Taiki, m_goldberg, Henrik Schumacher, Daniel Lichtblau Sep 14 '18 at 15:09

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – AccidentalFourierTransform, Taiki, m_goldberg, Henrik Schumacher, Daniel Lichtblau
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    $\begingroup$ You need a comma between your integrand and the variables. Also, just try NIntegrate. The answer is: $0.0382918$. $\endgroup$ – David G. Stork Sep 14 '18 at 0:19
2
$\begingroup$

As @David G. Stork pointed out, a comma is absent. Besides, it seems that you are not interested in a precise result, so you can use NIntegrate, which is more suitable for numerical integral evaluation than Integrate. The Method is added to avoid some warnings, e.g., slowly converging.

NIntegrate[1/(x^2 + y^2 + z^2), {z, 0, .1275}, {y, 0, .0425}, {x, 0, .0076}, Method -> "LocalAdaptive"]

0.0382918

$\endgroup$
  • $\begingroup$ Well, the ArcTan showing up means that Mathematica performed at least the integration over x, so OP must have made an error while copying the originally syntactically correct code from Mathematica. Still, (+1) for showing NIntegrate with Method -> "LocalAdaptive". $\endgroup$ – Henrik Schumacher Sep 14 '18 at 6:13
  • $\begingroup$ @HenrikSchumacher Yes, I think so. Also Integrate[......]//N can obtain the desired result but with a slower speed. $\endgroup$ – Αλέξανδρος Ζεγγ Sep 14 '18 at 8:27
  • 1
    $\begingroup$ If you want to get results faster (especially with higher precision goals) you can use Method -> {"GlobalAdaptive", "SingularityHandler" -> "DuffyCoordinates"} . $\endgroup$ – Anton Antonov Sep 14 '18 at 13:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.