Appendix E: A Detailed Look at f 251
Since you’re evaluating this integral numerically, you might think (naively
in this case, as you’ll see) that you should represent the upper limit of
integration by 10
99
—which is virtually the largest number you can key
into the calculator. Try it and see what happens.
Key in a subroutine that evaluates the function f(x) = xe
−x
.
| ¥
000-
Program mode.
´ b 1
001-42,21, 1
”
002- 16
'
003- 12
*
004- 20
| n
005- 43 32
Set the calculator to Run mode. Then set the display format to i 3 and
key the limits of integration into the X- and Y-registers.
| ¥
Run mode.
´ i 3
Sets display format to i 3.
0 v
0.000 00
Keys lower limit into Y-register.
“ 99
1 99
Keys upper limit into X-register.
´ f 1
0.000 00
Approximation of integral.
The answer returned by the calculator is clearly incorrect, since the actual
integral of f(x) = xe
−x
from 0 to ∞ is exactly 1. But the problem is not that
you represented ∞ by 10
99
, since the actual integral of this function from
0 to 10
99
is very close to 1. The reason you got an incorrect answer
becomes apparent if you look at the graph of f (x) over the interval of
integration: