**Introduction**

This program computes left and right hand approximations for
. It also includes the average of the two approximations.

If you have not used one of the programs posted on this website before,
you should read through
the information in the Intro to Programming
section first.

**The Program **

'LR SUMS' | {' is in ALPHA} {This is the name of the program} |

Lbl 1 | {Lbl is in PRGM under JMP} |

"A"?A | {" is in ALPHA} {? is in PRGM} { is on the , button} |

"B"?B | |

"N"?N | |

(B-A) N H | |

AX | |

0L | {The 0 is a zero} |

Lbl 2 | |

L+Y1H L | {Y1 is in VAR under GPH, then followed by a 1} |

X+H X | |

Dsz N | {Dsz is in PRGM under JMP} |

Goto 2 | {Goto is in PRGM under JMP} |

BX | |

L+Y1H R | |

AX | |

R-Y1H R | |

(L+R) 2T | |

"L R AVG" | |

L | { is in PRGM} |

R | |

T | |

Goto 1 |

**Running the Program**

You will need to enter a function *f*(*x*) into
Y1 before running
the program. The program will ask for values of A, B, and N (number of
subdivisions).

To test the program try the following:

*f*(*x*) = x^{2}+ 3,
A=1, B=4, N=20.

Your answer will be

L R AVG

28.88625

31.13625

30.01125

To get each estimate hit EXE.