4
$\begingroup$

I'm trying to calculate the length of a curve from a polynomial in Mathematica and for some reason Integrate doesn't complete, it just runs until I abort the execution.

The polynom:

58.1735 - 36.4175 x + 7.10945 x^2 - 0.538311 x^3 + 0.0138115 x^4 

Is a part of an integration like this:

integral

where "koordfitprim" is the polynom above (i.e. what is integrated is in fact the square root of 1 + the above polynom^2).

Any ideas why this wouldn't execute?

  • 0
    @user6312 yes $i$t is. My first $a$ttempt was integrating and deriving all at the same time $b$ut as it took forever, I started taking stuff out to see if I could find what was slowing things down.2011-05-20

2 Answers 2

9

You should try to use NIntegrate (instead of Integrate). Integrate is for symbolic integration. NIntegrate for numerical integration. So try

NIntegrate[Sqrt[1+koordfitprim^2],{x,3,18}] 
  • 0
    Ohh, I see. Thank you! Wow, that instantly equated. THANK YOU!!2011-05-19
6

This is a very tough integral and you asked Mathematica to evaluate it symbolically i.e. analytically. I am not sure whether it can be calculated at all.

What you wanted was a numerical integral

NIntegrate[Sqrt[1 + ko[x]^2], {x, 3, 18}]

The result is, after a fraction of a second,

59.211531

  • 4
    What fraction of a second was it... 13/4 ??2011-05-19