How to divide area under a curve into equal segments
<p>I am trying to divide the area under a curve given in tabulated  form <img src="https://latex.codecogs.com/gif.latex?$(x,f(x))$" title="$(x,f(x))$" /> into equal area segments. I have to solve the following integral and find a set of points <code>x_0,x_1,...,x_k,x_N</code> for which the following holds</p>

<p><img src="https://latex.codecogs.com/gif.latex?%5Cint_%7Bx_0%7D%5E%7Bx_k%7D&space;f(t)dt&space;=&space;%5Cfrac%7Bk%7D%7BN%7D" title="\int_{x_0}^{x_k} f(t)dt = \frac{k}{N}" /></p>

<p>Unfortunately, I don't really see how to do that for a tabulated function. For an analytic linear or quadratic function the above results in solving a quadratic or cubic equation for x_k.
I tried to iterate the value of x_k until the integral is less than <code>k/N</code>. I start with the first fixed value x_0 and try to find x_1 for which the integral is <code>k/N</code>, then use x_1 as the new lower limit and look for x_2 with the same property.<br>
I assume that a much more efficient way to do this exists, this is why I decided to ask the experts here. 
I would appreciate your ideas.  </p>