0

I'm trying to calculate the length of an elliptical arc using Excel and later C++.

The range is not $[0, \pi/2]$, and not $[0, \pi]$, and not $[0 ,2\pi]$, but $[0, \pi/3]$.

Nowhere can I find a clear explanation of a way to calculate this. Not even an infinite series using two angles as arguments. Everywhere the question is answered by giving the circumference or $1/2$ or $1/4$ of it, not the arc length as defined by an argument.

I'd just like to find an expansion with which I can find a numerical solution to the incomplete elliptic integral of the second kind, a series which doesn't contain 'new' functions e.g. gamma, K(), B(), C(), D(), etc.

Thank you.

SarGe
  • 3,061
Sequoia
  • 31
  • 1
    All you have to do is numerically integrate $\sqrt{(a\sin\theta)^2+(b\cos\theta)^2}$ over $\theta\in[0,\pi/3]$. – Parcly Taxel Apr 04 '20 at 11:35
  • Are you asking for a method of finding the length of an arc of an ellipse? Or are you asking for binomial coefficients? You ought to make clear which question you are asking. – sammy gerbil Apr 04 '20 at 13:38
  • If you can tell me how to find the length of an arc on an ellipse then, yes, That's what I'm looking for. – Sequoia Apr 04 '20 at 15:51
  • Have a look here: http://phys.uri.edu/nigh/NumRec/bookfpdf/f6-11.pdf –  Aug 21 '20 at 07:16

2 Answers2

1

image

The arc length of any curve in Cartesian coordinate system is given by $\displaystyle\int_{x_1}^{x_2}\sqrt{1+\left(\frac{dy}{dx}\right)^2}dx$. You can check the proof here.

Now, for a standard ellipse $$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1,$$ we have to find the length of the arc $P_1P_2$ subtending an angle $\theta_2-\theta_1$ at the center of ellipse. Here, $OP_1$ and $OP_2$ makes an angle $\theta_1$ and $\theta_2$, respectively, with $x$-axis.

Its parametric coordinates are $(a\cos\alpha, b\sin\alpha)$. Differentiate the curve, we'll get $$\frac{dy}{dx}=-\frac{b\cos\alpha}{a\sin\alpha}$$

Substitute this, we get $$\text{Arc Length}=\int_{\alpha_1}^{\alpha_2}\sqrt{(a\sin\alpha)^2+(b\cos\alpha)^2}\ d\alpha$$

Note: $(\alpha_1, \alpha_2)\ne(\theta_1, \theta_2)$ since $\alpha$ is eccentric angle and not the central angle of ellipse. $$\alpha=\tan^{-1}\left(\frac{a}{b}\tan\theta\right)$$

SarGe
  • 3,061
  • May I know the reason for downvote? – SarGe Aug 21 '20 at 07:46
  • @YvesDaoust, what does numerical evaluation makes sense without any formula or result? OP just have to put the values in the result I gave and then numerically evaluate it. – SarGe Aug 21 '20 at 09:00
  • Oh, got it. So you downvoted it. First clarify about the statement numerical evaluation and then judge whether the answer is helpful or not. – SarGe Aug 21 '20 at 09:09
  • Do read the question. The OP knowns about the elliptic integral formulation and is even asking for an Excel implementation. I don't think that "numerically evaluate it" gives sufficient details for numerical evaluation. You might as well say "solve the problem". –  Aug 21 '20 at 09:11
  • @YvesDaoust, so did you. Your answer almost matches with mine. Also, elliptical integrals are possible in Excel, too. – SarGe Aug 21 '20 at 09:20
  • 2
    If this can be really utilized as OP requested, then the down vote is really unreasonable. I'm sorry I know nothing more about the subject. – nonuser Aug 21 '20 at 14:43
  • @Aqua, it's alright. Thanks for your concern. – SarGe Aug 21 '20 at 15:09
1

Fourier series approach:

The canonical form for the elliptic integral of the second kind is $$\sqrt{1-k^2\sin^2\theta}.$$

You can expand this in terms of the powers of $k^2\sin^2\theta$, using the Taylor development. Then you get a sum of even powers of the sine, which you can reduce to sums of cosines of the even multiples of the argument. https://mathworld.wolfram.com/TrigonometricPowerFormulas.html

You get a double summation, and by regrouping the terms, the Fourier series of the integrand. Term-wise integration is straightforward.

I would not recommend this method, as a general formula is complex and I guess that convergence will be poor.