# Experimenting with CAS – Chain Rule

Discovering takes good data and a computer algebra system (CAS) can provide good data. You can do “experiments” by producing the results with a CAS and looking for patterns. As an example let’s look at how you and your students might discover the chain rule for derivatives.

One of the ways you could introduce the chain rule is to ask you class to differentiate something like (3x + 7)2. Not knowing about the chain rule, just about the only way to proceed is to expand the expression to 9x2 + 42x + 49  and differentiate that:  18x + 42 and then factor 6(3x + 7). Then you show how this relates to the power rule and where the “extra” factor of 3 comes from differentiating the (3x + 7).  You really cannot a much more complicated example, say a third or fourth power, because the algebra gets complicated very fast.

Or does it?

Suggest your students use a CAS to do the example above this time using the third power. The output might look like this:

But even better: what we want is just the answer. Who cares about all the algebra in between? Try a few powers until the pattern become obvious.

Now we have some good data to work with. Can you guess the pattern?

Nor sure where the “extra” factor of 3 comes from? Try changing the 3 in the original and keep the exponent the same.

Now can you guess the chain rule? See if what you thought is right by changing only the inside exponent.

Then you can try some others:

You can count on the CAS giving you the correct data (answers). Do enough experiments until the chain rule pattern becomes clear.

But I think the big thing is not the chain rule, but that the students are learning how to experiment in mathematics situations. In these we started by changing only the outside power. Then we kept the power the same power and changed the coefficient of the linear factor. Then we changed the power inside power, each time seeing if our tentative rule for differentiating composite function was correct and adjusting it if it was not. Finally we tried a variety of different expressions. You change things. Not big things but little things. You don’t jump from one trial to something very different, only something a little different.

You can do the same thing for the product rule, the quotient rule, maybe some integration rules and so on. You have accomplished your goal when the students can produce the data they need without your suggestions.

But be aware: sometimes this can lead to unexpected results. Does the pattern hold here?

Or here?

Hint: $\frac{7}{3.2}=2.1875$  and $3{{\left( 3.2 \right)}^{3}}=98.304$