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

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

  •  08-10-2022
  •  | 
  •  

문제

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:

도움이 되었습니까?

해결책

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

NIntegrate[Sqrt[1 + (.00035 x^2)^2], {x, -625, 625}]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top