## Length of Curve Calculator

*f(x)*=

*(a)*=

*(b)*=

Solution

## Length of Curve Lesson

### What is the Length of a Curve?

**The length of a curve, which is also called the arc length of a function, is the total distance traveled by a point when it follows the graph of a function along an interval [a, b].**

To visualize what the length of a curve looks like, we can pretend a function such as *y = f(x) = x ^{2}* is a rope that was laid down on the x-y coordinate plane starting at x = -2 and ending at x = 2.

This rope is not pulled tight since it is laid down in the shape of a parabola. However, if we were to pull on both ends it would become a tight, linear rope. The length of this rope line is the length of the curve *y = f(x) = x ^{2}* from x = -2 to x = 2, notated as the interval [-2, 2].

### Why do we Learn About the Length of a Curve?

Finding the length of a curve is another useful tool for our problem solving toolbox. We can use this concept for more than just completing some math problems. What if we are designing a rocket nozzle and want to find out how much ablative coating is required for the inside of this nozzle?

An ablative coating protects a substrate that is exposed to high velocity, high temperature gases and particles for a finite amount of time. A substrate is the material that the coating is applied to. Ablatives are commonly used on space vehicles and launch equipment to protect critical components under the resulting thermal loads seen during launch and flight.

If we are designing a bell shaped rocket nozzle that is parabolic in shape, we can take the function for the inner profile of the nozzle and revolve that profile around an axis to find the surface area of the nozzle's inner surface. This essentially boils down to finding the length of the curve (function), multiplying it by a constant and the function itself, and then integrating over the interval of interest to find the surface area.

Additionally, by taking the coating's weight per unit area into account, we can then determine how much weight is added to our system when the coating is applied to the surface area of interest.

### How to Calculate the Length of a Curve

**The formula for calculating the length of a curve is given as:**

$$\begin{align} L = \int_{a}^{b} \sqrt{1 + \left( \frac{dy}{dx} \right)^2} \: dx \end{align}$$

Where *L* is the length of the function *y* = *f(x)* on the *x* interval [*a*, *b*] and ^{dy}/_{dx} is the derivative of the function *y* = *f(x)* with respect to *x*.

The arc length formula is derived from the methodology of approximating the length of a curve. To approximate, we break a curve into many segments. If each segment is treated as a straight line, we may use the distance formula to determine each line's length.

Adding up the lengths from these many straight lines gives an approximation of the curve's length. The accuracy of that approximation gets better as we break the curve into a greater number of shorter straight lines.

After setting up the distance formula for the length of these line segments we may use an integral to make those line segments infinite in quantity and infinitesimally short. Each small change in *x* value is the *dx* from the arc length formula. In fact, the arc length formula is a simplified summation of an infinite number of distance formula evaluations for the straight lines.

### Example Problem 1

$$\begin{align}

& \text{1.) Find the length of } y = f(x) = x^{2} \text{ between } -2 \leq x \leq 2 \hspace{20ex} \\ \\ & \hspace{3ex} \text{ Using the arc length formula } \: L = \int_{a}^{b} \sqrt{1 + \left( \frac{dy}{dx} \right)^2} \: dx \\ \\ & \text{2.) Given } y = f(x) = x^2\text{, find } \frac{dy}{dx} : \\ \\ & \hspace{3ex} \frac{dy}{dx} = 2 \cdot x\\ \\ & \text{3.) Plug lower x limit } a \text{, upper x limit } b \text{, and } \frac{dy}{dx} \text{ into the arc length formula} : \\ \\ & \hspace{3ex} L = \int_{-2}^{2} \sqrt{1 + \left(2 \cdot x\right)^2} \: dx\\ \\ & \text{4.) Solve for length by evaluating the integral}: \\ \\ & \hspace{3ex} L = \int_{-2}^{2} \sqrt{1 + \left(2 \cdot x\right)^2} \: dx = 9.2936 \end{align}$$

### Example Problem 2

$$\begin{align}

& \text{1.) Find the length of } y = f(x) = \ln \left(x\right) \: - \: 2x \text{ between } \frac{2}{3} \leq x \leq 12 \hspace{20ex} \\ \\ & \hspace{3ex} \text{ Using the arc length formula } \: L = \int_{a}^{b} \sqrt{1 + \left( \frac{dy}{dx} \right)^2} \: dx

\\ \\ & \text{2.) Given } y = f(x) = \ln \left(x\right) \: - \: 2x \text{, find } \frac{dy}{dx} : \\ \\ & \hspace{3ex} \frac{dy}{dx} = - 2 + \frac{1}{x}\\ \\ & \text{3.) Plug lower x limit } a \text{, upper x limit } b \text{, and } \frac{dy}{dx} \text{ into the arc length formula} : \\ \\ & \hspace{3ex} L = \int_{\frac{2}{3}}^{12} \sqrt{1 + \left(- 2 + \frac{1}{x}\right)^2} \: dx\\ \\ & \text{4.) Solve for length by evaluating the integral}: \\ \\ & \hspace{3ex} L = \int_{\frac{2}{3}}^{12} \sqrt{1 + \left(- 2 + \frac{1}{x}\right)^2} \: dx = 22.8515 \end{align}$$

## How the Calculator Works

The Voovers Length of Curve Calculator is written in the web programming languages HTML (HyperText Markup Language), CSS (Cascading Style Sheets), and JS (JavaScript). The HTML creates the architecture of the calculator, the CSS provides the visual styling, and the JS provides all functionality and interactiveness.

When the "calculate" button is clicked, your inputted function and interval are read by the JS routine. The routine calls on a JS computer algebra system (CAS) which can perform a derivative symbolically, maneuvering equations and applying derivative rules just like a person!

The CAS performs the differentiation to find ^{dy}⁄_{dx}. Then, that expression is plugged into the arc length formula. The integral is evaluated, and that answer is rounded to the fourth decimal place. The final length of curve result is printed to the answer area along with the solution steps.

Then, a large list of (x, y) coordinate pairs is generated for the function. These coordinate pairs are fed to a JS graphing utility that draws a smooth curve through the points. This function plot is displayed below the solution steps.