[Math] Distance between two points on a function

functions

My question concerns simple functions e.g. exponential or trigonometrical curves. Suppose you are given two points, and are asked to find the distance between those two points which also lie on the curve, how would this be calculated?

In case the answer is obvious, pardon my naivete- I'm not a math major.
Thanks!

EDIT

I think an example would help- suppose the curve is y = 2^x, what is the distance between the points (2, 4) and (10, 1024)? This is not homework- the functions I'm working with are much more complicated.

Best Answer

So with the curve y=2^x and the arc between (2,4) and (10,1024)

Formula is: s = Int(a,b,sqrt(1+f'(x)^2)) when y is function of x (little more involved for more general curves like a circle or something)

f'(x) = ln(2)*2^x

s=Int(2,10,sqrt(1+ln(2)*2^x)) enter image description here

Answer is ~72.8. makes some intuitive sense. it must be longer than the straight line connecting the points, so that gives us a lower bound. sqrt(8^2 + 1020^2) = 31.8


The formula i gave above follows pretty closely from standard distance / pythagorean theorem

We need to sum up a bunch of infintesimal distances, should be a pretty familiar calculus concept. We are solving for s, the arc length

ds^2 = dx^2 + dy^2 <--divide thru by dx^2
(ds/dx)^2 = 1 + (dy/dx)^2 <-- take square root
ds/dx = sqrt(1 + (dy/dx)^2) <-- multiply by dx
ds = sqrt(1 + (dy/dx)^2)*dx <-- take integral. sub f'(x) for (dy/dx) since we have function
s = int(sqrt(1+f'(x)^2))*dx

this leaves us with indefinite integral. take definite integral between a and b to get specific result.

PS - sorry for lack of TeX skills