#1: " ----------[ D e r i v e ]---------- " User
#2: " ---------- Initialization ---------- " User
#3: " ---------- Programming and Miscellaneous ---------- "User
User
#4: " Define a simple differentiation operator. This is most easily
done with "
User
#5: " pattern matching. Here is an expression that we ultimately
hope to be able "
#6: " to differentiate. " User
2 3
#7: expr := a + b*u + c*u + d*(e*u + f) + g*u*EXP(h*u) User
User
#8: " Start by making the derivative of a sum to be the sum of the
derivatives. "
#9: " Add the product rule. " User
User
#10: " Now, make the derivative of a constant (with respect to x)
zero. "
User
#11: " Define the derivative of x with respect to x to be one. "
#12: " Enter the generalized power rule. " User
#13: " To get that last term, add in the exponential rule. "User
User
#14: " Now, try it out! => b + 2 c u + 3 d e (e u + f)^2 + g exp(h u)
(1 + h u) "
#15: "diff(expr, u)" User
#16: " ---------- Quit ---------- " User