Section 14.5 (6th edition)

Example 1: Find the first derivative of z = x^2*y+3*x*y^4, x=sin(2*t), y=cos(t), at t=0.
Firstly we "kill" all the earlier dependency. Secondly x and y "depends" on t.

kill(t,x,y);

z: x^2*y+3*x*y^4;

diff(z);

depends([x,y],t);

dz: diff(z,t);

g(t) := sin(2*t);

dx: diff(g(t),t);

h(t) := cos(t);

dy: diff(h(t),t);

dz: dz, x=g(t), y=h(t), diff(x,t)=dx, diff(y,t)=dy;

dz, t=0;

Or, you can substitute x and y with sin(2*t) and cos(t) from the beginning, and differentiate it.

z: x^2*y+3*x*y^4, x=sin(2*t), y=cos(t);

dz: diff(z,t);

dz, t=0;

Example 3: Find the first derivative of z = exp(x)*sin(y), x=s*t^2, y=s^2*t

z: exp(x)*sin(y), x=s*t^2, y=s^2*t;

diff(z,s);

diff(z,t);

Example 8: Find dy/dx for the implicit equation x^3 + y^3 = 6*x*y

F: x^3 + y^3 - 6*x*y;

-diff(F,x)/diff(F,y);

ratsimp(%);

*Exercise 2: Find the first derivative of z = cos(x+4*y), x=5*t^4, y=1/t

z: cos(x+4*y);

depends([x,y],t);

dz: diff(z,t);

dz, x=5*t^4, y=1/t, diff(x,t)=diff(5*t^4,t), diff(y,t)=diff(1/t,t);

It is much simpler to calculate the derivative directly.

z: cos(x+4*y), x=5*t^4, y=1/t;

diff(z, t);

*Exercise 6: Find the first derivative of
w = log(sqrt(x^2+y^2+z^2)), x=sin(t), y=cos(t), z=tan(t)

w: log(sqrt(x^2+y^2+z^2)), x=sin(t), y=cos(t), z=tan(t);

w: trigsimp(w);

diff(w, t);

*Exercise 8: Find the first partial derivatives of
z = asin(x-y), x=s^2+t^2, y=1-2*s*t

z: asin(x-y), x=s^2+t^2, y=1-2*s*t;

diff(z, s);

diff(z, t);

*Exercise 28: Find dy/dx for the implicit equation
y^5 + x^2*y^3 = y*exp(x^2) + 1

F: y^5 + x^2*y^3 - y*exp(x^2) - 1;

-diff(F,x)/diff(F,y);

*Exercise 32: Find the first partial derivative of z with respect to x and y for
the implicit equation x*y*z = cos(x+y+z)

kill(x,y,z);

F: x*y*z - cos(x+y+z);

-diff(F,x)/diff(F,z);

-diff(F,y)/diff(F,z);

**Exercise 49 (8th edition): Assignment No.4 4(f); Part 2
First, we "kill" all the earlier dependency. Second, we must inform that z "depends" on x and y
(that is, z is a function of x and y), and that x and y "depends" on r and s.

kill(r,s,x,y,z);

depends(z,[x,y]);

depends([x,y],[r,s]);

zr: diff(z,r);

zs: diff(z,s);

We introduce DD to replace the partial derivative symbol diff(x,r)
with actual derivative diff(r*cos(s),r) when x = r*cos(s).

DD: [diff(x,r)=diff(r*cos(s),r), diff(y,r)=diff(r*sin(s),r),
     diff(x,s)=diff(r*cos(s),s), diff(y,s)=diff(r*sin(s),s)];

Prove the formula 1(a) by applying the chain rule:

EQR: zr^2+(zs/r)^2, DD;

trigsimp(EQR);

**Exercise 54 (8th edition; continue from 49): Assignment No.4 4(f); Part 1.

zr: zr, DD;

zs: zs, DD;

Find the second-order partial derivative: Recall Clairaut's theorem!

zrs: diff(zr, s);

zrs: zrs, DD, expand;

zsr: diff(zs, r);

zsr: zsr, DD, expand;

zrs - zsr;

**Exercise 55 (8th edition; continue from 54): Assignment No.4
Here we prove the formula 4(f) Part 3

zrr: diff(zr,r);

zrr: zrr, DD, expand;

zss: diff(zs,s);

zss: zss, DD, expand;

EQR: zrr + zss/r^2 + zr/r, expand;

trigsimp(EQR);

**Exercise 50 (8th edition): Assignment No.4: 4(g)
First, we "kill" all the earlier dependency. Second, we must inform that z "depends" on x and y
(that is, z is a function of x and y), and that x and y "depends" on s and t.

kill(s,t,x,y,z);

depends(z,[x,y]);

depends([x,y],[s,t]);

We introduce DD to replace the partial derivative symbol diff(x,s)
with actual derivative diff(exp(s)*cos(t),s) when x = exp(s)*cos(t).

DD: [diff(x,s)=diff(exp(s)*cos(t),s), diff(y,s)=diff(exp(s)*sin(t),s),
     diff(x,t)=diff(exp(s)*cos(t),t), diff(y,t)=diff(exp(s)*sin(t),t)];

Prove the formula 4(g) part 1 by applying the chain rule:

zs: diff(z,s);

zt: diff(z,t);

EQR: exp(-2*s)*(zs^2+zt^2), DD;

trigsimp(EQR);

**Exercise 52 (8th edition; continue from 50): Assignment No.4: 4(g) part 2

zs: zs, DD;

zss: diff(zs,s);

zss: zss, DD, expand;

zt: zt, DD;

ztt: diff(zt,t);

ztt: ztt, DD, expand;

EQR: exp(-2*s)*(zss + ztt), expand;

trigsimp(EQR);

Note that the proof of 4(g) part 2 uses Clairaut's theorem, and that Maxima knows about it.

diff(z,x,1,y,1);

diff(z,y,1,x,1);