In order to explain how I generated the graph of my bicycle commute, first I should explain how I got the data. Late in the Fall of 1998, I walked up the route, carrying a 4foot level and a measuring tape. I held one end of the level on the road, holding it level of course, and measured the distance down to the road at the other end. I then walked along the route, counting my paces, until I found another likely spot. I tried to measure anywhere near any changes of gradient. I recorded the paces and the inches of elevation.
I rode the bus back down. The bus driver was real curious about what I was doing with this 4foot long level on the side of the road for almost an hour. I tried to explain, but I don't think he believed me.
What I got from that, once I converted my paces to feet along the route and the inches to a ratio of incline (this is exactly the slope of the curve at each point, was a set of data points of the slope dy/dx of the curve at various points along the curve.
So, how do you convert this data to a plot? The first hassle was to convert these data points to a continuous function, reasonably approximating the slope of the road. I did this using Maple's spline function, but it caused some trouble. The problem is that the spline could not be manipulated as an ordinary function. A spline is a way to connect the dots from a data set to get a smooth approximating function. Usually, you want to use a cubic spline, which uses the bestapproximating cubic through each adjacent set of three data points, making sure the slopes match up at the ends. This was too hard for Maple, with all the data points I had (54). So I used a ``linear spline'', which is really just a piecewiselinear approximation. This means I really just connected the dots with straight lines. The slope then is continuous, but it is not itself differentiable.
When I say that Maple couldn't handle it, I mean that Maple could not integrate the formulas I needed. As mentioned earlier, with help from Helmut Kahovec, Robert Israel, and others on sci.math.symbolic I was able to modify the spline definition enough to get it to work.
But, there is another problem. What I computed was the slope at points along the curve, measuring with respect to length along the path, not horizontal ( x ) displacement. So, the arclength parameter needed to be converted to the height and the length. It is a straightforward calculus problem to do this, though. If we have data for dy/dx as a function of s then we can find y as a function of s by

