Function to perform calculations
function calculate ( $ lower_limit , $ upper_limit , $ interval_limit ) { $ interval_size = ( $ upper_limit - $ lower_limit ) / $ interval_limit ; $ sum = func ( $ lower_limit ) + func ( $ upper_limit ) ;