Jump to content
  • Advertisement
Sign in to follow this  
staticVoid2

calculate the length of a curve

This topic is 3402 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi there, I'm trying to calculate the length of a curve with a given equation between two points along the x axis (a and b). I know the standard integral for this is: sqrt(1 + (dy/dx)^2) dx, in range [a - b]. but my question is - if you have to differentiate the equation of the curve to get dy/dx, then when I find the anti-derivative of the above equation would it not just be equal to: 2/3(x + 1/3(A)^3)^3/2 where A equals the equation of the curve?

Share this post


Link to post
Share on other sites
Advertisement
Well, that's obviously wrong, as the value of a function at one particular point doesn't say anything about the values it had before, so it also doesn't say anything about the length of the parts before it.

Could you show how you got to that equation?

Share this post


Link to post
Share on other sites
I think that what you're doing wrong is that you assume that

when

a(x) = integral a'(x)

and

b(x) = integral b'(x)

that

integral a'(b'(x)) == a(b(x))

which is wrong.

If you would do it the other way around, ie. calc the derivative of a(b(x)), you could use the chain rule, but unfortunately we don't have such a simple formula for anti derivatives.

Share this post


Link to post
Share on other sites
so when I calculate the derivative (dy/dx) what do I do next?

from what I've read when you have the integral:

sqrt(1 + (dy/dx)^2)

you have to find the anti-derivate of this F(x)

for the two limits a and b and then subtract them:

area = F(b) - F(a)

I know this gives the area, but could someone explain how I use the above equation to get the length.

Quote:

Could you show how you got to that equation?


I though the anti-derivative of dy/dx was y so I plugged this into equation one and then integrated.

Share this post


Link to post
Share on other sites
Quote:
Original post by staticVoid2
so when I calculate the derivative (dy/dx) what do I do next?

from what I've read when you have the integral:

sqrt(1 + (dy/dx)^2)

you have to find the anti-derivate of this F(x)

for the two limits a and b and then subtract them:

area = F(b) - F(a)

I know this gives the area, but could someone explain how I use the above equation to get the length.


this is correct.

Quote:

I though the anti-derivative of dy/dx was y so I plugged this into equation one and then integrated.


The anti derivative of dy/dx is indeed y, but the way you are plugging things into your integral is wrong.

Maybe you could give the actual definition of your curve function, so we can solve it explicitely for that one? Then it should also become obvious why your current way doesn't work.

Thing is that there's not gonna be a general solution, that will work for any function, with the curve function and it's derivatives at fixed places. The way you solve it will really depend on the definition of your curve function.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!