Average distance between a point and a curve segment

734 Views Asked by At

I'm trying to find a formula for the average distance between a point,$\ P$ and a curve segment,$\ C$

When I tried to use the formule for the mean of a function with a distance function $$\frac{1}{a+b}\int_{a}^{b}(\|f(t),P\|)dt$$ where I defined $\ C$ in terms of $\ f:{\rm I\!R} \to {\rm I\!R}^2, C= \{f(i)|a \leq i \leq b\}$

and $\ P = (0,0), a=0$ and $\ b=1$, the average distance between $\ P$ and $f(t) = (t,t^2)$ should be the same as the distance between $\ P$ and $f(t) = (t,\sqrt{t})$, as the 2 curve segments are just mirror images. This is not the case when I use my formula.

Does anyone why my formula is wrong and which formula is the correct one?

1

There are 1 best solutions below

0
On BEST ANSWER

The correct formula should be $$\frac{\int_a^b ||f(t),P||dl}{\int_a^b dl}$$

So for $$f(t)=(t,t^2)$$ you have $$\frac{\int_0^1 \sqrt{t^2+t^4}\sqrt{1+4t^2}dt}{\int_0^1\sqrt{1+4t^2}dt}$$

For $$f(t)=(t,\sqrt{t})$$ you have $$\frac{\int_0^1 \sqrt{t^2+t}\sqrt{1+\frac{1}{4t}}dt}{\int_0^1\sqrt{1+\frac{1}{4t}}dt}$$

Let $u=\sqrt{t}$, it equals $$\frac{\int_0^1 \sqrt{u^4+u^2}\sqrt{1+\frac{1}{4u^2}}2udu}{\int_0^1\sqrt{1+\frac{1}{4u^2}}2udu}=\frac{\int_0^1\sqrt{u^4+u^2}\sqrt{1+4u^2}du}{\int_0^1\sqrt{1+4u^2}du}$$

So the two integrals are clearly the same.