**Introduction**

This program computes left and right hand approximations for
. It also includes the average of the 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.

If you have a TI Connectivity Cable, you can download the program LRSUMS.86p

**The Program **

:Prompt A,B,N | {Prompt is in PRGM under I/O} |

:(B-A)/NH | {The arrow is STO} |

:Ax | {x is x-VAR} |

:0L | {The 0 is a zero} |

:1J | {The 1 is a one} |

:Lbl P | {Lbl is in PRGM under CTL} |

:L+y1*HL | {y1 is in CATLG-VARS under EQU} {The * is the times sign} |

:x+Hx | |

:IS>(J,N) | {IS> is in PRGM under CTL} |

:Goto P | {Goto is in PRGM under CTL} |

:Bx | |

:L+y1*HR | |

:Ax | |

:R-y1*HR | |

:(L+R)/2T | |

:Disp "LEFT RIGHT AVG" | {Disp and " are in PRGM under I/O} |

:Disp L | |

:Disp R | |

:Disp T |

**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

LEFT RIGHT AVG

28.88625

31.13625

30.01125