Message Boards Message Boards

0
|
4762 Views
|
5 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Why the difference? (Length of curve)

Posted 10 years ago

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
POSTED BY: Todor Latev
5 Replies
Posted 10 years ago

As a habit anytime I start getting unexpected results I completely shutdown Mathematica and start a fresh session

Quite often the culprit turns out to be some leftover variables from previous computations

This is not the case here though. As for the bug report - I kinda know what the response is going to be - "Update to the latest version"

Thanks for you input once again

POSTED BY: Todor Latev

Have you tried running the 4 lines on a fresh new kernel? If that still gives you the complex result, you should consider sending a bug report.

POSTED BY: Sander Huisman
Posted 10 years ago

Thanks for the reply

$Version
"10.0 for Linux x86 (64-bit) (June 29, 2014)"

I also tried it on a x64 ver 9 Mathematica under Win 7 x64 with the same results

/don't remember the exact ver and have no access to that machine at the moment/

POSTED BY: Todor Latev
POSTED BY: Sander Huisman
POSTED BY: Marco Thiel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract