StepbyStep Differentiation George BeckThe builtin Mathematica operator D gives derivatives immediately without any intermediate steps. In this notebook the operators WalkD and RunD are defined to show each step so that a beginner can learn how to take derivatives. WalkD says what rule is used at each step, but RunD is in too much of a hurry for that. Differentiation rulesThese are all the rules for taking derivatives. Stepbystep differentiation with each step explainedThe defined function WalkD takes a derivative and tells you what rule it is using at each step. Expressions of the form d[y, x] mean dy/dx. Mathematica uses the command D[y, x] to take the derivative of y with respect to x without showing any intermediate steps. Example 1Example 2You can check the result with the builtin differentiation function D. Quiet stepbystep differentiation RunD does the same thing as WalkD without telling you what rule is being used at each step. Example 3Can you see which rules are being applied at each step? You can check with WalkD. Example 4This triple chain is a symbolic example. Do you see the pattern at the end? Can you predict what the derivative of a chain of four functions will look like? Stepbystep second derivativesYou can use WalkD and RunD twice (in any combination) to give the first derivative followed by the second derivative. You can also do the third derivative using triple combinations, and so on. Example 5Again, you can check this with the builtin differentiation operator. Singlestep differentiationWalkD and RunD do one step after another until the derivative is completely worked out. You can do a single step of a differentiation by using the differentiation rules. How to apply a ruleThis is the format for only a single step in taking the derivative of an expression. The slashdot (/.) means the rule will be used on the expression.
expression /. rule
In this example we substitute A for x. The differentiation rules have the arrows already inside them. Example 6If there is a sum first, use the linearity rule. LinearityRule is two rules in one, the first is for sums of functions and the second is for terms with a constant multiplier. Recall that in Mathematica % means the previous result. Now use the power rule. Example 7SpecificRules gives the derivatives of individual functions that are not combined in any way with other functions. Example 8You can do two steps at a time. Example 9The builtin operator D outputs derivatives immediately in one step. Here is the derivative done manually one step at a time. Example 10You can use all the rules together. After the first step you can continue with l until the derivative is finished, that is, until there is no more d in the expression. It is a good exercise to say what rule is being used at each step. ImplementationUsage messagesFunction definitionsThe rule d[x_, x_] is repeated intentionally. Drop the specific rules for generic cases. Apply specific rules last when applying all at once. Rule sets for applying the rules individually.
