Page 418 - Excel for Scientists and Engineers: Numerical Methods
P. 418
APPENDIX 3 CUSTOM FUNCTIONS HELP FILE 395
dZydx2
Returns the second derivative of a function y = F(x), represented by a formula in a cell,
at a specified value of x. Returns #DIV/O! error value if x = 0, in which case use the
optional argument scale-factor.
Syntax
d 2ydx2 (expression, variable, scale-factor)
expression reference to a cell containing a formula (the function F(x)to be
differentiated)
variable cell reference corresponding to the independent variable x in the
function F(x)
scale-factor optional argument to be used when x is zero
Remarks
The argument expression can be either a reference to a cell that contains a formula,
or a name.
The argument variab/e can be either a reference to a cell, or a name.
Use the optional argument scale-factor to specify a suitable value of x to be used to
calculate ~x. For example, if the function requires values of x in the range -1 x lo5
to 1 x lo5, use 1E-5 for scale-factor.
The optional argument scale-factor can be either a number or a formula, or a
reference to a cell that contains a number or formula, or a name.
The workbook can be set to either RlC1- or Al-style.
Errors (difference between returned value and correct value, when the latter can be
calculated using a calculus formula) are typically of the order of to lo-'.
Limitations
None of the precedent cells of the argument expression may contain references to
the argument reference.
The function cannot handle implicit references; that is, a name or range reference
cannot be used for a range of values.
Example
If cell C2 contains the formula =SIN(62) and cell 62 contains the value 1, the formula
=d2ydx2(C2,62) returns the value -0.841470981782962, The correct value is cos
(l+n/2) = -0.841470984807897 (3.6 x O/O error).
See Also
dydx