Define sample(a,b,n)=a+(b-a)/n*seq(i,i,0,n)
Define delta(x)=right(x,dim(x)-1)-left(x,dim(x)-1)
Define mids(x)=(right(x,dim(x)-1)+left(x,dim(x)-1))/2
Define csum(x)=cumSum(augment({0},x))
sum is a built-in function.
The following program creates a helpful menu.
:sampmenu()
:Prgm
:Custom
:Title "SampCalc"
:Item "sample("
:Item "delta("
:Item "mids("
:Item "sum("
:Item "csum("
:EndCustm
:CustmOn
:EndPrgm
|
A typical sequence to demonstrate that the derivative
of the integral returns the original function might consist of
[MODE] Exact/Approx..... APPROXIMATE
sample(0,3,100) ® x
e^(-x^2) ®
y
csum(mids(y)*delta(x)) ® iy
delta(iy)/delta(x) ® diy
mids(x) ® xm
[Y=] move up to Plot 1
[F3] to Edit
PlotType........... xyline
Mark............... Dot
x.................. x
y.................. y
[Enter] move up to Plot 2
[F3] to Edit
PlotType........... xyline
Mark............... Dot
x.................. xm
y.................. diy
[Enter] [Graph] ZoomData |
| While all of the examples in the article
Sample Calculus run very well on the TI-89, some of the function and variable
names must change. We suggest delta and csum in place
of d and S, since helpful "Clean Up" routines will delete
all one character definitions. (Also, d looks like the symbolic
differentiation function.) When naming the resulting lists, use names
such as yp or iy in place of Dy and Sy.
Since the TI-89 is not case-sensitive, dy can't be both the differences
and the difference quotients. Also, Sy is reserved for a statistics
variable.
It is most convenient to have a sampcalc folder containing the
four definitions and sampmenu program. The folder can be transmitted
to another TI-89 by cable. All sample variables can reside in the
folder and will not conflict with main variables. Users should learn
to use MODE to set Current Folder to "sampcalc" and Exact/Approx to "APPROXIMATE"
and then return to "main" and "AUTO" when finished. Use [CUSTOM]
to toggle the custom menu on and off. To switch the contents of the
custom menu, use program sampmenu and return to original by menu
choice Clean Up, Restore custom default. |