Find the area under a given curve--warning, not yet stupid-proofed.