Finding Arc Lengths in a 3D cartesian coordinate system from any 2 arbitrary points

237 Views Asked by At

So I'm familiar with the parametric form of the arc length integral that follows a given path at any point $t$, but what do you do when you have a 3D equation that does not follow any specific path $t$. For example say I have the equation:

$$f(x,y)=\exp[-(x^2+y^2)]+\exp[-((x-2)^2+(y-2)^2)]$$

and I want to find the path length of the curve from one maxima to the other? I've read that I need to use a "some numeric integration method" but I cannot find any more information than that online. The method used needs to be as accurate as possible, I have found the technique of using the Pythagorean theorem with approximation points on the path to be somewhat helpful, however it is lacking precision I'd prefer to use calculus. Thank you!

Edit: Sorry, I should have clarified. Although you can simplify the above problem it was just an arbitrary example. I hope for a solution that can be utilized with any number of gaussian functions for example:

$$f(x,y)=\exp[-(x^2+y^2)]+\exp[-((x-1)^2+(y-1)^2)]+\exp[-((x-3)^2+(y-5)^2)] $$ Thanks!

1

There are 1 best solutions below

4
On

First let's adjust the location of the maxima like so:

$$f(x,y) = \exp[-(x+1)^2-(y+1)^2] + \exp[-(x-1)^2-(y-1)^2]$$

as this does not change the path length. We can turn this into a $1$D problem by denoting

$$g(x) \equiv f(x,x) = \exp[-2(x+1)^2]+\exp[-2(x-1)^2]$$

where we now only have to find the path length of $g(x)$ on $[-1,1]$ (which is on the shortest path which connects the two maxima, $y=x$). The integral becomes

$$L = \int_{-1}^1 \sqrt{1+ 16\left((x+1)\exp[-2(x+1)^2]+(x-1)\exp[-2(x-1)^2]\right)^2}\:dx$$

Since the function is even, we can reduce the domain of integration to $[0,1]$ at cost of a factor of $2$.

Now, according to Wolfram, we have that the max of the square of the derivative is $\approx 1.327$. Half of that is roughly $\frac{2}{3}$. Since on the interval $[0,1]$ we have that $$0 \leq [g'(x)]^2 < \frac{4}{3}$$ consider the following manipulation for a variable $x \in \left[0,\frac{4}{3}\right]$:

$$\sqrt{1+x} = \sqrt{\frac{5}{3}+\left(x-\frac{2}{3}\right)} = \sqrt{\frac{5}{3}}\sqrt{1+\left(\frac{3x-2}{5}\right)}$$

which has

$$-\frac{2}{5} \leq \frac{3x-2}{5} \leq \frac{2}{5}$$

which has a relatively small error for the Taylor approximation

$$\sqrt{\frac{5}{3}}\sqrt{1+\left(\frac{3x-2}{5}\right)} \approx \sqrt{\frac{5}{3}}\left(1+\left(\frac{3x-2}{10}\right)\right) = \sqrt{\frac{3}{5}}\left(\frac{4}{3}+\frac{1}{2}x\right)$$

which means that our arc length integral is approximately

$$L \approx \frac{8}{3}\sqrt{\frac{3}{5}} + 16\sqrt{\frac{3}{5}}\int_0^1 \left((x+1)\exp[-2(x+1)^2]+(x-1)\exp[-2(x-1)^2]\right)^2\:dx$$

After expanding and some substitutions, the integral portion above evaluates to

$$\frac{\sqrt{\pi}}{32}\operatorname{erf}(4) - \frac{7\sqrt{\pi}}{16e^4}\operatorname{erf}(2) - \frac{1}{4e^{16}} - \frac{1}{4e^8}$$

Plugging this is above, we get an analytic expression for the approximation of $L$ which is given numerically by

$$L \approx 2.5758$$

Compare this with the actual value of

$$L \sim 2.5491$$