Jump to content

How length of sine wave is calculated?


Luk4

Recommended Posts

Hi!

According to this site http://www.intmath.com/applications-integration/11-arc-length-curve.php the arc length of the curve y = f(x) from x=a to x=b is given by:


length_ab = Derivative_ab( Sqrt ( 1 + (dy/dx) ^ 2 ) dx)


So, we got a sine wave function which is


y = A * sin (F * x + P) from x=a to x=b


the length of this is


length_sine = Derivative_ab( Sqrt ( 1 + (A * F * cos (F * x)^2 dx)


Example of this is in first link or here:




Now, my question is what is the algorithm to compute length for specified x=a to x=b. For example, let's say:


step 1) set length = 0;

step 2) for x = a to x = b {

increase x by 0.01;

length = length + derivative(x);

}

step 3) return length;


I have implemented such a function, but it gives me the wrong length according to wolfram. Is it because of the increasing x or wrong derivative function?


Thanks in advance!

Regards!

Link to comment
Share on other sites

the arc length of the curve y = f(x) from x=a to x=b is given by:

 

length_ab = Derivative_ab( Sqrt ( 1 + (dy/dx) ^ 2 ) dx)

Well, the very first thing is that arclength is not equal to the derivative of (stuff), but is equal to the integral of (stuff).

Link to comment
Share on other sites

According to this site http://www.intmath.c...ength-curve.php the arc length of the curve y = f(x) from x=a to x=b is given by:
length_ab = Derivative_ab( Sqrt ( 1 + (dy/dx) ^ 2 ) dx)
Bignose is objecting to your incorrectly copied expression. Your link there has the correct formula in a box labeled "arc length of a curve" - and a couple of pictures and explanatory comments, motivating it.

The "surd manipulation" they talk about is a multiplication by (one) under the square root sign - the square root of the numerator (differential x squared) pops out to the right, the denominator goes under the two terms, and you have the integral form in good order (that's the kind of cheese engineers use a lot).
Edited by overtone
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.