5 SCREEN 12 10 PRINT "Derivative is "; CHR$(127); "y/"; CHR$(127); "x as "; CHR$(127); "x->0" 15 PRINT "Derivative for "; CHR$(251); "(1+(x^2))=x/"; CHR$(251); "(1+(x^2))" 30 PRINT "Program calculates the slope y1-y2/x1-x2" 31 PRINT "which for small changes of x and y" 32 PRINT "should be close to the derivative" 40 DEFDBL A-Z 50 a = 2 60 b = 1.99999# 70 c = .00001# 80 x = a 90 GOSUB 300 100 e = y 120 x = b 130 GOSUB 300 140 f = y 141 j = a + c 142 x = j 143 GOSUB 300 144 k = y 150 g = (e - f) / c 151 l = (k - e) / c 152 m = (g + l) / 2 160 PRINT "Slope at x=2 "; CHR$(127); "x=.00001 is"; m 161 i = 2 / ((5) ^ (1 / 2)) 162 PRINT "The derivative at x=2 is "; i 170 SYSTEM 300 y = (1 + (x ^ 2)) ^ (1 / 2) 310 RETURN