TI-84/nspire BASIC Programs

Newton's Method

    PROGRAM:NEWTON
  1. :Input "X0:",A
  2. :Input "N:",N
  3. :For(B,1,N)
  4. :A-Y1(A)/nDeriv(Y1,X,A)→A
  5. :Disp A
  6. :End

Average Value

    PROGRAM:AVEVAL
  1. :Input "A:",A
  2. :Input "B:",B
  3. :Disp fnInt(Y1,X,A,B)/(B-A)

Slope of a Polar Function

    PROGRAM:PolarS
  1. :Input "θ:",θ
  2. :nDeriv(r1,θ,θ)→D
  3. :(Dsin(θ)+r1cos(θ))/(Dcos(θ)-r1sin(θ))→S
  4. :Disp S

Left Riemann Sum

    PROGRAM:LEFTSUM
  1. :Input "A:",A
  2. :Input "B:",B
  3. :Input "N:",N
  4. :(B-A)/N→W
  5. :0→S
  6. :For(C,0,N-1)
  7. :WY1(A+C*W)+S→S
  8. :End
  9. :Disp S

Right Riemann Sum

    PROGRAM:RIGHTSUM
  1. :Input "A:",A
  2. :Input "B:",B
  3. :Input "N:",N
  4. :(B-A)/N→W
  5. :0→S
  6. :For(C,1,N)
  7. :WY1(A+C*W)+S→S
  8. :End
  9. :Disp S

Middle Riemann Sum

    PROGRAM:MIDSUM
  1. :Input "A:",A
  2. :Input "B:",B
  3. :Input "N:",N
  4. :(B-A)/N→W
  5. :0→S
  6. :For(C,0.5,N)
  7. :WY1(A+C*W)+S→S
  8. :End
  9. :Disp S

Trapezoidal Sum

    PROGRAM:TRAPSUM
  1. :Input "A:",A
  2. :Input "B:",B
  3. :Input "N:",N
  4. :(B-A)/N→W
  5. :0→S
  6. :For(C,0,N-1)
  7. :W/2(Y1(A+C*W)+Y1(A+C*W+W))+S→S
  8. :End
  9. :Disp S

Simpson's Rule Sum

    PROGRAM:SIMPSUM
  1. :Input "A:",A
  2. :Input "B:",B
  3. :Input "N:",N
  4. :(B-A)/N→W
  5. :0→S
  6. :For(C,0,N-1)
  7. :W/3(Y1(A+C*W)+Y1(A+C*W+W))+S→S
  8. :End
  9. :For(C,1,N-1,2)
  10. :2W/3Y1(A+C*W)+S→S
  11. :End
  12. :Disp S

TI-84 Functions

Function Where can I find it? What does it do?
θ X,T,θ,n Simply the independent variable of a polar function. Make sure to put your calculator in polar mode by pressing MODE+POL
Input PRGM+I/O+1 Displays text then accepts input for a variable such as A.
For( PRGM+4 Repeats the code between For( and End while setting the first variable to values in the provided range.
Y1 VARS+Y-VARS+1 Accesses the function labeled Y1.
r1 VARS+Y-VARS+3 Accesses the function labeled r1.
nDeriv( MATH+8 Approximates the derivative of a function at a value.
fnInt( MATH+9 Approximates the antiderivative of a function at a value
Disp PRGM+8 Displays a number or variable on the screen.
STO> Stores a number or text inside of a variable.