Using Maple To Check Partial Derivatives: F: (X, Y) - X 2+3 X Y+5 X 3+2 Sin (Exp ( (Y+1) /y 2) )
Using Maple To Check Partial Derivatives: F: (X, Y) - X 2+3 X Y+5 X 3+2 Sin (Exp ( (Y+1) /y 2) )
Mike May, S.J., 2006 - [email protected] Edited by Russell Blyth - [email protected] We 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. O f := (x,y) -> x^2+3*x*y+5*x^3+2*sin(exp((y+1)/y^2)); f := x, y /x2 + 3 x y + 5 x3 + 2 sin e (1) We can then find a partial derivative with the diff command. O fx := diff(f(x,y),x); fx := 2 x + 3 y + 15 x2 (2) We can take second derivatives by either taking the partial of the partial, or by using diff with two x's. O fxx := diff(f(x,y),x,x); fxxA := diff(fx,x); fxx := 2 + 30 x fxxA := 2 + 30 x (3) Third partials work much the same way O fxxx := diff(f(x,y),x,x,x); fxxxA := diff(fxx,x); fxxAx := diff(fxxA,x); fxxx := 30 fxxxA := 30 fxxAx := 30 (4) With our function we can also take the partial derivative with respect to y. O fy := diff(f(x,y),y); $ e y2 y3 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. O with(Student[Calculus1]); AntiderivativePlot, AntiderivativeTutor, ApproximateInt, ApproximateIntTutor, ArcLength, ArcLengthTutor, Asymptotes, Clear, CriticalPoints, CurveAnalysisTutor, DerivativePlot, DerivativeTutor, DiffTutor, ExtremePoints, FunctionAverage, FunctionAverageTutor, FunctionChart, FunctionPlot, GetMessage, GetNumProblems, GetProblem, Hint, InflectionPoints, IntTutor, Integrand, InversePlot, InverseTutor, LimitTutor, MeanValueTheorem, MeanValueTheoremTutor, NewtonQuotient, NewtonsMethod, NewtonsMethodTutor, PointInterpolation, RiemannSum, RollesTheorem, Roots, Rule, fy := 3 x + 2 cos e
y+ 1 y2 y+ 1 y2
2 y +1
y+ 1 y2
(5)
(6)
Show, ShowIncomplete, ShowSteps, Summand, SurfaceOfRevolution, SurfaceOfRevolutionTutor, Tangent, TangentSecantTutor, TangentTutor, TaylorApproximation, TaylorApproximationTutor, Understand, Undo, VolumeOfRevolution, VolumeOfRevolutionTutor, WhatProblem O TutorAnswer := DiffTutor(f(x,y),y); v TutorAnswer := vy 2 cos e
y+ 1 y2
x2 + 3 x y + 5 x3 + 2 sin e
y+ 1 y2
y+ 1 y2
=3 x
(7)
y2 $ 2 y + 1 y
y4
y+ 1 y2 y+ 1 y2 y+ 1 y2
O TutorAnswer; v vy x + 3 x y + 5 x + 2 sin e
2 3
y4 To work with the right hand side of TutorAnswer we use the rhs command. O Fy := rhs(TutorAnswer); Fy := 3 x + 2 cos e
y+ 1 y2
= 3 x+
2 cos e
y2 $ 2 y + 1 y
(8)
y+ 1 y2
y2 $ 2 y + 1 y
y4
(9)
Fyx := 3 fyx := 3
(10)