\START85\ \COMMENT=Program file dated 03/14/00, 15:59 \NAME=APPROX \FILE=C:\TI85LINK\PROGRAMS\APPROX.85P :ClLCD :Disp "" :Disp " Approx" :Disp "" :Disp " by Nick Markham" :Disp "" :Disp " markhamnr@aol.com" :Pause :ClLCD :InpSt "f(x): ",eqn :\St>Eq\(eqn,y1):0\->\x :Input "Lower: ",t :Input "Upper: ",r :Lbl A2 :If x==1:ClLCD :Input "n: ",\LC-theta\ :While \LC-theta\\<=\3 :Disp "n must be \>=\ 4" :Input "n: ",\LC-theta\ :End :ClLCD :2*sum seq(y1,x,t+(r-t)/\LC-theta\,r-(r-t)/(2*\LC-theta\),(r-t)/\LC-theta\\#\ )\->\y :t\->\x:y1+y\->\y :r\->\x:y1+y\->\y :y*(r-t)/(2*\LC-theta\)\->\y :Outpt(1,1,"f(x)=") :Outpt(1,6,eqn) :Outpt(2,1,"[ , ]" :Outpt(2,2,t) :Outpt(2,12,r) :Outpt(3,1,"Trapezoid: ") :Outpt(3,12,y) :If mod(\LC-theta\,2)==0 :Then :4sum seq(y1,x,t+(r-t)/\LC-theta\,r-(r-t)/\LC-theta\,2(r-t)/\LC-theta\)\#\ \->\y :2sum seq(y1,x,t+2(r-t)/\LC-theta\,r-2(r-t)/\LC-theta\,2(r-t)/\LC-theta\\#\ )+y\->\y :r\->\x:y1+y\->\y :t\->\x:y1+y\->\y :y*(r-t)/(3*\LC-theta\)\->\y :Outpt(4,1,"Simpson's: ") :Outpt(4,12,y) :Else :Outpt(4,1,"Simpson's: ----------" :End :Outpt(5,1,"Right : ") :Outpt(5,12,sum seq(y1,x,t+(r-t)/\LC-theta\,r+(r-t)/(2*\LC-theta\),(r-t\#\ )/\LC-theta\)*(r-t)/\LC-theta\) :Outpt(6,1,"Midpoint : ") :Outpt(6,12,sum seq(y1,x,t+(r-t)/(2*\LC-theta\),r-(r-t)/(4*\LC-theta\),\#\ (r-t)/\LC-theta\)*(r-t)/\LC-theta\) :Outpt(7,1,"Left : ") :Outpt(7,12,sum seq(y1,x,t,r-(r-t)/(2*\LC-theta\),(r-t)/\LC-theta\)*(r-\#\ t)/\LC-theta\) :Outpt(8,1,"Exact :") :Outpt(8,12,fnInt(y1,x,t,r) :Pause :Lbl A4 :Menu(1,"Graph",A1,5,"Exit",A5,2,"n",A3) :Lbl A3:1\->\x:Goto A2 :Lbl A1 :Shade(0,y1,t,r) :Shade(y1,0,t,r) :DispG:Goto A4 :Lbl A5 \STOP85\