Here's an example to describe one way to do this:
Suppose you have the sum from x = 5 to x = 8. Ultimately, you're going to evaluate something for 5, 6, 7, and 8. That's 4 things. That comes into play later.
Let's say that the summation is supposed to equal 100.
You can make up virtually *any* function for inside the summation (for starters.)
Let's say you decided that your function is going to be, simply, x^2.
Well, when you figure out the summation from 5 to 8 of x^2,
you'll have 25 + 36 + 49 + 64. That's 174. You might be thinking, "awww, shit. That didn't work. Back to the drawing board." Not so fast! You're off by 74. And there were 4 things you summed. So, on average, each of them are off by 74/4 or 18.5
So, simply adjust your formula. The sum from i = 5 to 8 of (x^2-18.5)
And, you'll end up with (25 - 18.5) +(36 - 18.5) + (49 - 18.5) + (64 - 18.5)
By the commutative and associative properties, you should see that it's 25 + 36 + 49 + 64 (as before), but you also have -18.5 -18.5 -18.5 -18.5 for a total of minus 74 from the old sum.
Don't stick to something that easy though. It's an open ended question, so make up a sickeningly complicated function so your teacher has lots of fun verifying that it's correct. He'll appreciate it.