Skip to content

Taylor Series

Oscar Veliz edited this page Jun 26, 2020 · 3 revisions

Taylor Series video

The video covering Taylor Series can be found at https://youtu.be/KJYauVgXA4E. Example code is given in Taylor.m file, written in GNU Octave. The code can be run online via Octave-Online or CodingGround (the latter does not always work). To run the program locally have Octave installed (https://www.gnu.org/software/octave/) then type octave --no-gui Taylor.m in the terminal in the directory where Taylor.m is saved or run it from within the Octave application by typing the command source("Taylor.m") or just Taylor. If running locally you will also need to install the symbolic package (refer to Householder's documentation page for instructions).

You can alter the values of a and n by changing the second and parameter in the plotTaylor function call. To change the function being approximated update the instruction func = "atan(x)" to any desired function (represented as a string). Other examples used in the video include "tan(x)", "sec(x)", "log(sec(x))", "log(tan(x/2+pi/4))", "asec(sqrt(2)*exp(x))", and "2*atan(tanh(x/2)". If the plot area is giving you difficulty then it is recommended that you change the numbers in limits which represent [-x,+x,-y,+y].

Reference links: