DyDx

Revision as of 05:35, 31 December 2008 by Lchrisman (talk | contribs)


Dydx(y,x)

Returns the derivative of the expression «y» with respect to the variable «x». This function returns the ratio of the change in «y» to a small change in «x» that affects «y». The small change is, by default, 1.0e-8, but can be specified using the optional parameter «delta», e.g.:

Dydx(y,x,delta:1.0e-4)

Library

Special Functions

Evaluation Modes

When you evaluate Dydx(y,x) in mid-mode, the mid value for «x» is varied and the mid-value of «y» is evaluated. In sample-mode, the sample of «x» is varied and the sample for «y» is computed. Therefore, when «y» is a statistical function of «x», care must be taken to ensure that the evaluation modes for «x» and «y» correspond. So, for example:

Y := Dydx(Kurtosis(Normal(0,X)), X)

would not produce the expected result. In this case, when evaluating «y» in mid-mode, Kurtosis evaluates its parameter, and thus «x», in sample mode, resulting in a mismatch in computation modes. To get the desired result, you should explicitly use the mid-value of «x»:

Y := Dydx([[Kurtosis(Normal(0,Mid(X))), X)

Preservation of values

New in Analytica 4.2

In Analytica 4.1 and earlier, evaluation of Dydx(y,x) causes any previously computed results that are downstream of «x» to become invalidated. Analytica 4.2 preserves previously computed values throughout the model. In rare situations, if your model consumes nearly all available memory and you'd rather allow previously computed values to be dropped while computing Dydx, you can specify the optional parameter «preserve» to be false, e.g.:

Dydx(Y,X,preserve:false)

Of course, when you need to view other results that had been previously cached, they will need to be recomputed again, and probability distributions will need to be re-sampled.


See Also

Comments


You are not allowed to post comments.