# AMSC 460 / CMSC 460 Fall 2007

## Frequently Asked Questions for Homework 7

Question:
I should use a spline to approximate c(z), but how do I
approximate c'(z)?

Answer:
Use the derivative of the spline as the approximation.
This may require you to modify the program ppval, for example,
to return both function values and derivatives.

Question: (12/06)
How do I approximate the derivative of c?

Answer:
The function c is approximated by a cubic spline,
so c' should be approximated by the derivative
of the cubic spline. I advise modifying the ppval
function to return both the value of the spline
and the value of the derivative.
Alternatively, you can use Matlab's functions unmkpp and mkpp
to give you the coefficients so that you can construct the derivative.

Question:
(12/06)
How efficient should my program be?

Answer:
It shouldn't do orders of magnitude more computation than necessary.
For example, "spline" should be called only once.

Question:

Answer: