Computing Partial Derivatives and Gradients in Excel

DERIVF can be nested to compute partial derivatives of any order: z y x f x y z

Consider the partial derivative:

y x cos ( x , y ) = - sin ( x y ) - xy cos ( x y )

We compute the partial derivative of cos(xy) at (π,π) by nesting DERIVF and compare the result with the analytical value shown in B3 below:

Partial derivative at (π,π)


A
1 =COS(X1*Y1)
2 =DERIVF(B1,X1,PI())
3 =DERIVF(B2,Y1,PI())
A B
1 1
2 0
3 9.3394486379 9.3394486379
Question or Comment? Email us:
support @ excel-works.com
ExceLab: Transforming Excel into a Calculus Power House
ExceLab functions and methods are protected by USA Patents 9286286, 9892108, 10114812 and pending.
© 2015-2019, ExcelWorks LLC
Boston, USA