{ "hash": "68f5e71bf762d0cde3dc88c2d06a8cd5", "result": { "markdown": "# Arc length\n\n\n\nThis section uses these add-on packages:\n\n``` {.julia .cell-code}\nusing CalculusWithJulia\nusing Plots\nusing SymPy\nusing QuadGK\nusing Roots\n```\n\n\n\n\n---\n\n\n\n\n\nThe length of the jump rope in the picture can be computed by either looking at the packaging it came in, or measuring the length of each plastic segment and multiplying by the number of segments. The former is easier, the latter provides the intuition as to how we can find the length of curves in the $x-y$ plane. The idea is old, [Archimedes](http://www.maa.org/external_archive/joma/Volume7/Aktumen/Polygon.html) used fixed length segments of polygons to approximate $\\pi$ using the circumference of circle producing the bounds $3~\\frac{1}{7} > \\pi > 3~\\frac{10}{71}$.\n\n\nA more modern application is the algorithm used by GPS devices to record a path taken. However, rather than record times for a fixed distance traveled, the GPS device records position ($(x,y)$) or longitude and latitude at fixed units of time - similar to how parametric functions are used. The device can then compute distance traveled and speed using some familiar formulas.\n\n\n## Arc length formula\n\n\nRecall the distance formula gives the distance between two points: $\\sqrt{(x_1 - x_0)^2 + (y_1 - y_0)^2}$.\n\n\nConsider now two functions $g(t)$ and $f(t)$ and the parameterized graph between $a$ and $b$ given by the points $(g(t), f(t))$ for $a \\leq t \\leq b$. Assume that both $g$ and $f$ are differentiable on $(a,b)$ and continuous on $[a,b]$ and furthermore that $\\sqrt{g'(t)^2 + f'(t)^2}$ is Riemann integrable.\n\n\n> **The arc length of a curve**. For $f$ and $g$ as described, the arc length of the parameterized curve is given by\n>\n> $L = \\int_a^b \\sqrt{g'(t)^2 + f'(t)^2} dt.$\n>\n> For the special case of the graph of a function $f(x)$ between $a$ and $b$ the formula becomes $L = \\int_a^b \\sqrt{ 1 + f'(x)^2} dx$ (taking $g(t) = t$).\n\n\n\n:::{.callout-note}\n## Note\nThe form of the integral may seem daunting with the square root and the derivatives. A more general writing would create a vector out of the two functions: $\\phi(t) = \\langle g(t), f(t) \\rangle$. It is natural to then let $\\phi'(t) = \\langle g'(t), f'(t) \\rangle$. With this, the integrand is just the norm - or length - of the derivative, or $L=\\int \\| \\phi'(t) \\| dt$. This is similar to the distance traveled being the integral of the speed, or the absolute value of the derivative of position.\n\n:::\n\nTo see why, any partition of the interval $[a,b]$ by $a = t_0 < t_1 < \\cdots < t_n =b$ gives rise to $n+1$ points in the plane given by $(g(t_i), f(t_i))$.\n\n::: {.cell cache='true' execution_count=5}\n\n::: {.cell-output .cell-output-display execution_count=6}\n```{=html}\n
The arc length of the parametric curve can be approximated using straight line segments connecting points. This gives rise to an integral expression defining the length in terms of the functions \\(f\\) and \\(g\\).
\n