



There
are two basic types of functions.



One
type is called algebraic functions. 


Stuff
like ... 





F(X)
= 3X^{5}  2X^{3} + X^{2}  32 





The
other type is called transcendental functions. 


Stuff
like ... 





F(X)
= cos23X






F(X)
= e^{X} 





F(X)
= ln(2X) 





Doing
math with algebraic functions, 


is
usually a lot easier than math with transcendental functions. 


Some
math types realized that if they could find 


algebraic
functions that graphed like transcendental functions, 


they
might be able to do math with them instead. 


That
would make calculations easier. 





Suppose
we have some curvy transcendental function ... 











Now
we want to find an algebraic function that looks just like it. 





We
start with a straight line that we "tack" 


to
the transcendental function at some X value. 


Call
it "a", that is, X = a. 


We
make the slope of the straight line 


the
same as the slope of the transcendental function 


at
the X value. 


Remember,
the slope is the derivative. 











The
first question is, 


what
is the slope of the straight line? 





Back
in algebra, you probably saw something 


called
the point slope equation for a line. 


It looks
like this ... 





Y  Y_{1}
= m(X  X_{1}) 





We
are going to use this with a couple of changes of symbols. 


The
slope of the straight line "m", 


is
also the derivative of the transcendental function 


at
the point where X = a, that means m = F'(a). 


The
coordinates (X_{1}, Y_{1}) are any point on the
line, 


so
we can say X_{1} = a and Y_{1} = F(a). 


To
recap ... 






m 
= F'(a) 






X_{1} 
= a 






Y_{1} 
= F(a) 







Doing
the substitution we get ... 





Y  Y_{1}
= m(X  X_{1}) 





Y  F(a) =
F'(a)(X  a) 





Solving
this equation for Y, we get ... 





Y = F(a) +
F'(a)(X  a) 





The
only place that Y and F(X)
are the same value 


is
at the point X = a. 











We
need to bend the straight line equation Y, 


to
match the scary function equation F(X). 





Swell,
how do we do it? 





We
do it by more terms to the "Y = " equation. 


The
second derivative tells us the concavity of the function 


so
this is a good place to start. 


That
is, with F'(a). 


We
need to multiply it by something that's derivative is (X  a). 


In
other words, the integral of (X  a) ... 











So
the next term we add is ... 











which
is usually written as ... 











This
makes the whole equation to here ... 











The
next term is the derivative of F''(X) 


multiplied
by the integral of ½(X  a)
^{2}. 


That
works out to be ... 











When
we have higher derivatives, 


we
sometimes write the exponents like F^{(3)}(X) 


rather
than F'''(X). 


Just
don't mistake that ^{(3) }for an exponent! 


F(X)
to the third power would be written (F(X))^{3}. 





Each
of these terms has bent the "Y" function 


closer
to the transcendental function. 











The
closer we are to the point X = a, 


the
closer the value of our substitute function is to our nasty
function. 





Writing
these terms in a slightly different, 


but
totally equal form might show you a pattern to them ... 








(in
case you forgot, 0! = 1) 





Each
term in this is ... 











These
terms can go on forever. 


Each
one would add little changes to the graph of the substitute
function. 


At
some point we have to say "Hey, enough is enough!" 


and
stop adding terms. 





The
question is, how do we know when to stop adding terms. 





After
we are past the first few terms, 


the
value of all of the remaining terms added together 


is
less than the value of the last term that we just added. 


For
example, if the 6th term adds .0005 to the function value, 


all
of the terms from the 7th and beyond will add less than that. 


If
you can live with an error of no more than .0005, 


6
terms is enough. 


If
you need to be more accurate, keep on adding terms 


until
the value of the last term that you add 


is
less than the amount of error that you can accept. 





Let's
try one ... 





Example: 





Find
the algebraic function that is approximately equivalent to ... 





F(X)
= e^{X} 





We
can choose any value that we want for a. 


The
error we get is smaller for X values close to a, 


but
we usually choose a value for a that is easy to calculate. 


a
= 0 is a good choice for anything except logs and tangents 


and
other equations where X = 0 is undefined. 


X
= 0 IS defined for e^{X},
so we can use it for a. 











So
... 











That
simplifies to ... 











We
can use this to evaluate e^{X} for any value of X. 


Just
substitute the value for X and add up the terms. 





For
Example ... 











The
last term we added was 0.0889 so our error can be no more than this. 


Actually,
e^{2} to 4 decimal places is 7.3891 so the error is only
0.0335. 





Let's
do another one ... 





Example: 





F(X)
= sinX






Again,
a = 0 is an easy value to use ... 





F(0)
= sin0 = 0 so that means F'(0)
= cos0 = 1






So
... 











As
you can see above, every other term equals zero. 


That
leaves us with ... 











So
sin(^{p}/4)
is approximately ... 











The
actual value of sin(^{p}/4)
is about .70711 to 5 digits. 


We
have an error of 0.0003. 


The
last term we added was .00249, 


so
we knew that the error would be no more than that. 





This
stuff may not seem too exciting, 


now
that we have big time calculators and Excel and what not. 





POP
QUIZ: 


How
do you think the calculators and Excel 


and
what not calculate the answers? 





We
could write these things using summation notation. 


In
fact, we almost did before when we discovered the pattern. 


The
full official summation notation is ... 











This
particular series gives good approximations of transcendental
functions. 





Here
are some of the more often used series, 


at
a = 0. 


( That
makes them McLaurin Series [Big deal eh?]) 











We
can find the integral or derivative of any of these functions 


term
by term to as much accuracy as we want. 





We
can find the product of any pair of functions 


by
multiplying them together term by term. 


Be
very careful about how much accuracy you need when you do this. 


Multiplying
n terms together from each of two functions, 


gives
you n ^{n}
terms. 


You
WILL be able to combine lots of terms after it's all multiplied out, 


but
in the mean time you will have a big mess. 





We
can divide one series by another using long division. 


Just
pick an accuracy level you want and divide. 





All
of these are called Taylor series. 


The ones
where a = 0 are called McLaurin series. 


(McLaurin
is a subgroup of Taylor) 





This
is OK and all, but what we really need are a set of general
rules 


that
tells us if a series that goes on forever adds up to some number 


and
what that number is, or infinity 





You'll
never guess what the next chapter is about! 





copyright 2005 Bruce Kirkpatrick 
