Students and Mathematica

Edited by Leon Hall
Department of Mathematics and Statistics
University of Missouri-Rolla
Rolla, MO  65401-0249
lmhall@umr.edu

Everyone has heard stories about professors who put problems they themselves have not been able to solve on exams, hoping one of their students will be able to help them.  My favorite is the one where the professor made up a Ph.D. comprehensive exam for a student consisting of five unsolved problems in topology.  After the exam, the student was telling one of his friends what it was like, and said, "That was a really tough exam - I was only able to get three of the problems!".  The punch line is that he really did get three problems right.  If this isn't a true story, it ought to be.

The student paper in this issue contains the answer to a Mathematica  problem which I have been asking various people about for some time.  In the paper, Scott McMaster, of the University of Nebraska-Lincoln, develops a technique using Taylor series to study solutions of nonlinear boundary-value problems.  One of the things he wanted to do was use Mathematica  to generate Taylor polynomials of certain degrees for functions of two or more variables.  The trouble is, Mathematica  will not do this directly because of the way the Series command works.  Here is an example:

f[x_, y_] = Normal[Series[E^(x+y) Cos[x - y], 
							{x, 0, 4}, {y, 0, 4}]]

Notice what happens here.  Suppose we wanted, say, the 4th degree Taylor polynomial.  The above command produces an 8th degree polynomial, so some of the terms must be eliminated.  On the other hand, if we wanted the 8th degree Taylor polynomial, not all the terms are given by the above command, and the missing ones must be added.

Scott has developed some Mathematica  commands to deal with polynomials in two variables. These are in the "Mathematica  Tools" section of the paper, and should be of interest to anyone who works with Taylor series for functions of two variables, even those (unenlightened souls?) not especially interested in nonlinear boundary-value problems .

Scott's drop command will take a polynomial produced as above and get rid of unwanted higher degree terms.  (Note:  His definition requires that the variables be z1 and z2, a restriction which probably can be eliminated without much trouble.)  Here is the 4th degree Taylor polynomial for the function considered above.

drop[f[z1,z2], 4]

Scott also defines a command called extract, which is similar to the built-in command Coefficient for polynomials in two variables.  It will return a list of the coefficients of all terms of a given degree in a two-variable polynomial.  The list is ordered corresponding to descending powers of the first variable, or, equivalently, ascending powers of the second variable.

extract[f[z1, z2], 4]

Thanks for the help, Scott!