Monday, April 22, 2013
Constants and their Taylor coefficients
During the past week Jan has been working on a Taylor series-based method for solving ODE-IVPs as pert of the ongoing work to implement the C^1-Lohner solver. Midway into the implementation described in An Introduction to Automatic Differentiation by Corliss and Rall Jan decided to hand-execute the algorithm to have a case ready to test the implementation with. He chose the ODE x'' = -10, x(0) = 5, x'(0) = 0 and expected to obtain the polynomial solution as the first three terms of the computed expansion, and then zeroes from the fourth term and on but, to his surprise, the computation produced non-zero terms also after the third term. It turns out that Jan had forgotten to use the Taylor coefficients for the constant -10 in the field of the ODE, effectively equating x'' with a function whose every Taylor coefficient is -10, not just the zeroth one, with all the remaining ones being zero! When using the prescribed series the computation, of course, yielded the correct result.