fixing chap18 to work with new coefficient ordering.

This is just a minor fix to chapter 18. Perhaps it is best if @trefethen can have a look at this and merge it.