Blogs, Calculus, Modeling

How long is that mountain path?

We have continued talking about using integrals for geometric purposes in Calculus. Yesterday, we talked about arc-length. While doing so, my mind wandered back to the trip Paula and I took to visit my sister when she got married. How are these connected? Well, we went up and down many mountains and the distance traveled through these mountain paths provides a great way to visualize arc-length.

The path

I want to walk up, down, up and down the mountains in the picture below.  That is, I want to follow the path outlined in black.

If I want to determine the total distance I would have to walk in order to cover this path, I would need to know some additional information.  In particular, we would need to know the height and the width of the given mountains.  If we knew either one of these, or the distance to the mountains, we could find the other using Paula’s height as a reference.  However, I don’t actually know any of these since I just chose a picture that looked pretty.  Therefore, I am going to use arbitrary units that seem to fit the picture.  Doing this, we have the following picture.

From the graph given above, we see that our path appears to go through the following points,

x y
-5 0
-3 1
-1 0
0 \(-\frac{1}{2}\)
1 0
4 3
9 0

Choosing a function type

Now that we know what we want our path to look like and what points we want it to go through, we can now determine a function to model the given path.  We do have multiple choices for types of functions, so let’s look at some.

  • Polynomial
    • Looks like a fourth degree polynomial since it has three local extrema.
    • If wanted to guarantee that all points fell on the same polynomial, we would need at least an 6th degree polynomial.
  • Sinusoidal
    • The function seems to be periodic, so a sinusoidal function could work.
    • However, the amplitude of the crests are not the same, so this may not be the best.
  • Piece-wise
    • Would focus on finding the best fit for specific portions instead of the whole.
    • This would require finding more than one function.

Between the options, I thought that defining the function piece-wise would end up with a good approximation and require the least amount of work possible to do so.  For my pieces, I will be using quadratic functions through the points.  In general, a quadratic function would be uniquely determined by three points.  However, if the vertex, we can instead determine the function using two points.  Therefore, I could find a function connecting each pair of points and work over each of these intervals.

Finding the function

We will be finding the quadratic through the given points.  In order to do this, we can use the formula for a quadratic \(f(x)=a(x-h)^{2}+k\).  Note that, using this equation, we have that the vertex is the point \((h,k)\) and we would then find \(a\) using our other point.

As we look at the first two points, we would say that the point (-3,1) is the vertex of the quadratic function and (-5,0) is on the graph.  Therefore, \(h=-3\) and \(k=1\).   We can then find that \[\begin{align*}0&=a(-5-(-3))^{2}+1 \\  a&=\frac{-1}{4}.\end{align*}\] Hence \(f(x)=\frac{-1}{4}(x+3)^{2}+1\) on the interval \([-5,-3)\).

If we repeat this process for each of the consecutive pairs given above, choosing the appropriate point as the vertex, we arrive at the function \[f(x)=\begin{cases} \frac{-1}{4}(x+3)^{2}+1 \text{ for } -5 \leq x < -1 \\ \frac{1}{2}x^{2}-\frac{1}{2} \text{ for } -1 \leq x < 1 \\ \frac{-1}{3}(x-4)^{2}+3 \text{ for } 1 \leq x < 4 \\ \frac{-3}{25}(x-4)^{2}+3 \text{ for } 4 \leq x \leq 9. \end{cases}\]

Finding Distance

We  now recall that you can find the total distance traveled by finding the arc-length of the function.  If the function was linear, we could find this distance by taking \(d=\sqrt{(\Delta x)^{2}+(\Delta y)^{2}}\).  Since we do not have a linear function, we can instead use the linear approximation to approximate the distance moved over small intervals.  If we then add these all up, we get the total distance traveled.  That is \[\begin{align*}\text{distance} & \approx \sum \sqrt{(\Delta x)^{2}+(\Delta y)^{2}}. \end{align*}\]

As we let our \(\Delta x\) get infinitesimally small, we would find that the approximation would be exact.  In order to sum these as \(\Delta x\) gets small, we note that this is by definition \(\int_{a}^{b}\sqrt{(dx)^{2}+(dy)^{2}}\), where \(a\) is the smallest \(x\) and \(b\) is the largest \(x\) we are interested.  By simplifying, we find that \[\begin{align*} \text{arc-length}&=\int_{-5}^{9}\sqrt{1+f'(x)}dx.\end{align*}\]

In order to find this integral, we will find the integral over the corresponding intervals where the function stays the same.  We then get the first arc-length is \[\begin{align*}\int_{-5}^{-1}\sqrt{1+(\frac{-1}{2}(x+3))^{2}}dx&=\int_{-5}^{-1}\sqrt{1+\frac{1}{4}(x+3)^{2}}. \end{align*}\]

We will now need to find an anti-derivative in order to calculate this.  To do so, we let \(i=\frac{1}{2}(x+3)\).  Then \(di=\frac{1}{2}dx\), so \(dx=2di\).  We therefore get that \[\int_{-5}^{-1} \sqrt{1+\frac{1}{4}(x+3)^{2}} =\int_{-1}^{1} \sqrt{1+i^{2}}2di. \]  We then let \(i=\tan(\theta)\), then \(di=\sec^{2}(\theta)d\theta\), so \[\begin{align*}\int_{-1}^{1} \sqrt{1+i^{2}}2di&=2\int_{-\frac{\pi}{4}}^{\frac{\pi}{4}} \sqrt{1+\tan^{2}(\theta)}\sec^{2}(\theta)d\theta \\ &=2 \int_{-\frac{\pi}{4}}^{\frac{\pi}{4}} sec^{3}(\theta)d \theta \\ &=\sec(\theta)\tan(\theta)|_{-\frac{\pi}{4}}^{\frac{\pi}{4}}+\int_{-\frac{\pi}{4}}^{\frac{\pi}{4}} sec(\theta)d\theta \\&=2\sqrt{2}+\ln|\sec(\theta)+\tan(\theta)||_{-\frac{\pi}{4}}^{\frac{\pi}{4}} \\ &=2\sqrt{2}+\ln(\sqrt{2}+1)-\ln(\sqrt{2}-1) \\ & \approx 4.59. \end{align*}\]

As I went through this, I wanted to show as much as possible in order to help show the steps involved in the integration.  Here, we needed a substitution, and a trig substitution.  Furthermore, in order to find the anti-derivative of \(\sec^{3}(\theta)\), we needed a reduction formula and an integral of \(\sec(\theta)\).  While I considered showing how to get these using integration by parts and another substitution, I felt that we had already seen enough detail for one post.  If you would like to see more, please let me know and I can send these details to you.

Total distance

So far, we have only found the distance traveled as we moved over the first portion of the integral.  We can now follow a very similar process to find the total distance traveled over the remaining intervals.  When done, we need to find the sum of these in order to find the total distance traveled.   If you do this, you will find \(\text{Total Distance}=4.59+2.30+4.44+6.02=17.35\).  That is, in order to walk the path along the along the rise of the mountains, you will have to walk 17.35 units where the units correspond to the choice I made when plotting the graph.

Conclusion

What we’ve seen today is that math in general and calculus in particular can really be found anywhere.  Even in a nice picture of a person fishing in front of the mountains, we were able to find a use for calculus.  Furthermore, I hope that going through the example of arc-length will help those of you currently in a calculus 2 class that are working on the topic (ie those of you in my calculus class).

If you enjoyed the post and found it helpful, make sure to share with others that may also find it helpful.  We really appreciate when you help spread the information we provide.

1 thought on “How long is that mountain path?”

We'd love to hear your thoughts!

This site uses Akismet to reduce spam. Learn how your comment data is processed.