Function Repository Resource:

ChainRule

See how to apply the chain rule for derivatives

Contributed by: Wolfram|Alpha Math Team
 ResourceFunction["ChainRule"][f,x] applies the chain rule for computing the derivative of f with respect to x, returned as an inactive result.

Details

ResourceFunction["ChainRule"] accepts the following options:
 "PrintRule" False print a statement of the chain rule "PrintNapkin" False print the side "napkin" work needed for computing components of the chain rule “InactiveInnerDerivatives" False keep the derivatives of the components inactivated

Examples

Basic Examples (1)

See how to apply the chain rule to compute the derivative of sin(x2) with respect to x:

 In[1]:=
 Out[1]=

Options (3)

InactiveInnerDerivatives (1)

Setting "InactiveInnerDerivatives" to True inactivates the derivatives of the factors of the chain rule, represented with a replacement rule:

 In[2]:=
 Out[2]=

PrintNapkin (1)

Setting "PrintNapkin" to True prints a grid with the side "napkin" work needed to apply the chain rule (i.e., identifying and computing the derivatives of the inner and outer functions):

 In[3]:=
 Out[3]=

PrintRule (1)

Setting "PrintRule" to True prints a general statement of the chain rule for derivatives:

 In[4]:=
 Out[4]=

Publisher

Wolfram|Alpha Math Team

Version History

• 2.0.1 – 03 April 2023
• 2.0.0 – 23 March 2023
• 1.0.0 – 10 January 2023

Author Notes

To view the full source code for ChainRule, evaluate the following: