Microworld: Taylor Polynomials : (All in One)
Click the Hyperlink above to visit the Microworld.
Author: James White

In this nine-page Microworld, you will have the opportunity to explore and experiment with four topics from Calculus:

This Microworld encourages you to experiment by making up your own examples. There are few built-in problems or solutions. Mathwright will simply attempt to "figure out" the solution to each problem that you pose.

For example, on the last page, you will be able to check various functional (or differential) identities by asking your own questions. You will generally get exact rational results if you enter fractions in the form: num/den Also, always use the * (asterix) to indicate multiplication.

If you right-click on screen objects, you will find a variety of options to experiment with. The in-button on the Graph2D gadget allows you to zoom-in on any rectangle. Just click in and drag the cursor over the rectangle to zoom on. For detailed guidance, see the Interaction Instructions below the Portal.

1) Graph a function and its derivatives

In this exercise, enter an expression in variable t in the yellow field for the function f(t). Next, press the draw buttom to draw the graph of your function. Press the next button to iterate. Press the clear button to start over.

2) Taylor Polynomial Approximations to functions

On the next page, type an expression in the variable t in the yellow field where you will find sin(t) initially. Click Draw to graph the function of t that you have defined. Remember, use an asterix (*) to represent multiplication, and represent fractions in the form num/den.

Each time you click the next term button, the next higher-order Taylor polynomial approximation at 0 will be printed in the Pn(t)= field. You may of course calculate polynomial approximations at different points from 0 by translating the independent variable, that is, to calculate at a, write f(t+a).

In the sin(t) example, you may want to substitute 0 for all occurrences of sin(0) and 1 for all instances of cos(0). Other examples may be treated similarly. For any such substitutions, place them in the yellow Substitute...For... fields, and press Enter in either of those fields. Each time you do this, a new substitution is added to the list. When you press Reset, the screens will be cleared, and these substitutions will be undone, in preparation for the next example.

If you have a polynomial of t that you would like to use later, you may save it, and assign it a name on the last exploration page, Experiment with the Polynomials. Do this before you Reset.

3) Abstract Taylor Series

Often, transcendental functions are defined as infinite "Taylor" series on their domain of convergence. For example, if we define an "abstract" function, say Mysine(t), by the rule Mysine(t) = Mysine(t) for all t, then the evaluation of Mysine will not yield a number, but will yield the entire calling expression.

So Mysine(0) = Mysine(0), Mysine(pi) = Mysine(pi), and so on. In general, an abstract function is a function of a single variable, and in this Microworld, we use the variable t. It may only be evaluated (if at all) at a finite number of points that we stipulate. But it may be combined algebraically with other abstract functions and numbers or algebraic expressions, and it may be differentiated with respect to its single variable.

This is useless for graphing, but suppose we define another abstract function called Mycosine(t) in a similar way: Mycosine(t) = Mycosine(t). And then suppose that we stipulate 4 things:

Then we have everything we need to calculate the Taylor polynomial expansion of Mysine(t) (or of Mycosine(t)) at the point t = 0. Recursive conditions like these are often all we know about a transcendental function, and often, they are enough to determine infinite series representations of them as Taylor series, at least on their domain of convergence.

On the next page, we will experiment with this idea. Use the Control Panel to enter Data:

1] The first thing to do is Declare all the abstract function names. This informs the system that these are the names of functions that we cannot evaluate, but that we can differentiate and otherwise manipulate in an abstract way. You must do this first before moving on to manipulate them. Type each name in the first yellow name field and press ENTER.

Do this for each name that you intend to use.

2] After declaring the names of your abstract functions, you should say what their derivatives are. These will all be functions of a single variable t. Here, you must supply two names: the name of the function whose derivative you are defining, and the name of the function which will be the derivative of that. You type those pairs of names, one at a time, in the yellow name fields:

There may be a problem here. You may want to specify some algebraic combination of abstract or regular functions as derivative. For example, you might want to say The derivative of Mycosine(t) is -Mysine(t) in this example. The solution to that problem brings us to the second step:

3] Define an abstract function as an algebraic combination of other abstract functions and of regular functions. For that, enter the name in the first yellow function name field, and the definition (an algebraic expression in t) in the second yellow definition field:

Once you have made the definition, you may use the name in step 3. In fact, you may do step 3 first, anticipating that you will specify the definition later, in this step. At this point, you may calculate the Taylor series, as in the previous exercise. Click Initialize to start things off. Each time you click Term, the next higher-order Taylor polynomial approximation at 0 will be printed in the Pn(t)= field. If you do that here, you will see after a few steps:

This may be O.K. for your purposes, but obviously, expressions like this cannot be evaluated or graphed, because the system does not know in principal what mysine(0) and mycosine(0) are. How could it? Therefore, you may use the substitute option discussed in the previous exercise to inform it what these values should be.

In the Mysine(t) example, you may want to substitute 0 for all occurrences of Mysine(0) and 1 for all instances of Mycosine(0) For any such substitutions, place them in the yellow Substitute...For... fields, and press Enter in either of those fields. Each time you do this, a new substitution is added to the list. When you press Reset, the screens will be cleared, and these substitutions will be undone, in preparation for the next example. If you make those substitutions, you will see:

If you have a polynomial of t that you would like to use later, you may save it, and assign it a name on the last exploration page, Experiment with the Polynomials. As in the previous exercise, do this before you Reset.

4) Experiment with the polynomials

On the next page, you may explore these Taylor polynomial approximations by combining algebra with graphics.

First of all, each time you compute a polynomial, Pn(t), that you would like to experiment with here, then before you Reset, do the following. The current polynomial will appear in the Pn(t) = field. You may actually modify it if you like. You must create a new function of t in order to use it later.

In the Name this function of t field, type the name you plan to use. Initially, p is provided. Do not use f, g or h since these are used internally. Otherwise names can be arbitrary strings. But of course, the system will not let use the name of a built-in function. Once you have chosen the name, (say myfun), then myfun(t) represents the polynomial expression.

Any legal algebraic form involving myfun(t) may later be used for algebra, differentiation, or graphing. For example, if you calculate a Taylor Polynomial approximation to ln(t) at 1 by entering ln(1+t) on the previous page, say to fifth order, the system substitutes 0 for ln(1), and you will see the polynomial:

Then set this polynomial to p, for example.

One knows that

If you place

in the Evaluate Expression field, you will see

This expression, as a polynomial in X and Y, vanishes to homogeneous degree 5, as is to be expected.

In a similar way, you may check the Pythagorean identity, or other identities of transcendental functions. Actually you may evaluate any algebraic form you like in this fashion.

Of interest here, is the system Partial Differentiation Operator, d: d(expr, var1, var2, ...varn) returns the nth partial derivative of expr with respect to the variables var1, var2, ...varn

And you may define your own functions (of t) by typing the expression in t in the Pn(t)= field, and then by naming the function as described above. Finally, you may graph expressions in t by typing them in the Graph Expression in t field, then pressing Enter.

Return to the listing of MathwrightWeb Microworlds


- James E. White, Ph.D. , Library Director,
author of this website, Mathwright 2000, MindScapes,
MathwrightWeb, and Mathwright32

 

Microworld Title Page:
Taylor Polynomials
Individual and Institutional Members may sign in. Click here to join the Library

Requires the Java MathwrightWeb ActiveX Control to read in your Browser.
For proper viewing, be sure to use Version 2.006 or later, dated July, 25, 2002
Download free MathwrightWeb to view Microworlds in your browser, then press


Browser problems? No Problem! Download the free Mathwright32 Reader, then press

For proper viewing, be sure to use Version 2.006 or later, dated July, 25, 2002

Once you download our free Mathwright32 Reader above, then simply click Get This Microworld, and it will be downloaded to your machine and installed in a directory there. You may find it whenever you want to view it, by going to the Start, Programs, Mathwright32 Reader menu.

To visit our Microworlds in your browser, it must be able to read ActiveX controls. Microsoft Internet Explorer 4.0 Browser (or later) is so equipped. You should check that the Security Settings under Tools, Internet Options, Security for the Internet, Custom Level has:

Note: This Microworld requires Version 2.006 or later, dated July, 25, 2002. Please download and use a player (MathwrightWeb or Mathwright32 Reader) at least as late as that.