Riemann sums can be arduous, tedious, repetitive, and errorprone to calculate by hand, so they are prime candidates for computer software. A function that calculates Riemann sums is given below. Note that this is not a simple, oneline function  if possible, it will be easier to transfer it from another calculator, or download the function and install it using TI Connect than to type it.
The syntax for the function is:
riemann(expression, variable, lower limit, upper limit, number of intervals, which sum) or riemann(f(x), x, a, b, n, which)
where "which sum" takes the values:
The easiest way to get this function is to transfer it from another calculator or download the function file and install via TI Connect.
If you need to type the function by hand, instructions are given below.
If you must type the program by hand, it is easier to enter this function using the Program Editor than the Home screen. You access the program editor by pressing the key, Then select "7: Program Editor" and "3: New" from the submenu. 

In the New dialog, select "Function" from the Type menu, and type the name of the function ("riemann") in the Variable field. 

Now, type the function (shown at right). Some pointers:

riemann(f,x,a,b,n,w) :Func :Local dx,s,c :(ba)/n dx :If w<0 Then :a c :bdx b :ElseIf w=0 Then :a+dx/2 c :Else :a+dx c :EndIf :sum(seq(f,x,c,b,dx)) s :Return dx*s :EndFunc 
The function shown at right calculates a Riemann approximation to the area under the graph of y = x^{2} on [0, 4], using 4 rectangles (n = 4) constructed using lefthand endpoints. 

This function calculates a Riemann approximation to the area under the graph of y = x^{2} on [0, 4], using 4 rectangles (n = 4) constructed using midpoints. 

This function calculates a Riemann approximation to the area under the graph of y = x^{2} on [0, 4], using 4 rectangles (n = 4) constructed using righthand endpoints. 
