How Long is a Piece of String? Clever Dood Needed!

This is a discussion on How Long is a Piece of String? Clever Dood Needed! within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I have a maths problem.
My program is rendering a sine wave of the form:
y = oy + (ay ...

How Long is a Piece of String? Clever Dood Needed!

Here's my problem. I want to calculate the path length of the wave. Furthermore, I want to calculate the path length traversed from starting point (0, 0) to some point on the x axis.

In otherwords, if we draw the axes on the ground using inches as our dimensions. Then laid out a piece of string in the shape of the sine wave. How long does the string need to be to reach a distince x along the x-axis from the origin?

I believe this problem is solvable with cantenary equations, but my maths is upto scratch with these.

darn, cant do it. I was thinking of some sort of substitution, but it just got uglier, or back to where I started. Anyways, there probably isnt an antiderivative of that since it wasnt even in the integral table in my calc book. Oh well, theres always Simpson's Rule