tmsimont
tmsimont

Reputation: 2711

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

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:

Upvotes: 0

Views: 410

Answers (1)

High Performance Mark
High Performance Mark

Reputation: 78364

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

NIntegrate[Sqrt[1 + (.00035 x^2)^2], {x, -625, 625}]

Upvotes: 3

Related Questions