Estimating the arc length of a sine wave using this polynomial formula

arc lengthpolynomialstrigonometry

I need to calculate the arc length of a half period of a sine wave with a given frequency and amplitude.

I found this article which summarizes a polynomial method for getting a very close approximation:

http://edspi31415.blogspot.com/2012/05/arc-length-of-sinx-curve-approximation.html

He states:

We have been looking to find the arc length of the curve $y = a sin x$
from $x = 0$ to $x = π$.

The exact value is:

$π ∫ √ (1 + a^2 cos^2 x ) dx$

$0$

However, a good estimate can be found (to 2-3 decimal places) with the polynomial:

$y = .0081196317102889 x^4 – .11577326164517 x^3 + .63914882375794 x^2 + .2071162669684 x + 3.0881429428239$

I'm having trouble understanding how that polynomial works though. Arc length of the sine wave will vary both with amplitude and frequency of the sine wave, right? I don't see a way to accommodate for that.

Let's say I have a simple equation of:

$y = a * sin (\frac{π x}{c})$

As shown here:

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

Could this polynomial give me the arc length say from $x=0$ to $x=c$ on that graph? If so, how do I implement it?

Alternatively, are there any good or easy to implement other polynomial solutions for this problem?

Best Answer

Too long for a comment.

@Parcly Taxel gave the good answers and, in particular, pointed out that the polynomial is in $a$ and not in $x$.

The small problem I see here is that the choice of the data points based on which the polynomial regression is made is totally arbitrary (thst is to say that user smaller or larger stepsize will affect the result. We can get rid of this using in fact the norm of the system.

The exact arclength is given by $$L=\int_0^\pi \sqrt{1+a^2 \cos ^2(x)}\,dx=2 \sqrt{a^2+1} E\left(\frac{a^2}{a^2+1}\right)$$ and we want to approximate it by the model $$L'=\sum_{i=1}^5 b_i\,a^{5-i}$$ So consider $$\Phi(b_1,b_2,b_3,b_4,b_5)=\int_0^5 (L'-L)^2\, da$$ (for sure, changing the range will change the results) and numerically minimize $\Phi(b_1,b_2,b_3,b_4,b_5)$ with respect to its parameters. This procedure is equivalent to the curve fit on the basis of an infinite number of data points.

The final results would be $$\{0.00933896279029,-0.128748093746, 0.68584815405609, 0.142654927513, 3.11458534187676\}$$

Edit

In comments, you asked for the same work forcing the constant to be equal to $\pi$. For the same conditions as before $(0 \leq a \leq 5)$, the coefficients are $$\{ 0.0104354807025,-0.14091929319588, 0.73142257586132, 0.07768768253114\}$$ and the value of the norm is $0.00045$ instead of $0.00031$. Not a big loss.

Update

We can make a quite good approximation of $L$ using Padé approximants built at $a=0$. They will write $$L=2 \sqrt{a^2+1} E\left(\frac{a^2}{a^2+1}\right)\sim\pi\,\frac{1+\sum _{i=1}^n b_i\,a^{2 i} } {1+\sum _{i=1}^n c_i\,a^{2 i} }$$ and I shall write the coefficients as $b_i=\frac {b^{(0)}_i} {b^{(1)}_i}$ and $c_i=\frac {c^{(0)}_i} {c^{(1)}_i}$ to provide the exact numbers. For $n=6$, they are $$\left( \begin{array}{ccc} n &{b^{(0)}_i} &{b^{(1)}_i} \\ 1 & 978715518761734721 & 340266845202118768 \\ 2 & 17217154294207083315 & 5444269523233900288 \\ 3 & 2259182768960973723 & 1361067380808475072 \\ 4 & 147017417917716730895 & 348433249486969618432 \\ 5 & 1025154552798223543815 & 22299727967166055579648 \\ 6 & 514701376255563496705 & 356795647474656889274368 \end{array} \right)$$ $$\left( \begin{array}{ccc} n &{c^{(0)}_i} &{c^{(1)}_i} \\ 1 & 893648807461205029 & 340266845202118768 \\ 2 & 13897759198263852275 & 5444269523233900288 \\ 3 & 765774311593521685 & 680533690404237536 \\ 4 & 76540276098711585485 & 348433249486969618432 \\ 5 & 340415228454088445827 & 22299727967166055579648 \\ 6 & 58924683873615813721 & 356795647474656889274368 \end{array} \right)$$ and they match extremely well at least up to $a=3$. For sure, we could improve adding more terms.

Another way would be to write $$L=2 \sqrt{a^2+1} E\left(\frac{a^2}{a^2+1}\right)=\pi \,\sqrt{a^2+1}\, \sum_{n=0}^\infty \frac{ ((2 n)!)^2 }{2^{4 n}\,(1-2 n)\ (n!)^4}\left(\frac{a^2}{a^2+1}\right)^n$$