Worked example: Chain rule with table