CADY
MATH
Assignments
Projects
Battle
Text Scrambler
Text to Image
TI-84/nspire Calculator Basic Programs
Randomizer
Vocabulary Trinket
Demos
Trebuchet (Linear/Angular Velocity)
Links
CiteThis (Citation Generator)
Academic Phrasebank
Desmos (Graphing Calculator)
WabbitEmu (TI-84 Emulator)
Wolfram Alpha (Equation Solver)
Contact
Login
Register
English
中文
français
TI-84/nspire BASIC Programs
TI-84 BASIC Programs
TI-nspire BASIC Programs
Newton's Method
newtonsmethod
Define newtonsmethod()=
Prgm
Request "f(x): ",f(x)
Request "x0: ",a
Request "n: ",n
Local i
For i,1,n
a-f(a)/
d
dx
(f(x))|x=a→a
Disp "x",i,"=",a
EndFor
EndPrgm
Average Value
averagevalue
Define averagevalue()=
Prgm
Request "f(x): ",f(x)
Request "a: ",a
Request "b: ",b
Local y
1/(b-a)⋅
∫
b
a
f(x)dx→y
Disp "y=",y
Disp "x=",nSolve(f(x)=y,x=(b-a)/2,a,b)
EndPrgm
Slope of a Polar Function
polarslope
Define polarslope()=
Prgm
Request "r(θ): ",r(θ)
Request "θ: ",a
Local s:
d
dx
(r(θ))|θ=a→s
Disp (s⋅sin(a)+r(a)⋅cos(a))/(s⋅cos(a)-r(a)⋅sin(a))
EndPrgm
Left Riemann Sum
lram
Define lram()=
Prgm
Request "f(x): ",f(x)
Request "a: ",a
Request "b: ",b
Request "n: ",n
Local w,i,s:0→s
b-a
n
→w
For i,0,n-1
s+w⋅f(a+i⋅w)→s
EndFor
Disp "Area≈",s
EndPrgm
Right Riemann Sum
rram
Define rram()=
Prgm
Request "f(x): ",f(x)
Request "a: ",a
Request "b: ",b
Request "n: ",n
Local w,i,s:0→s
b-a
n
→w
For i,1,n
s+w⋅f(a+i⋅w)→s
EndFor
Disp "Area≈",s
EndPrgm
Middle Riemann Sum
mram
Define mram()=
Prgm
Request "f(x): ",f(x)
Request "a: ",a
Request "b: ",b
Request "n: ",n
Local w,i,s:0→s
b-a
n
→w
For i,0.5,n
s+w⋅f(a+i⋅w)→s
EndFor
Disp "Area≈",s
EndPrgm
Trapezoidal Sum
trapsum
Define trapsum()=
Prgm
Request "f(x): ",f(x)
Request "a: ",a
Request "b: ",b
Request "n: ",n
Local w,i,s:0→s
b-a
n
→w
For i,0.5,n
s+0.5⋅w⋅(f(a+i⋅w)+f(a+i⋅w+w))→s
EndFor
Disp "Area≈",s
EndPrgm
Simpson's Rule Sum
simpsum
Define simpsum()=
Prgm
Request "f(x): ",f(x)
Request "a: ",a
Request "b: ",b
Request "n: ",n
Local w,i,s:0→s
b-a
n
→w
For i,0,n-1
s+w/3⋅(f(a+i⋅w)+f(a+i⋅w+w))→s
EndFor
For i,1,n-1,2
s+2⋅w/3⋅f(a+i⋅w)→s
EndFor
Disp "Area≈",s
EndPrgm