title: Use a function integral( f ) which computes the integral of f over [0,1] to compute the integral of f over any interval
body: <p>How to use a (hypothetical) routine integral( f ) which computes the integral of function f over [0,1] to compute the integral of f over any interval [a,b]?</p>
  
  <p>If I wanted to change the interval of integration I would use the following substitution:</p>
  
  <p>y = (x-a)/(b-a) </p>
  
  <p>dy = (1/(b-a))dx</p>
  
  <p>Which means that I can now compute the integral f(y)*(b-a)dy over [0,1] to get the same result I would get from integrating f(x)dx over [a,b], however the funtion integral() takes one argument - a function - and I'm having a hard time figuring out how to use the substitution I've found to derive that function.</p>