Mathematica Labs | Denis Shubleka

Subject: Calculus

Topic: Chain Rule

Goal: Use Mathematica to find partial derivatives of compositions of several variables.

Task 1

In Mathematica we define three function z(x, y), x(s, t), and y(s, t).

z[x_,y_]:=E^(x+2y);
x[s_,t_]:=s/t;
y[s_,t_]:=t/s;

To compute the partial derivatives ((∂z)/(∂t)) and ((∂z)/(∂s)) ,  we use the derivative command.

D[z[x[s,t],y[s,t]],t]
D[z[x[s,t],y[s,t]],s]

To evaluate the partial derivative  ((∂z)/(∂s)) ,  which we computed last, at {s=1, t=2} use the substitution rule:

%/.{s->1,t->2}

Related Exercises/Notes:

1. Use the Chain Rule to find the indicated partial derivatives. Use Mathematica to confirm your answers by first finding the derivative(s) and then evaluating it.

a) P=(Sqrt[(u^2)+(v^2)+(w^2)]), u=x (e^y), v=y (e^x),w=(e^(x y)); (( ∂P)/(∂x)),(( ∂P)/(∂y)) when x=0, y=2.

b) u=x (e^(t y)), x=(α^2)β, y=(β^2)γ, t=(γ^2)α; (( ∂u)/(∂α)),(( ∂u)/(∂β)),(( ∂u)/(∂γ)) when α=-1, β=2,γ=1.

ap-calc.github.io