Trying to find the length of a curve
gx = x^3 - 9 x;
in the interval 0<=x<=3
Wondering why Mathematica produces the following different results:
gx = x^3 - 9 x;
Plot[gx, {x, 0, 3}]
Integrate[Sqrt[1 + (D[gx, x])^2], {x, 0, 3}] // N
NIntegrate[Sqrt[1 + (D[gx, x])^2], {x, 0, 3}]
-0.0633531 + 0.150976 I
21.1806