View source: R/multivariable.R
| vc_partial | R Documentation |
Approximate a coordinate partial derivative
vc_partial(
f,
point,
coordinate,
method = c("central", "forward", "backward"),
h = NULL,
atol = 1e-08,
rtol = 1e-04,
warn = TRUE
)
f |
Deterministic scalar field accepting ONE numeric vector and returning
one finite real scalar. For f(x,y), supply an explicit wrapper
|
point |
Nonempty finite real coordinate vector. Optional names must be unique and nonempty and are passed to f. |
coordinate |
Integer coordinate index from one to length(point). |
method |
One of "central", "forward", or "backward". |
h |
Positive finite real initial step. NULL uses max(1, abs(x)) times machine epsilon to the power 1/3 for central differences or 1/2 for one-sided differences. This heuristic is not optimal for every function or physical scale. |
atol |
Nonnegative finite absolute tolerance for sensitivity comparisons. |
rtol |
Nonnegative finite relative tolerance for sensitivity comparisons. |
warn |
Logical scalar; warn when sensitivity diagnostics fail. |
Holds every other coordinate fixed and reuses vc_derivative(). Its actual-displacement and three-scale checks remain unchanged. Existence of partial derivatives is not proof of differentiability. Finite samples cannot establish the existence of the mathematical partial derivative.
Plain list with type, point, coordinate, value, estimate, derivative (complete vc_derivative diagnostics), reliable and note.
(function(v)v[1]^2+2*v[2]^2) |> vc_partial(c(1,2),coordinate=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.