I need help resolving a geometric hydrology related question for a storm drain pipe. The pipe is 6.91 ft x 5.35 ft. The equipment at the site is giving me real-time depth of water data, and with the equation I got from a very helpful user on this website I now can calculate the corresponding width of water. I now need to determine the arc length at any given water depth, which I can then add to the width already calculated to determine the entire perimeter of the submerged cross section. how do I use the data I've got to determine arc length? I have attached a sketch.
[Math] How to determine arc length of a section of an ellipse
conic sectionsgeometry
Related Solutions
Let $a=3.05,\ b=2.23.$ Then a parametric equation for the ellipse is $x=a\cos t,\ y=b \sin t.$ When $t=0$ the point is at $(a,0)=(3.05,0)$, the starting point of the arc on the ellipse whose length you seek. Now it's important to realize that the parameter $t$ is not the central angle, so you need to get the value of $t$ which corresponds to the top end of your arc. At that end you have $y/x=\tan 50$ (degrees). And in terms of $t$ you have $y/x=(b/a)\tan t$. Solving for $t$ then gives $$t=t_1=\arctan \left( \frac{a}{b}\tan 50 \right).$$
[note I'd suggest using radians here, replacing the $50$ by $5\pi/18.$]
For the arclength use the general formula of integrating $\sqrt{x'^2+y'^2}$ for $t$ in the desired range. In your case $x'=-a \sin t,\ y'=b \cos t$, so that you are integrating $$\sqrt{a^2 \sin^2t+b^2 \cos^2t}$$ with respect to $t$ from $0$ to the above $t_1$. There not being a simple closed form for the antiderivative (it's an "elliptic integral), the simplest approach now would be to do the integral numerically. This seems the more appropriate in your problem as you only know $a,b$ to two decimals, apparently.
* When I did this numerically on maple I got about $2.531419$ for the arclength.
First attempt: Going from a sketch in GeoGebra
the equation is roughly $$ \left(\frac{x - 513 }{513}\right)^2 + \left(\frac{y- 100}{877.5}\right)^2 = 1 $$
Algebraic model: Assuming the minor axis is parallel to the $x$-axis, the equation of the ellipse is $$ \left(\frac{x - b}{b}\right)^2 + \left(\frac{y - 100}{a}\right)^2 = 1 \quad (1) $$ with unknowns $a, b$.
Note: Other orientations parallel to one of the coordinate system axes are hardly possible, because the distance between $P$ and the second point $Q$ is $d = 641.6$, while the intended arc length between $P$ and $Q$ is $s = 650$, less then $10$ units more. I tried an orientation parallel to the $y$-axis, but that would need a much larger piece of arc on the ellipse.
Inserting the first point $P = (0, 100)$: $$ \left(\frac{0 - b}{b}\right)^2 + \left(\frac{100 - 100}{a}\right)^2 = 1 $$ It satisfies equation $(1)$, so that curve goes through $P$.
The second point $Q = (145,725)$ gives the equation $$ 1 = \left(\frac{145-b}{b}\right)^2 + \left(\frac{725 - 100}{a}\right)^2 = \left(1 - \frac{145}{b}\right)^2 + \left(\frac{625}{a}\right)^2 $$ which relates $a$ and $b$ and solving gives: $$ a = \frac{625}{\sqrt{1 - \left(1 - \frac{145}{b}\right)^2}} $$ and $$ \left(1 - \frac{625^2}{a^2}\right) b^2 = (b-145)^2 = b^2 -290 b + 145^2 \iff \\ b^2 = \frac{290}{625^2}a^2 b - \frac{145^2}{625^2}a^2 \iff \\ \left(b - \frac{145}{625^2}a^2 \right)^2 = \frac{145^2}{625^4}a^4 - \frac{145^2}{625^2}a^2 = \frac{145^2}{625^4}a^2 \left(a^2 - 625^2\right) \iff \\ b = \frac{145}{625^2}a^2 + \frac{145}{625^2} a \sqrt{a^2 - 625^2} \iff \\ b = \frac{145}{625^2}a \left(a + \sqrt{a^2 - 625^2} \right) \quad (2) $$
We choose this parameterization of the arc:
$$ x = b - b \cos t \quad y = 100 + a \sin t \\ \dot{x} = b \sin t \quad \dot{y} = a \cos t $$
Note: While $t$ runs from $0$ to $2\pi$, $t$ in general is not the angle $\beta = \angle(R, C, P)$, where $R = (x(t),y(t))$ and $C = (b, 100)$ is the center of the ellipse. For a circle ($a = b$) it would be, but for a non-circle ellipse the relationship is non-linear: $$ \beta = \arctan\left(\frac{a \sin t}{b \cos t}\right) = \arctan\left(\frac{a}{b} \tan t\right) \quad t \in [0, \pi/2] $$
The chosen curve leads to the arc length via $ds^2 = dx^2 + dy^2$: \begin{align} s &= 650 \\ &= \int\limits_{0}^{t^*} \sqrt{b^2 \sin^2 t + a^2 \cos^2 t} \, dt \\ &= a \int\limits_{0}^{t^*} \sqrt{1 - (1- (b/a)^2) \sin^2 t} \, dt \\ &= a \int\limits_{0}^{t^*} \sqrt{1 - \epsilon^2 \sin^2 t} \, dt \\ &= a \, E(t^*, \epsilon) \quad (3) \end{align} with $t^*$ determined by $$ 145 = b - b \cos t^* \quad 725 = 100 + a \sin t^* $$ where we use $$ t^* = \arcsin \frac{625}{a} \quad (4) $$ The above integral is an elliptical integral (Legendre, 2nd kind) which can only be approximated by elementary functions.
For the eccentricity $\epsilon$ we get $$ 1 - \epsilon^2 = \frac{b^2}{a^2} = \frac{145^2}{625^4} \left(a + \sqrt{a^2 - 625^2} \right)^2 \iff \\ \epsilon = \sqrt{1-\frac{145^2}{625^4} \left(a + \sqrt{a^2 - 625^2} \right)^2} \quad (5) $$
Using the above equations $(1)-(5)$ we can formulate an equation in terms of the unknown $a$: $$ 650 = a E\left(\arcsin \frac{625}{a}, \epsilon(a)\right) \iff \\ F(a) = 650 - a E\left(\arcsin \frac{625}{a}, \epsilon(a)\right) = 0 \quad (6) $$
Solving this numerically (details below), we get this solution: $$ a = 721.384624 \quad b = 289.634475 $$
and the equation $$ \left(\frac{x - 289.634475}{289.634475}\right)^2 + \left(\frac{y- 100}{721.384624}\right)^2 = 1 $$
which is quite different from the attempt to derive these values by the sketch!
Numerical solution:
Looking through my mostly open source toolset I decided to use Maxima, because it features an implementation of the needed incomplete elliptic integral of the second kind:
First we define $t^*(a)$:
(%i) ts(a) := asin(625/a);
625
(%o) ts(a) := asin(---)
a
Then we define $m(a) = \epsilon^2(a)$, the second needed parameter for the elliptic integral implementation elliptic_e(phi, m)
:
(%i) m(a) := 1-((145^2)/(625^4))*(a + sqrt(a^2 - 625^2))^2;
2
145 2 2 2
(%o) m(a) := 1 - ---- (a + sqrt(a - 625 ))
4
625
And then we define $F(a)$:
(%i) F(a):= 650 - a*elliptic_e(ts(a), m(a));
(%o) F(a) := 650 - a elliptic_e(ts(a), m(a))
Now we need a way to find roots $a$ of $F(a)$. First we try it graphically:
(%i) plot2d(F(a), [a,625,1000]);
(%o)
So the root is around $725$. Next we try the Newton method:
(%i) load(newton1);
(%o) /usr/share/maxima/5.27.0/share/numeric/newton1.mac
then we execute it using $a_0 = 800$ and a precision $10^{-6}$:
(%i) an : newton(F(a), a, 800, 1/100000);
(%o) 721.3846241818675
The result is saved as $a_n$. From this we calculate $b_n$:
(%i) bn = sqrt(1-m(an)) * an;
(%o) 289.6344752045375 = 289.6344752045375
For testing if these values fulfill equation $(1)$ we define
(%i) eq(a,b) := ((145-b)/b)^2 + ((725-100)/a)^2;
145 - b 2 725 - 100 2
(%o) eq(a, b) := (-------) + (---------)
b a
and apply this test function to the calculated values
(%i) eq(an, bn);
(%o) 1.0
And this looks good! Some more tests:
(%i) eq(x,y,a,b) := ((x-b)/b)^2 + ((y-100)/a)^2;
x - b 2 y - 100 2
(%o) eq(x, y, a, b) := (-----) + (-------)
b a
(%i) eq(0,100,an,bn);
(%o) 1.0
(%i) eq(145,725,an,bn);
(%o) 1.0
(%i) eq(513,877,an,bn);
(%o) 1.754880658615442
(%i) eq(2*bn,100,an,bn);
(%o) 1.0
(%i) eq(bn,100-an,an,bn);
(%o) 1.0
(%i) eq(bn,100+an,an,bn);
(%o) 1.0
And finally some looks at the arc length:
(%i) F(an);
(%o) - 6.5450649344711564E-9
(%i) ts(an);
(%o) 1.047926026242998
(%i) an * elliptic_e(ts(an), m(an)),numer;
(%o) 650.0000000065451
(%i) an * elliptic_e(%pi/2, m(an)),numer;
(%o) 830.6877077032057
(%i) an * elliptic_e(0, m(an)),numer;
(%o) 0.0
Phew.
Best Answer
Consider an approximation. Start by using the half angle $\psi$ that spans the arc
Note that $\tan \psi = \frac{x/2}{depth}$. I also used a dimensionless parameter for the shape equal to $\epsilon = \frac{h}{\sqrt{w^2-h^2}}$ where $w$ is the known width and $h$ is the known height. This created the arc length integral as
$$ \ell = \int \limits_{0}^{\psi/2} \sqrt{w^2-(w^2-h^2)\cos^2 \psi}\,{\rm d}\psi $$
$$ \ell = \frac{w}{\sqrt{1+\epsilon^2}} \int \limits_0^{\psi/2} \sqrt{\epsilon^2 + \sin^2 \psi}\,{\rm d} \psi $$
I plugged the integral into Wolfram Alpha to give me the approximation
$$ \ell = (w) \psi + \left( \frac{h^2}{24 w}-\frac{w}{24} \right) \psi^3 - \left( \frac{h^4}{640 w^3}-\frac{h^2}{960 w}-\frac{w}{1920} \right) \psi^5 + \ldots O(\psi^7)$$
Appendix
For any parametric curve $(x(t),y(t))$ the length is $$\Delta \ell = \int \limits_t^{t+\Delta t} \sqrt{ \left(\frac{{\rm d}x}{{\rm d}t}\right)^2 + \left(\frac{{\rm d}y}{{\rm d}t}\right)^2}\,{\rm d} t $$