I have been interested in determining the length of curves defined by a function.

Here's a desmos graph. The table defines the function and shows the x,y
pairs for x from 1 to 2 in increments of .1.



https://www.desmos.com/calculator/qfdhvkklpc

Here is a link to a C program.

http://primepuzzle.com/not.just.tiny.c/curve_length.c

Here's the output of this program.

primepzl@november:~/public_html/not.just.tiny.c$ ./curve_length
Segment     Distance
------------------------
  1 ->   2       0.234026
  2 ->   3       0.223621
  3 ->   4       0.212455
  4 ->   5       0.200388
  5 ->   6       0.187242
  6 ->   7       0.172799
  7 ->   8       0.156815
  8 ->   9       0.139123
  9 ->  10       0.120136
 10 ->  11       0.103311
------------------------
Total Length = 1.749915

Here is a link to a Python program.

http://primepuzzle.com/not.just.tiny.c/curve_length.py

Here's the output of this program.

G:\>python curve_length.py

Arc Lengths
----------------------------
Upper branch = 1.7513166828
Lower branch = 1.9255883192

Table of Values
-----------------------------------------------------------------
    x      Upper y      Lower y    Upper dy/dx    Lower dy/dx
  1.0    2.618034    0.381966      2.170820      0.829180
  1.1    2.829619    0.470381      2.059503      0.940497
  1.2    3.029634    0.570366      1.939155      1.060845
  1.3    3.217083    0.682917      1.807794      1.192206
  1.4    3.390736    0.809264      1.662698      1.337302
  1.5    3.549038    0.950962      1.500000      1.500000
  1.6    3.689961    1.110039      1.313948      1.686052
  1.7    3.810754    1.289246      1.095480      1.904520
  1.8    3.907477    1.492523      0.829180      2.170820
  1.9    3.974055    1.725945      0.485815      2.514185
  2.0    4.000000    2.000000     -0.000000      3.000000



Here is a link to a PDF that explains how this works.

Curve Length Calculation