# How do I solve this problem with Trapezoidal Rule?

The Problem

A hanger is 100 feet long and 40 feet wide. A cross section of the hanger is the inverted catenary $$y = 31 - 10(e^{\large \frac{x}{20}} + e^{\large \frac{-x}{20}} ).$$ Find the number of square feet of roofing on the hanger.

The Process

So I know I need to make use of the arc length equation $\displaystyle\;\int^b_a \sqrt{1+(\frac{df}{dx})^2}\, dx,\;$ but how exactly do find the arc length?

I'm thinking that I can find the arc length, then find the area under the curve with the Trapezoidal rule and then simply multiply it by the length.

-

You have described precisely one way to do the problem. Calculate the derivative, and write down the expression for arclength, as an integral. This is easy. The derivative is $\frac{1}{2}\left(e^{x/20}-e^{-x/20}\right)$. Square it, add one, take the square root. You need not even simplify. You end up with a somewhat messy function, and want to approximate the integral. That's what the Trapezoidal Rule is for.

Remark: If you were asked to use the Trapezoidal Rule, there is a little joke in the problem. The messy thing that we have to integrate is actually not so messy. In fact it will turn out to be very very nice.

When you square and add $1$, you will get something like $$1+\frac{1}{4}\left((e^{x/20})^2-2+(e^{-x/10})^2\right).$$ Bring to a common denominator, and simplify. We get $$\frac{1}{4}\left(e^{x/20}+e^{-x/20}\right)^2.$$ Now we can actually take the square root, and get something that integrates quite nicely.

So we really don't need the Trapezoidal Rule! However, for most functions $f(x)$, if you take the derivative, square, add $1$, take the square root, you will get something that cannot be integrated in elementary terms. In that kind of case, we really do need a numerical method to approximate the integral.

-
So, after that I just integrate it from -20 to 20 using the Trapezoidal rule? That was a much easier problem than I originally thought it was. Being able to picture it correctly helped a lot. –  JoseBruchez Mar 11 '13 at 16:39
But as I wrote, you can in fact integrate explicitly, and get the exact answer in seconds. However, in real situations, as opposed to carefully made up problems, almost all the time explicit closed form integration is not possible. –  André Nicolas Mar 11 '13 at 16:45
Is there a way to tell when one can integrate explicitly? Like you said, they are obviously carefully made up problems when this happens but how did you tell right away that I didn't need to go the extra step? –  JoseBruchez Mar 11 '13 at 17:33
If you are explicitly told to use a numerical method, the integral is probably not nice, except at the beginning of a discussion of numerical methods, where it can be convenient to compare the results of the numerical method with the exact answer. If on a test you are not told to use a numerical method, the integral almost certainly can be calculated explicitly. –  André Nicolas Mar 11 '13 at 17:55
The "exact" answer is, I think (did it quickly) approximately $(100)(47.008048)$. Have not done TRAP on the integral, but doubt very much that TRAP with reasonably large $n$ would produce such a large error, since our function is a well-behaved one. –  André Nicolas Mar 11 '13 at 18:42

To find the arc length, you need to evaluate

$$\int dx \: \sqrt{1+4 \sinh^2{\frac{x}{10}}}$$

This may be expressed in terms of an Elliptic Integral of imaginary argument:

$$-10 i E\left(\left.\frac{i x}{10}\right|4\right)$$

$$E(\phi|m) = \int_0^{\phi} dt \sqrt{1-m \sin^2{t}}$$

This likely will not help much, so you will probably benefit from using a numerical integration rule like trapezoidal. Here, define your endpoints $x_0$ and $x_n$; the formula is

$$\frac{1}{2} [g(x_0)+g(x_n)] \Delta x + \sum_{k=1}^{n-1} g(x_i)\Delta x$$

$$g(x) = \sqrt{1+4 \sinh^2{\frac{x}{10}}}$$

$$\Delta x = \frac{b-a}{n}$$

-