Using Maple to check partial derivatives\302\251 Mike May, S.J., 2006 - maymk@slu.eduEdited by Russell Blyth - blythrd@slu.eduWe can use Maple to compute derivatives for us, thus letting us check our hand computations. To show how to do this we first define a function.f := (x,y) -> x^2+3*x*y+5*x^3+2*sin(exp((y+1)/y^2));We can then find a partial derivative with the diff command.fx := diff(f(x,y),x);We can take second derivatives by either taking the partial of the partial, or by using diff with two x's.fxx := diff(f(x,y),x,x);
fxxA := diff(fx,x);Third partials work much the same wayfxxx := diff(f(x,y),x,x,x);
fxxxA := diff(fxx,x);
fxxAx := diff(fxxA,x);With our function we can also take the partial derivative with respect to y.fy := diff(f(x,y),y);This is messy enough that we would like to see a worked solution rather than just the answer.For that we load the Student[Calculus1] package and use the DiffTutor command.with(Student[Calculus1]);TutorAnswer := DiffTutor(f(x,y),y);TutorAnswer;To work with the right hand side of TutorAnswer we use the rhs command.Fy := rhs(TutorAnswer);This lets us find mixed partials.Fyx := diff(Fy,x);
fyx := diff(f(x,y),y,x);LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2JVEhRicvJSdpdGFsaWNHUSV0cnVlRicvJSxtYXRodmFyaWFudEdRJ2l0YWxpY0Yn