Taylor Series Expansion Example Report
This is a text report generated for the Taylor Series Expansion example. All objects, notes, formulas and formula inputs were turned on and the report was generated with tabs.
The order the objects are listed in is determined by their position on the diagram, with the leftmost objects first and in the case of a tie, from the top down.
: Taylor Series Expansion Notes: Tap here first... Series expansion is a common mathematical tool for approximating functions that cannot be directly calculated. This example will show how Math Minion's matrix object can be used to easily implement a series expansion, specifically a Taylor series to calculate e^x and sin(x). See the notes for each of the objects. Expression: Root.x Notes: Just an arbitrary value for the functions to work on. Formula: 2 Unit: Fraction 1 1 2.00000 Matrix: Root.taylorE Notes: An exponential function e^x can be represented by the Taylor series: e^x = sum from n=0 to infinity of: x^n / n! The terms of this summation, except for n=0, are represented in this matrix as a column calculated by the formula x^{row}/{factorial {row}} which is assigned to the column header cell of column 1. The function {row} will return the number of each row and thus represents n starting from 1 rather than 0. This means we still have to add the n=0 term, which is just 1, when we sum the terms. The number of terms is set by setting the number or rows in the matrix. Input Sources: x Cell Formulas: 0_0: x^{row}/{factorial {row}} Unit: Fraction 1 1 2.00000 2 2.00000 3 1.33333 4 0.66667 5 0.26667 6 0.08889 7 0.02540 8 6.349206e-03 9 1.410935e-03 10 2.821869e-04 Expression: Root.sumE Notes: Using the sum function with TaylorE as the argument will sum all the terms of the expansion except for the n=0 term. The value of this term is just 1, and it is added to the function for a formula: 1+{sum taylorE} Input Sources: taylorE Formula: 1+{sum taylorE} Unit: Fraction 1 1 7.38899 Expression: Root.diffE Notes: Math Minion has an e to the x function, so we can easily check the accuracy of our approximation with the formula: {exp x} - sumE Try altering the number of terms in the expansion to see how that affects the accuracy. This is done by just changing the number of rows in the TaylorE matrix object. Input Sources: sumE x Formula: {exp x} - sumE Unit: Fraction 1 1 6.138994e-05 Matrix: Root.rowE Notes: In order to plot the convergence as the number of terms increase, the formula for the column in this matrix: 1+{sum taylorE[1:{row}]} Is similar to the one for sumE, but it uses the range operator : and the index operators [] to sum the first n rows of taylorE. Note that the number of rows for this matrix is set to the formula: {nrows taylorE} so that it is always the same size as taylorE. Input Sources: taylorE Cell Formulas: 0_0: 0 0_1: 1+{sum taylorE[1:{row}]} Unit: Fraction 1 1 3.00000 2 5.00000 3 6.33333 4 7.00000 5 7.26667 6 7.35556 7 7.38095 8 7.38730 9 7.38871 10 7.38899 Graph/Table: Root.Plot Notes: This plots the sum to n of the taylorE terms, as calculated by rowE, versus n as calculated by the formula: 1:{nrows taylorE} Note that term 0, which would be 1, is not plotted. Input Sources: rowE taylorE 1:{nrows taylo rowE Fraction Fraction 1.00000 3.00000 2.00000 5.00000 3.00000 6.33333 4.00000 7.00000 5.00000 7.26667 6.00000 7.35556 7.00000 7.38095 8.00000 7.38730 9.00000 7.38871 10.00000 7.38899 Matrix: Root.taylorSine Notes: This follows the same procedure as taylorE, but uses the formula: x^(2*{row}+1) * -1^{row}/{factorial 2*{row}+1} to calculate the Taylor expansion terms for sin(x), which are: ((-1)^n) * x^(2n+1) ------------------------- (2n+1)! Input Sources: x Cell Formulas: 0_0: x^(2*{row}+1) * -1^{row}/{factorial 2*{row}+1} Unit: Fraction 1 1 -1.33333 2 0.26667 3 -0.02540 4 1.410935e-03 5 -5.130672e-05 Expression: Root.sumSine Notes: In this case the n=0 term is just x, which is added to the sum of their other terms calculated by taylorSine. Input Sources: taylorSine x Formula: x+{sum taylorSine} Unit: Fraction 1 1 0.90930 Expression: Root.diffSine Notes: Calculates the difference between the approximation and the built in sine function. Input Sources: sumSine x Formula: {sin x}-sumSine Unit: Fraction 1 1 1.290863e-06