Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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?

share|improve this question
    
I assume that the polynomial you quote is the derivative of the polynomial $P(x)$ such that the curve you are trying to find the length of (part of) has equation $y=P(x)$. –  André Nicolas May 19 '11 at 22:37
    
@user6312 yes it is. My first attempt was integrating and deriving all at the same time but as it took forever, I started taking stuff out to see if I could find what was slowing things down. –  Kalle May 20 '11 at 10:48
add comment

2 Answers

up vote 9 down vote accepted

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}]
share|improve this answer
    
Ohh, I see. Thank you! Wow, that instantly equated. THANK YOU!! –  Kalle May 19 '11 at 20:45
add comment

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

share|improve this answer
4  
What fraction of a second was it... 13/4 ?? –  The Chaz 2.0 May 19 '11 at 20:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.