Extend symbolic-differentiation program to handle exponentiation