Mathematica won't NIntegrate fairly simple equation, even tho Wolfram Alpha has no issue

StackOverflow https://stackoverflow.com/questions/21606554

  •  08-10-2022
  •  | 
  •  

Question

Here's my input: NIntegrate[sqrt[1 + (.00035 x^2)^2], {x, -625, 625}]

The result is:

NIntegrate::inumr: "The integrand sqrt[1+1.225*10^-7\ x^4] has evaluated to non-numerical values for all sampling points in the region with boundaries {{-625,0}}."

This links me to a page where I basically am told that I have to define x. Isn't that exactly what the range given as a second argument is doing? What am I not doing here?

I can put the exact same syntax into WolframAlpha and get the right answer:

Was it helpful?

Solution

Mathematica is fussier than Wolfram Alpha about its input syntax. Try

NIntegrate[Sqrt[1 + (.00035 x^2)^2], {x, -625, 625}]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top