|
|
|
|
|
by crntaylor
4622 days ago
|
|
The typical approach is to provide overloaded versions of primitive functions (generally addition, multiplication, subtraction, division, powers, trig and hyperbolic trig functions, exponential and logarithm) for which you explicitly tell the program what the first N terms in the Taylor series are. The magic is that you also tell it how to compute Taylor series of function compositions, if the Taylor series of the functions being composed are already known - then any arbitrary function composed out the primitive functions can have its Taylor series computed automatically! For your example, the function 1/(1-x) is the composition of x -> -x
x -> 1+x
x -> 1/x
and so its Taylor series is already known as long as you have already defined negation, addition and reciprocation. |
|