SERIES - HP 48

Introduction
This program evaluates Taylor series of the form $\
sum\limits_{K=0}^N$CKXK  or  $\sum\limits_{K=0}^N$CK(X-A)K. It also compares that value to the corresponding function value, f(X).

If you have not used one of the programs posted on this website before, you should read through the information in the Intro to Programming section first.


The Program
Note: The main program, SERIES, will call a subprogram, SIGMA. All programs are given below.

<< "X" ":X:" INPUT
OBJ'X' STO
"N" ":N:" INPUT
OBJ'N' STO
0 'K' STO 0 'S' STO
SIGMA S "SERIES"TAG          
F EVAL "F(X)"TAG
{X N K S} PURGE>>
ENTER 'SERIES' STO {This stores the program under variable name SERIES.}
<<0 N FOR C FUNC EVAL
S + 'S' STO K 1 + 'K' STO
NEXT>>
ENTER 'SIGMA' STO {This stores the program under the variable name SIGMA}


Running the Program
 
You will need to enter an expression and the corresponding function into the variables FUNC and F, respectively. Follow the instructions in Intro to Programming if you have not done this before.
 
To test the program try the following:

Enter $\hbox{$X^{\hbox\
{K}}$}\
\over \hbox{K!}$ into FUNC and ex into F. Use X = 0.5,  N = 3.
 
Your answer will be
Series Value
1.6458333333
F(X) Value
1.6487212707