Numerical calculation about curve length

In summary, the conversation discusses different methods of calculating the area and length of a curve numerically. The preferred method is using circular arc segments or an integral formula evaluated with Simpson's rule. The trapezoidal rule is also mentioned as a simpler alternative.
  • #1
xyz3003
5
0
I think I have returned all my math back to teachers without any refund.

y=f(x);
h=xb-xa, which is very small.

My Q is to calculate curve length rather than area numerically.
But let me use area as example to show you what i want.

to calculate area between xa to xb, we have 2 ways:
1) area=(f(xa)+f(xb))*h/2; (trapezoid?)
2) area=(f(xa)+4*f(xm)+f(xb))*h/6; here xm=(xa+xb)/2; (parabola?)
As my test, second one is much better than first.

for curve length:
1) len=square root( (f(xb)-f(xa))*(f(xb)-f(xa)) + h*h);
actually, it is distance from (xa, f(xa)) to (xb, f(xb)).

do you know second way to calculate curve length as in area sample above, simple, easy-to-use and better?

any links or explanations are highly appreciated.

thanks.


.
.
 
Mathematics news on Phys.org
  • #2
Well, in regions where the curvature is slowly varying, you might interpolate with circular arc segments instead.

Just a suggestion..
 
  • #3
Start from an integral representing the length of the curve

[tex] \int_{x_1}^{x_2} \sqrt{1 + \left(\frac{dy}{dx}\right)^2}\,dx[/tex]

or [tex] \int_{t_1}^{t_2} \sqrt{\left(\frac{dx}{dt}\right)^2 + \left(\frac{dy}{dt}\right)^2\right)}\,dt[/tex] for a curve defined by parametric equations.

Evaluate the integrals with your favorite numerical formula.
 
  • #4
AlephZero said:
Evaluate the integrals with your favorite numerical formula.

I just want to know the "favorite numerical formula", if which is better than summing line distances from one point to another.
 
  • #5
xyz3003 said:
I just want to know the "favorite numerical formula", if which is better than summing line distances from one point to another.
As I said before, in most cases, Simpson's rule is most efficient.
 
  • #6
I like the trapezoidal rule because it does a good enough job for most things and is much less tedious than simpons.
 

Related to Numerical calculation about curve length

1. What is curve length and why is it important in numerical calculations?

Curve length refers to the total distance along a curve or path. In numerical calculations, it is important because it helps us understand the shape and size of a curve, which is essential in various applications such as computer graphics, engineering, and physics.

2. How is curve length calculated numerically?

Curve length can be calculated numerically using various methods, such as the trapezoidal rule, Simpson's rule, and Gaussian quadrature. These methods involve approximating the curve with straight lines or polynomial curves and then calculating the total length of these segments.

3. Can numerical calculations accurately determine the curve length?

Yes, numerical calculations can accurately determine the curve length, although the level of accuracy may depend on the chosen method and the complexity of the curve. As the number of segments used in the calculation increases, the accuracy also improves.

4. What are some real-life applications of numerical calculations about curve length?

Numerical calculations about curve length have various applications in different fields, such as calculating the length of a road or railway track for construction purposes, determining the length of a coastline for geographical studies, and measuring the length of DNA strands in genetics research.

5. Are there any limitations to numerical calculations about curve length?

While numerical calculations can accurately determine the curve length, they may face limitations when dealing with highly complex curves or those with irregular shapes. In such cases, the accuracy of the calculation may be reduced, and alternative methods may need to be used.

Similar threads

  • Programming and Computer Science
Replies
1
Views
666
  • Introductory Physics Homework Help
Replies
1
Views
2K
Replies
2
Views
364
  • Calculus and Beyond Homework Help
Replies
4
Views
718
  • Introductory Physics Homework Help
Replies
7
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
Replies
66
Views
4K
  • Programming and Computer Science
Replies
7
Views
3K
Replies
24
Views
2K
Replies
2
Views
1K
Back
Top