# Examples of Chain Rules Formulas with Maple

In the following problems compute the derivative with respect to the parameter t at the given values.

#### Problem1:

> z1 := x^2*y + 3*x*y^3; x := exp(t); y := sin(t); t0 := 0;

2          3
z1 := x  y + 3 x y

x := exp(t)

y := sin(t)

t0 := 0

 We can do this in several ways. First by just substituting back x and y as functions of t into the expression for z1. This is done automatically by maple,

2                2                         3                  2
2 exp(t)  sin(t) + exp(t)  cos(t) + 3 exp(t) sin(t)  + 9 exp(t) sin(t)  cos(t)

 An alternative form is to use the formula for the chain rule. We compute each part,

> x := 'x': y := 'y': z := x^2*y + 3*x*y^3; zx := diff(z,x); zy := diff(z,y);

2          3
z := x  y + 3 x y

3
zx := 2 x y + 3 y

2        2
zy := x  + 9 x y

> xt := diff(exp(t),t); yt := diff(sin(t),t);

xt := exp(t)

yt := cos(t)

 and the chain rule formula is,

> x := exp(t): y := sin(t): zt := 'zx'*'xt' + 'zy'*'yt';

zt := zx xt + zy yt

 at t=0 this simplifies to,

> answer := simplify( subs(t=0,zt) );