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 10628634, 10114812, 9892108 and 9286286.

© 2015-2024, ExcelWorks LLC
Boston, USA